Published by

Although best when running Windows guests, Windows 8 built-in Microsoft Hyper-V can also be used to run Linux guests. Officially Hyper-V only supports SUSE and Red Hat enterprise server distributions but with a few simple tricks any Linux distro can be installed.

In this tutorial we will install both OpenSUSE 12.1 and Ubuntu 11.10 distros. Please notice that I have still not found how to get sound working on Hyper-V Linux guests. Also changing the resolution seems to be extremely tricky, following this tutorial you can set OpenSUSE display resolution freely during the installation procedure but it cannot be changed later on. For Ubuntu I have only managed 800 * 600 resolution.

For a Linux guest to work on Hyper-V it needs to use so called Legacy Network Adapter, a private one while installing and an internal or external one when running. Before installing OpenSUSE we need to create a private network switch using Legacy Network Adapter.

Specify the name of the virtual machine and where it should be saved. Click Next.
.

Assign RAM. Notice that the RAM assigned to a virtual machine is taken from the total of RAM on your host PC; to run virtual machine well you need to balance between the RAM of your host and virtual machine. For OpenSUSE I recommend using 1 GB (1024 MB); if less you can have issues with GUI, more does not add speed or benefit in other way. OpenSUSE runs well with 1 GB. Click Next.
.

In Network Configuration at this point select Connection: Not Connected. We will add virtual switch later
.
.

Specify name, location and size of the virtual hard disk. For OpenSUSE 8 GB is enough to install and run, here I added some more for storage space. Click Next.
.

Remove Network Adapter. This needs to be done for Legacy Network Adapter to work
.
.

Click Add Hardware, select Legacy Network Adapter, click Add
.
.

Set Legacy Network Adapter to use the Private switch you created earlier
.
.

Click Apply, click OK

1.4. Install OpenSUSE

Select your OpenSUSE vm on Virtual Machines list, click Connect
.
.

Click Start to start vm
.
.

Press F3 to select resolution. Notice that as I mentioned earlier I have still not found how to change resolution later so this selection now determines what resolution your OpenSUSE vm is going to use
.
.

Select Installation and press Enter
.
.

Select your preferred language and keyboard layout. OpenSUSE will be installed on the language you select here, using selected keyboard layout. Click Next
.
.

For how to create a private virtual switch, create Ubuntu virtual machine and add Private Legacy Network Adapter and making Ubuntu installation to use it, follow the steps 1.1., 1.2. and 1.3. as described above (Install OpenSUSE on Hyper-V).
2.1. Install Ubuntu

Connect and start vm as described above (Install OpenSUSE) on 1.4.1 and 1.4.2

For Ubuntu (and all Debian family distros) to work on Hyper-V we need to disable Advanced Configuration and Power Interface (ACPI). When ACPI is enabled, Ubuntu does not support Legacy Network Driver needed to install and run it on Hyper-V. Press F6 to select installation options, select acpi=off, press Spacebar to select it, press ESC to exit Options menu
.
.

Click an empty spot on desktop, press CTRL+ALT+t to open Terminal (about the same as Command Prompt in Windows). To move to Root (about the same as in Windows an elevated Command Prompt), type sudo –i and press Enter. Enter your password to confirm, press Enter again
.
.

Now we need to edit Initramfs to add modules which offer support for Hyper-V integration components. We need to manually add modules for bus (= traffic between host and guest), storage and network. To do this, open Initramfs using your preferred editor. I use Nano in this example:

...... Please notice that I have still not found how to get sound working on Hyper-V Linux guests. Also changing the resolution seems to be extremely tricky, following this tutorial you can set OpenSUSE display resolution freely during the installation procedure but it cannot be changed later on. For Ubuntu I have only managed 800 * 600 resolution.

Kari

Hyper-V don't support sound in any client OS, it's also limited in resolution, if you want to have sound , you have to use Remote Desktop , same with the Resolution, Keep in mind that Hyper-V is design to run Servers OS on a Server Host, and we usally use remote application to manage the servers as they are usally not connected to input device or monitors

This is great, thank you.
I'm having a problem installing Ubuntu once I've turned off ACPI however, once this is done the Ubuntu installer sees the hard drive (VHD) as being too small. I set the virtual machine up to have a 10GB VHD so it expands dynamically right? If ACPI is left on, the installer works fine and detects the VHD as being 10GB. However if I turn off ACPI as instructed, once I get to the "Preparing to install Ubuntu" (Section 2.2.5 above) it has a cross for the HDD space and won't let me proceed with the installation. What is a solution to this? If I were to "force install" Ubuntu would the VHD automatically increase in size with ACPI turned off? If so, how does one "force install"? Or is there a better way to keep the VHD size once ACPI is turned off?
Thanks in advance

As this tutorial was written almost year and a half ago, over half a year before Windows 8 was published, and as both the Hyper-V and Ubuntu have evolved since that, I must tell you I am not sure if the installation still requires ACPI being turned off. I use only SUSE distribution for my Linux needs and have not installed or used Ubuntu in Hyper-V since publishing this tutorial.

I will do a test Ubuntu installation as soon as I have time for it to make necessary updates to this tutorial, please check back in a few days.

In the mean time, let's make sure you have understood the concept of a dynamically expanding VHD correctly: the amount of storage space specified for a dynamically expanding VHD is the maximum file size allowed for it. For instance, if you specify the VHD to be 10 GB as you told, it means that if your Ubuntu installation needs let's say 6 GB you only have 4 GB left for your installed software and personal files, the vhd being unable to expand (grow) beyond the 10 GB limit you specified.

In other words, the amount of storage space given to a dynamically expanding VHD is the maximun size it can expand to, not the "starting" size. In your case as you described it, your VHD could never grow to be bigger than 10 GB.

@Kari
Why do we have to use a network switch ? Cant we just install from an iso image or a dvd. Why is the network switch required ? In software's like VirtualBox we can just install from an image, is the Virtual network switch required for the installation the guest OS or do you just do it we can get Internet access from within the guest OS ?

What do I need to do to get this to work under 8.1 ?

I used this thread to install a SUSE (12.1) VM on Windows 8.0. Worked like a dream (after a bit of futzing around with network config). But I then "upgraded" to Windows 8.1 and my VM ceased to work. reinstalling gives the same problem. It installs OK but when it starts it falls over at...

Pressing Y just produces this...

Any ideas ?

The UBUNTU install (with 12.04.3) works ok. But it looks a lot more cumbersome than SUSE and I can't get networking going so I'd really like to get back to SUSE.

BTW 8.1 also screwed up my Hamachi/Logmein setup and pissed on my Cygwin. Not impressed.

Still no luck with 8.1. So I ditched Hyper-V in favour of VMwarePlayer. Simpler and much more intuitive. I got a networked SUSE box up and running without any need consult diocumentation or go to Google for hints and gotchas. Mystery to me why anybody would use Hyper-V for this. Once again Microsoft shoots itself in the foot.

Hyper-V Virtual Machine - Completely Delete in Windows 8How to Completely Delete a Hyper-V Virtual Machine in Windows 8, 8.1, and Server 2012
The Hyper-V technology provides an environment that you can use to create and manage virtual machines and their resources. Each virtual machine is an isolated, virtualized computer system that is capable of...

Tutorials

Error creating virtual machine (Client Hyper-V, Win 8 Pro)I'm using an AlienWare M14 machine. I tried to create a virtual machine locally using Client Hyper-V on Windows 8 Pro, but it still doesn't work (took me a lot of time). I added the Hyper-V features in "Turn windows feature on or off", and all of the requirements to run Hyper-V are fulfilled (SLAT,...

Virtualization

Hyper-V Virtual Machine - Export and Import in Windows 8How to Export and Import a Hyper-V Virtual Machine in Windows 8 and 8.1
The Hyper-V technology provides an environment that you can use to create and manage virtual machines and their resources. Each virtual machine is an isolated, virtualized computer system that is capable of running its own...

Tutorials

Can not create virtual switch in Hyper-VHello all,
I'm learning windows phone 8, and I want to run the windows phone 8 simulator on my PC ( OS windows 8.1 pro ), but the simulator can not run because it can not create the virtual switch in Hyper-V, and I also can not do it manually :mad:.
This is the error when I create the new virtual...

Virtualization

Windows 8 Machine Running Windows 7 Virtual MachineHey all. I just recently purchased a laptop with Windows 8 and wanted to set up a VM of Windows 7 on it. I have never worked with VM's before and I'm ready to get it going. Could anyone provide any help as to how to do it. Thanks!!!

Virtualization

Windows 8 Virtual MachineI had installed windows 8 in VBOX. I could not get the sound to work. It stated no Audio detected. I uninstalled it, and reinstalled it in VMWARE. It is working fine. I tried to run it again in VBOX but the same thing, no audio drivers detected. I am running it in VMWARE and it is working great,...