Chapter 2. Setting Up a Virtual Machine Host

Contents

2.1. Best Practices and Suggestions
2.2. Setting Up a 32-Bit Domain 0 on a 64-Bit Hypervisor
2.3. Managing Domain 0 Memory
2.4. Networks Card in Fully Virtualized Guests
2.5. Starting the Virtual Machine Host

This section documents how to set up and use SUSE Linux Enterprise Server 10 SP4 as a virtual machine host.

In most cases, the hardware requirements for the Domain0 are the same as those for the SUSE Linux Enterprise Server operating system, but additional CPU, disk, memory, and network resources should be added to accommodate the resource demands of all planned VM Guest systems.

[Tip]

Remember that VM Guest systems, just like physical machines, perform better when they run on faster processors and have access to more system memory.

The following table lists the minimum hardware requirements for running a typical virtualized environment. Additional requirements have to be added for the number and type of the respective guest systems.

Table 2.1. Hardware Requirements

System Component

Minimum Requirements

 

Computer

Computer with Pentium II or AMD K7 450 MHz processor

 

Memory

512 MB of RAM for the host

 

Free Disk Space

7 GB of available disk space for the host.

 

Optical Drive

DVD-ROM Drive

 

Hard Drive

20 GB

 

Network Board

Ethernet 100 Mbps

 

IP Address

  • One IP address on a subnet for the host.

  • One IP address on a subnet for each VM Guest.

 

Xen virtualization technology is available in SUSE Linux Enterprise Server products based on code path 10 and later. Code path 10 products include Open Enterprise Server 2 Linux, SUSE Linux Enterprise Server 10, SUSE Linux Enterprise Desktop 10, and openSUSE 10.x.

The virtual machine host requires a number of software packages and their dependencies to be installed. To install all necessary packages, run YaST Software Management, select the filter Patterns and choose Xen Virtual Machine Host Server for installation.

After the Xen software is installed, restart the computer.

[Important]Boot Issues on 64bit Machines with more than 480 GB RAM

64bit Machines with more than 480 GB RAM may refuse to boot with the following error message:

(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) Not enough RAM for DOM0 reservation.
(XEN) ****************************************

To avoid this error, it is recommended to always specify the Domain 0 Memory size with the boot parameter dom0_mem=VALUE on machine equipped with large amounts of RAM. Set the VALUE at or below the boundary of 480 GB—the difference is reserved for the hypervisor (to be used for guest VMs).

Permanently add this parameter to your boot loader configuration by adding the parameter dom0_mem=VALUE to your Xen kernel boot configuration. Either use YaST+System+Boot Loader or edit /boot/grub/menu.lst. See Section 2.3, “Managing Domain 0 Memory” for more information.

Updates are available through your update channel. To be sure to have the latest updates installed, run YaST Online Update after the installation has finished.

2.1. Best Practices and Suggestions

When installing and configuring the SUSE Linux Enterprise operating system on the host, be aware of the following best practices and suggestions:

  • If the host should always run as Xen host, run YaST System+Boot Loader and activate the Xen boot entry as default boot section.

    • In YaST, click System > Boot Loader.

    • Change the default boot to the Xen label, then click Set as Default.

    • Click Finish.

  • Disable powersave functionality on the host and all guest operating systems. On the host computer and other Linux computers, you can use the chkconfig powersaved off command.

  • Close Virtual Machine Manager if you are not actively using it and restart it when needed. Closing Virtual Machine Manager does not affect the state of virtual machines.

  • For best performance, only the applications and processes required for virtualization should be installed on the virtual machine host.

  • When using both, iSCSI and OCFS2 to host Xen images, the latency required for OCFS2 default timeouts in SUSE Linux Enterprise Server may not be met. To reconfigure this timeout, run /etc/init.d/o2cb configure or edit O2CB_HEARTBEAT_THRESHOLD in the system configuration.

2.2. Setting Up a 32-Bit Domain 0 on a 64-Bit Hypervisor

A virtual machine host running on a 64-bit platform can access much more memory than hosts running on a 32-bit platform. However, there might be circumstances where you want to run the 32-bit version of the SUSE® Linux operating system (as domain 0) on the 64-bit Xen hypervisor.

  1. On 64-bit hardware, start the 32-bit SUSE Linux operating system installation program.

  2. Select Installation Settings+Software to include the Xen Virtual Machine Host Server software package selection.

  3. Select Software+Software Selection and System Tasks and click Details to view all packages.

  4. In the Filter drop-down list, select Search, then search for kernel-xen. Make sure that kernel-xenpae is selected for installation and that kernel-xen is not selected.

  5. Complete the SUSE Linux installation program.

    The installation program copies files, reboots, and prompts you for additional setup information.

  6. After entering the additional setup information, log in to the computer.

  7. Access the SUSE Linux installation source media.

    The 64-bit Xen hypervisor RPM is included in both 32-bit and 64-bit versions of the SUSE Linux installation media.

  8. On the SUSE Linux installation source media, find the x86_64 directory that contains xen.rpm.

  9. Use the following command to install the RPM:

    rpm -U xen.rpm --ignorearch --force
    
  10. Edit the GRUB boot loader settings by running YaST+System+Boot Loader or editing the file at /boot/grub/menu.lst.

  11. Change Hypervisor to /boot/xen.gz.

    The xen.gz hypervisor is the 64-bit hypervisor.

  12. Reboot the computer.

  13. During the boot process, select the Xen option from the GRUB boot loader.

  14. Verify that the computer is running the 32-bit Domain 0 by entering:

    uname -m
    

    It should report a 32-bit machine name, such as i686.

  15. Verify that the computer is running the 64-bit hypervisor by entering:

    xm info | grep xen_caps
    

    It should report a 64-bit Xen hypervisor, such as xen-3.0-x86_64.

2.3. Managing Domain 0 Memory

When the host is set up, a percentage of system memory is reserved for the hypervisor, and all remaining memory is automatically allocated to Domain0.

A better solution is to set a minimum and maximum amount of memory for domain 0, so the memory can be allocated appropriately to the hypervisor. An appropriate minimum amount would at least be 512 MB.

On 64bit machine with more than 480 GB RAM Setting a maximum amount needs to be set, otherwise the machine may refuse to boot. Set the value at or below the boundary of 480 GB—the difference is reserved for the hypervisor (to be used for guest VMs).

2.3.1. Setting a Maximum Amount of Memory

  1. Determine the amount of memory to set for domain 0.

  2. At Domain0, type xm list to view the currently allocated memory.

  3. Run YaST+Boot Loader.

  4. Select the Xen section.

  5. In Additional Xen Hypervisor Parameters, add dom0_mem= mem_amount where mem_amount is the maximum amount of memory to allocate to Domain0. Add K, M, or G, to specify the size, for example, dom0_mem=768M.

  6. Restart the computer to apply the changes.

2.3.2. Setting a Minimum Amount of Memory

To set a minimum amount of memory for Domain0, edit the dom0-min-mem parameter in the /etc/xen/xend-config.sxp file and restart xend. For more information, see Section 4.2, “Controlling the Host by Modifying xend Settings”.

2.4. Networks Card in Fully Virtualized Guests

In a fully virtualized guest, the default network card is an emulated Realtek network card. However, it also possible to use the split network driver to run the communication between Domain0 and a VM Guest. By default, both interfaces are presented to the VM Guest, because the drivers of some operating systems require both to be present.

When using SUSE Linux Enterprise, both network cards are available for the VM Guest. The MAC addresses of both cards are identical in this case, which leads to problems when running the network. The following network options are available:

emulated

To use a emulated network interface like an emulated Realtek card, specify type=ioemu on the vif line. In /etc/xen/vm/<configuration> this would look like:

vif=[ 'mac=00:16:3e:62:f4:f3,type=ioemu' ]
paravirtualized

Specify the parameter type=netfront to the vif line to use the paravirtualized network interface. In /etc/xen/vm/<configuration> this would look like:

vif=[ 'mac=00:16:3e:62:f4:f3,type=netfront' ]
emulated and paravirtualized

If the administrator should be offered both options, simply do not specify a type. In /etc/xen/vm/<configuration> this would look like:

vif=[ 'mac=00:16:3e:62:f4:f3,model=rtl8139' ]

In this case, one of the network interfaces should be disabled.

If you are using the Virtual Machine Manager, you may also reconfigure the guests by modifying the respective .sxp configuration. For more about this configuration option, see also Section 4.3, “Configuring a Virtual Machine by Modifying its xend Settings”.

2.5. Starting the Virtual Machine Host

If virtualization software is correctly installed, the computer boots to display the GRUB boot loader with a Xen option on the menu. Select this option to start the virtual machine host.

[Note]Xen and Kdump

In Xen, the hypervisor manages the memory resource. If you need to reserve system memory for a recovery kernel in Domain0, this memory has to be reserved by the hypervisor. Thus, it is necessary to add the parameter crashkernel=size@offset to the kernel line instead of using the line with the other boot options. For more about Kdump, see also http://www.novell.com/rc/docrepository/public/37/basedocument.2007-09-13.2960758124/4622069_f_en.pdf.

If the Xen option is not on the GRUB menu, review the steps for installation and verify that the GRUB boot loader has been updated. If the installation has been done without selecting the Xen pattern, run the YaST Software Management, select the filter Patterns and choose Xen Virtual Machine Host Server for installation.

After booting the hypervisor, the Domain0 virtual machine starts and displays its graphical desktop environment. If you did not install a graphical desktop, the command line environment appears.

Before starting to install virtual guests, make sure that the system time is correct. To do this, configure NTP (Network Time Protocol) on the controlling domain:

  1. In YaST select Network Services+NTP Configuration.

  2. Select the option to automatically start the NTP daemon during boot. Provide the IP address of an existing NTP time server, then click Finish.

[Note]Time Services on Virtual Guests

Hardware clocks commonly are not very precise. All modern operating systems try to correct the system time compared to the hardware time by means of an additional time source. To get the correct time on all VM Guest systems, also activate the network time services on each respective guest or make sure that the guest uses the system time of the host. For more about Independent Wallclocks in SUSE Linux Enterprise Server see Section 6.3.4, “Virtual Machine Clock Settings”.

For more information about managing virtual machines, see Chapter 4, Managing a Virtualization Environment.