Installing Ubuntu Server 10.10 on Hyper-V

Installing Ubuntu Server 10.10 on Hyper-V

  • Comments 51


Now that the Hyper-V integration services are included in the official Linux builds – I wanted to try out a Linux distribution that is not officially supported by Microsoft and see what was involved in getting it all working.  With the recent release of Ubuntu 10.10 I thought I would try out their server version.  After downloading the bits from http://www.ubuntu.com/server I created a quad-processor virtual machine with a non-legacy network adapter.

Installation was fairly straight forward:

UbuntuServer10-1UbuntuServer10-2UbuntuServer10-3UbuntuServer10-4UbuntuServer10-5UbuntuServer10-6UbuntuServer10-7

However – Ubuntu does not have the Hyper-V enlightened network drivers enabled by default – so the installation complains about not being able to find any network adapters:

UbuntuServer10-8

But I just ignored that and moved along with the install:

UbuntuServer10-11UbuntuServer10-12UbuntuServer10-13UbuntuServer10-14UbuntuServer10-15UbuntuServer10-16UbuntuServer10-17UbuntuServer10-18UbuntuServer10-19UbuntuServer10-20UbuntuServer10-21UbuntuServer10-22UbuntuServer10-23UbuntuServer10-24UbuntuServer10-25UbuntuServer10-26

I chose the default packages for setting up a LAMP server:

UbuntuServer10-27UbuntuServer10-28UbuntuServer10-29UbuntuServer10-30UbuntuServer10-31UbuntuServer10-32

The install finished and I was dropped at the login prompt:

UbuntuServer10-33

A cool thing to note was that at this stage I could already shut down the virtual machine by using the shutdown button on the Virtual Machine Connection window, so part of the integration services are already running.  You can also see that all four virtual processors are there and working:

UbuntuServer10-45

Getting the Hyper-V drivers up and running at this point in time is actually relatively simple.  The first thing you need to do is to edit /etc/initramfs-tools/modules and add the following lines to the end of it:

hv_vmbus

hv_storvsc

hv_blkvsc

hv_netvsc

Once you have made these changes you will need to run “update-initramfs –u” and reboot.  You will now have the Hyper-V drivers for storage and networking loaded:

UbuntuServer10-34UbuntuServer10-35UbuntuServer10-36

You can confirm that these drivers are loaded by running “lsmod” after the reboot:

UbuntuServer10-41

The final thing you need to do is to configure networking (because that step was skipped during installation).  The first thing to do is to run “ifconfig –a” to find out what name your network adapter has been given.  In my case it was “eth0” – but this is not always the name it will get.  Once you know the name you will need to edit /etc/network/interfaces and add the following to the end of the file:

For DHCP (what I did):

auto eth0
iface eth0 inet dhcp

For a Static IP address:

auto eth0
iface eth0 inet static
address [insert your IP address]
netmask [insert your netmask]
Gateway [insert your gateway address]

Like this:

UbuntuServer10-38

One more reboot and running “ifconfig” should confirm that everything is working:

UbuntuServer10-42

And in my case I could also confirm that the website was accessible from my parent partition as well:

UbuntuServer10-46

So there you have it.  Ubuntu Server 10.10 running under Hyper-V with full integration services using nothing other than what is included on the Ubuntu install media.

Cheers,
Ben

Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post
  • I followed the instructions to install Ubuntu Server 11.04 64 bit on Hyper-V. After installation, Ubuntu can't access the LAN. I've heard of Ubuntu not being supported as a guest OS on Hyper-V. Not sure if this is the reason, or did I miss something? Can someone please shed some light?

  • This process can be completed without any reboots. After updating the initramfs type sudo modprobe {each hv_ module one at a time} (e.g. sudo modprobe hv_vmbus). After setting your network, sudo /etc/init.d/networking restart && sudo ifconfig eth0 up will bring up the new network interface. Cheers!

  • The most perfect, most valuable information I've ever seen on using Ubuntu Server with Hyper-V.  Thank you very much!!!!!!

  • Well, this is 2012 now and Ubuntu Server 12.04 LTS x64 installs into Hyper-V automatically with native devices. Thanks Ubuntu and Microsoft!

  • Hello friends,

    Now you can send 5000 FREE emails per month using our email marketing servers with multiple IPs to get your campaign to

    inbox.Get great inbox deliveries and land your 95% emails to inbox.

    With our userfriendly and beautiful web-app you would be able to track every movement of your campaign. You would be able

    to see the users who have opened, clicked, unsubscribed, bounced and marked as spam.

    You can register here for your FREE account:www.client.hostwiser.com/cart.php

    HURRY!!

    * You must have access to your own opt-in list of your subscribers.You must be compliant with the ICANN-SPAM ACT of anti

    spamming.We do not sell email lists.

  • Anyone else have problems when loading ubuntu in hyper-v it brings the entire system to a stop not just the VM?

Page 4 of 4 (51 items) 1234