How do I install and configure VM

Create and configure virtual machines under Hyper-V

Anyone who only knows virtualization products such as Virtual PC or VMware Workstation has to rethink Hyper-V. It is not software that runs on a host operating system and with which one can also generate and install. With Hyper-V, this task is carried out by the Hyper-V Manager, which can be executed locally with a full installation of Windows Server and used remotely with Server Core. It supports all essential steps from creating the VM and setting up virtual networks to installing a guest operating system to adding the so-called integration services.

Creating a new VM is just as easy with the Hyper-V Manager as with desktop tools such as the Virtual PC. A wizard guides you through the procedure in which the settings for VMs are specified. The first steps are to name the VM and enter the directory path, followed by allocating memory.

Set up the virtual network

If you create the first VM on a freshly set up Hyper-V server, the pull-down menu under Configure network possibly just selecting "Not Connected". The reason for this is that a virtual network has not yet been set up under Hyper-V that could be assigned to the VM.

This process can also be done from the Hyper-V Manager using the Virtual network manager in the right menu bar. There you can create a new virtual network and choose between the types "external", "internal" and "private".

An external virtual network allows virtual machines to access the entire network, including the Internet, if appropriate access is available. The "external" type must always be linked to a physical network adapter (NIC), whereby only one external network is possible per NIC. If you need more than one, you have to install additional NICs.

Internal virtual networks connect the VMs on one server. They also allow communication between the host system and the guests in the VMs. In contrast, private virtual networks are even more restrictive in that they also do not allow a connection to the host.

Allocation of drives

The dialog behind the menu item "Connect virtual hard disks" offers the option of creating a VHD, coupling an existing one to the VM or postponing this process until later. It is noticeable that the Hyper-V Manager automatically creates a dynamic VHD when a new virtual hard disk is created, although Microsoft recommends the use of VHDs of fixed size for productive use of Hyper-V. If you want to follow this advice you have to get a fixed VHD via an external tool like diskpart and link it to the VM in the Hyper-V Manager.

As a sub-item for "Connect virtual hard disks", the Hyper-V Manager displays "Installation options", which allow an installation medium to be booted from CD / DVD, an ISO file, via a PXE server or even from a virtual floppy. The latter can be accessed with the Hyper-V Manager Action => New => Disk create. The obsolete disks were mainly taken into account because they require Windows Server 2003 for a full backup.

If there is an ISO file on the client during the remote management of Hyper-V, the directory containing it could be shared over the network and the VM could access it. With computers in workgroups this often fails due to rights problems, so it is cheaper to copy the ISO file to the server via a remote desktop connection.

Installation of the guest operating system

When you boot the newly created VM for the first time, it starts from the specified installation medium. In the Hyper-V Manager you can see the progress of the startup process as a thumbnail. If you want to access the VM screen for an interactive installation, you can do so using the "Connect" command in the context menu of the VM entry. The Hyper-V Manager then establishes a connection that can be used to work like a normal remote desktop connection.

After successfully installing the guest operating system, you will find that it has no network connection. This is because the wizard in the Hyper-V Manager does not set up a network adapter when the VM is created. You have to do this after running through the wizard via the menu item "Add hardware" under the settings of the VM. If the so-called integration services exist for the guest system, you should set them up first and then select the network adapter.

Adding the integration services

When the guest system is installed and the VM is booted, the integration services can be added via the menu item Insert installation media for integration services. With newer Windows versions, however, you do not have to insert a data carrier, the necessary files are already on the disk.

The integration services allow closer interlinking between the hypervisor and guest systems. They include, among other things, para-virtualized drivers for hard disk and network access.

After its installation, the guest system will therefore find a network adapter with the name Microsoft Virtual Machine Bus Network Adapter in front. Only now should you go to the properties of the VM under Add hardware the points network card choose. Older network card is suitable for all guests without integration services because it emulates a physical adapter.

In addition to better guest system performance, the integration services offer some useful additional functions. They enable the guest to be shut down in the Hyper-V manager because the VM can trigger this action by the operating system. Without Integration Services, the OS would not be informed and shutting down the VM would affect it like pressing the reset button.