How to Run Ubuntu in Windows 8 Hyper-V Quickly

11

Today we are back with another quick guide. This one will focus on how to install Ubuntu on a Windows 8 desktop quickly using Hyper-V. Windows 7 XP mode was great for running Windows XP. For other operating systems, users often turned to VMware Workstation or VirtualBox. Those solutions, especially VirtualBox, could cause issues with VPN clients and other things on the host. With Windows 8 Hyper-V there are now many applications that can be run natively on Windows 8. For those that missed it, we posted a guide on installing Windows 8 Hyper-V recently. This is invaluable for those looking to build a test lab for a Linux server all in one machine. Today, getting this all working is easy enough for a novice to do.

Test Configuration for Windows 8 Hyper-V

For this guide we are using the Windows 8 X79 test bed. For this, the Windows 8 iSCSI initiator is being installed in order to support Hyper-V virtual machines.

  1. CPU(s): Intel Core i7-3930K
  2. Motherboard: ASUS P9X79 WS
  3. Memory: 32GB (8x 4GB) G.Skill Ripjaws X DDR3 1600
  4. Drives: Corsair Force3 120GBOCZ Vertex 3 120GB
  5. Power Supply: Corsair AX850 850w 80 Plus Gold
Let’s see how easy it is to install Ubuntu Linux in Windows 8 Hyper-V

Running Ubuntu Linux in Windows 8 Hyper-V

From the Windows 8 Hyper-V manager, create a new virtual machine. When the Windows 8 Hyper-V wizard opens, give the virtual machine a descriptive name. For this, Ubuntu 12.10 is good since that is the Linux distro we are using.

Install Ubuntu on Windows 8 Hyper-V - Create new virtual machine
Install Ubuntu on Windows 8 Hyper-V – Create new virtual machine

Next, you will need to do memory allocation. In this example 2GB is enough. We are using a Ubuntu 12.10 desktop installation here, to show a Linux GUI at the end. The same steps work with Ubuntu 12.10 server. Running a Linux server is easy these days. Three years ago, much less so.

Install Ubuntu on Windows 8 Hyper-V - Memory Allocation
Install Ubuntu on Windows 8 Hyper-V – Memory Allocation

The next step is to configure the virtual switch. To make things such as installing security updates easy, we are using an external virtual switch. We showed how to configure one in the Windows 8 Hyper-V install guide.

Install Ubuntu on Windows 8 Hyper-V - Assign a virtual Switch
Install Ubuntu on Windows 8 Hyper-V – Assign a virtual Switch

Now one needs to configure a virtual hard disk. For those wondering, this virtual disk is sitting on the Synology DS1812+ iSCSI volume setup yesterday. For those that want more detail on setting up the Windows 8 iSCSI initiator, see the recent piece. This vhdx is backed by RAID 6 Synology storage tucked away in the lab.

Install Ubuntu on Windows 8 Hyper-V - Assign a Virtual Disk
Install Ubuntu on Windows 8 Hyper-V – Assign a Virtual Disk

On the next screen I would recommend making it easy and selecting the following option for CD/DVD. From here, select the iso you wish to use. Since Ubuntu now includes Hyper-V integration components, it is an easy Linux distro to install in Windows 8 Hyper-V. For this guide we are using the 64-bit desktop version of Ubuntu 12.10. Just after this, we did the same with Ubuntu 12.10 server. No major difference.

Install Ubuntu on Windows 8 Hyper-V - Select ISO
Install Ubuntu on Windows 8 Hyper-V – Select ISO

After clicking through the summary, you will want to start the machine. The step above was the physical equivalent of loading the machine with the installation media. We are all ready to go. Select the Windows 8 Hyper-V VM and click start.

Install Ubuntu on Windows 8 Hyper-V - Start
Install Ubuntu on Windows 8 Hyper-V – Start

Next, you will want to click connect to get to the console. Since we are installing the desktop Ubuntu version in the Windows 8 Hyper-V machine there is a nice graphical installer. For those wondering, the mouse works fine! For those that did not experience this, not too long ago Hyper-V virtualization would render the mouse useless. Now, it all works from the installer.

Install Ubuntu on Windows 8 Hyper-V - Install Linux
Install Ubuntu on Windows 8 Hyper-V – Install Linux

While Ubuntu installed, we looked at the Synology DS1812+ activity graphs. For those that will remember, this virtual machine is being installed to an iSCSI volume. That allows the workstation to use a SSD while the Synology NAS takes care of RAID and the spindle drives. Here is some decent network activity from the installation.

Synology Disk Activity for iSCSI Installation
Synology Disk Activity for iSCSI Installation

After a few minutes, Ubuntu will be set up after a restart. You will see a splash screen similar to this one:

Install Ubuntu on Windows 8 Hyper-V - Running
Install Ubuntu on Windows 8 Hyper-V – Running

At this point you are ready to go. One caveat is that we did not adjust CPU allocations. Right now the virtual machine has a single virtual CPU. You need to shutdown a Windows 8 Hyper-V virtual machine before editing this setting. We do recommend making this change before one attempts to start their main workload.

That’s all there is to getting a fully functional Linux virtual machine in Microsoft Windows 8 Hyper-V. Ubuntu is very popular and a benefit is that you can now breeze through desktop and server installation menus. Everything just works now.

11 COMMENTS

  1. Thanks for the guide – it makes it look very easy. One question: Does dynamic memory now work with Linux? Your memory assignment screenshot shows that option as checked, but I’ve never seen a version of integration services for Linux that supported it.

  2. That’s too bad. I’m a Hyper-V fan because it’s built in to Windows and very very easy to use, but VMWare has a big advantage for Linux guests because it is able to use memory so much more efficiently. Hopefully Microsoft will come out with a version of guest services for Linux that supports dynamic RAM.

  3. One question – Does Hyper-V give full screen access to the guest O/S and
    does Ubuntu run in full 3D mode with this setup?

  4. Hype-V gives full screen access, but Ubuntu supports only some comic resolutions, so I get BIG black frame around :(

  5. Using this approach I’ve installed 12.04.01 Desktop, 12.10 Desktop and 12.04 server. Weirdly at first none of them maintained network connectivity. I checked Windows logs and saw messages referring to a the networking version 4.0 on the hyper-v server while the client was running 3.2. Spent two days trying to figure out how to update the client drivers. Suddenly the network connections in the VM all healed themselves. I’d love to take some sort of credit, but frankly I don’t have a clue what changed.

    Now I’m trying to solve the next problem with my VMs: no sound. I’ve been crawling all over google and I either haven’t used the magic search criteria, or I’m the only one with this issue. Do you have any suggestions?

    thanks
    p.s. I am so new to Linux/Ubuntu that if you would like me to share any info, could you also include directions on how to display it? thanks again.

  6. I take it back. I just read that Hyper-V does not support audio, USB or LPT parallel ports. So the answer is to connect from the host Windows 8 machine to the VM via RDP. Which I’ve also been unsuccessful at accomplishing. *sigh*

  7. I stumbled on this site when I was looking for instructions to install Ubuntu as a dual boot OS on my Win8 (preloaded) machine.

    Does the approach that you describe above allow me to run Ubuntu natively from within Win8? If yes, this is even better than a dual boot option.

    Are there any restrictions on what I can install and run under Ubuntu when it is running within Win8?

    How is this different from Cygwin?

    Thanks in advance!

  8. That’s probably a side-effect of Hyper-V being designed to run on server hardware for server applications.

  9. I have installed Ubuntu server on hy7per-v but the connect option won’t connect to the server. Hyper-v manager shows Ubuntu as running. The vm installation uses a dynamic IP Allocation and PUtty only connects to a static IP. How can I connect?

    Help please.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.