📜 ⬆️ ⬇️

Installing and configuring Linux Ubuntu 10.04 LTS under Hyper-V in Windows Server 2008 R2

I had a bit of free time, so today I decided to write how things work with Ubuntu 10.04 under Hyper-V.

Despite the fact that Ubuntu is not included in the list of officially supported Linux distributions, it works perfectly for Hyper-V. Moreover, no additional integration components were installed. All that is needed to work with Hyper-V has long been in fresh Linux kernels.

Well, let's get started?
')
Take Linux Ubuntu 10.04 LTS. Both 64-bit and 32-bit versions will do. Create a standard virtual machine, connect the DVD with the OS and start the installation. Please note that we leave the synthetic network interface created by default inside the virtual machine. There is no longer a need to use Legacy’s outdated and slower network interface. It is recommended to use the static Mac address of the network interface if this virtual machine will migrate between the physical nodes of the cluster using the Live migration mechanism.

ubunt network settings hyper-v syntethic adapter

You can perform the installation in text or graphic mode. I recommend doing this using graphics because in text mode, redrawing each menu takes 20-30 seconds. This is quite annoying, although it doesn’t stop you from completing the installation successfully.

Immediately after starting the installation for a minute, another heap of warning messages about a non-standard BIOS can be observed. Feel free to ignore them and continue the installation until we see the following concise message.

ubuntu installation finished hyper- v

After the first reboot, use lsmod to look at the list of loaded modules. We find that only a Hyper-V bus module called hv_vmbus is loaded.

ubuntu vmbus kernell modules hyper-v

This is not enough, so we edit the / etc / initramfs - tools / modules file and add lines to it that allow loading the rest of the modules we need.
hv_vmbus
hv_storvsc
hv_blkvsc
hv_netvsc
hv_utils



Save the file and execute the command:
$ sudo update-initramfs -u

Register in / etc / network / interfaces your new seth0 synthetic network interface. If you used the legacy Legacy network interface, it would be called eth0.

For static addressing:
Auto seth0
iface seth0 inet static
address xxxx
netmask xxxx
Gateway xxxx

To obtain an DHCP address:
Auto seth0
iface seth0 inet dhcp

I checked both network addressing methods, they work.

Reboot and in the process we see such messages that devices associated with vmbus are found.

ubuntu vmbus kernell modules hyper-v messages

After booting with lsmod, we check the loaded modules and see which network interfaces we have in the system. ubuntu network interface modules hyper-v

As you can see, the seth0 network interface works fine.
ubuntu network test hyper-v ubuntu network test hyper-v

It is also worth noting that Ubuntu normally works in both single-processor and multiprocessor configurations. The system without problems is scaled to 4 processors.
ubuntu smp cpu hyper-v

ubuntu smp cpu hyper-v

ubuntu smp cpu hyper-v

Unfortunately, the RAM resources of my test server are limited, so I could not give more than 14 GB of RAM to virtual machines with Ubuntu. However, for most tasks of this volume is quite enough.

It is worth noting that there is no support for a synthetic mouse in Ubuntu, and the Satori project has not yet been ported to this distribution, so for remote control in graphics mode, I used VNC.

Just in case, inside a virtual machine with Ubuntu, I configured a web server and an FTP server. Over the course of several days, with the help of scripts, from time to time I downloaded quite large amounts of data from them. Degradation of performance, any problems and failures were observed.

Conclusion - in spite of the fact that there is no officially stated support for Ubuntu, this distribution kit works under Hyper-V very reliably and, in my opinion, can be used in a production environment.

Source: https://habr.com/ru/post/112850/


All Articles