Novell LINUX ENTERPRISE SERVER 11 - VIRTUALIZATION Manual

Virtualization with xen
Table of Contents

Advertisement

Quick Links

SUSE Linux Enterprise
Server
11
May 27, 2009
Virtualization with Xen
www.novell.com

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LINUX ENTERPRISE SERVER 11 - VIRTUALIZATION and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Novell LINUX ENTERPRISE SERVER 11 - VIRTUALIZATION

  • Page 1 SUSE Linux Enterprise Server www.novell.com Virtualization with Xen May 27, 2009...
  • Page 2 That this manual, specifically for the printed format, is reproduced and/or distributed for noncommercial use only. The express authorization of Novell, Inc must be obtained prior to any other use of any manual or part thereof. http://www.novell For Novell trademarks, see the Novell Trademark and Service Mark list .com/company/legal/trademarks/tmlist.html.
  • Page 3: Table Of Contents

    Contents About This Manual 1 Introduction to Xen Virtualization Basic Components ......Understanding Virtualization Modes ....Xen Virtualization Architecture .
  • Page 4 Controlling the Host by Modifying xend Settings ... . Configuring a Virtual Machine by Modifying its xend Settings ..The xm Command ......Automatic Starting of Domains .
  • Page 5 SUSE Drivers for Red Hat Enterprise Linux 5 on Xen ..SUSE Drivers for Windows on Xen ....SUSE Drivers for SUSE Linux Enterprise Server on Xen .
  • Page 7: About This Manual

    Internet. For an overview of the documentation available for your product and the latest docu- mentation updates, refer to http://www.novell.com/documentation. Quality service is also available. Experts can answer questions about installation or configuration, make reliable security updates available, and support development projects.
  • Page 8 Introduces basic concepts of system security, covering both local and network se- curity aspects. Shows how to make use of the product inherent security software like Novell AppArmor (which lets you specify per program which files the program may read, write, and execute) or the auditing system that reliably collects informa- tion about any security-relevant events.
  • Page 9 • To report bugs for a product component or to submit enhancement requests, please use https://bugzilla.novell.com/. If you are new to Bugzilla, you might find the Bug Writing FAQs helpful, available from the Novell Bugzilla home page. • We want to hear your comments and suggestions about this manual and the other documentation included with this product.
  • Page 10 • Dancing Penguins (Chapter Penguins, ↑Another Manual): This is a reference to a chapter in another manual. Virtualization with Xen...
  • Page 11: Introduction To Xen Virtualization

    Introduction to Xen Virtualization Virtualization of operating systems is used in many different computing areas. It finds its applications in server consolidation, energy saving efforts, or the ability to run older software on new hardware, for example. This chapter introduces and explains the components and technologies you need to understand to set up and manage a Xen-based virtualization environment.
  • Page 12: Understanding Virtualization Modes

    • The SUSE Linux operating system, which gives the administrator a graphical and command line environment to manage the virtual machine host components and its virtual machines. NOTE The term “Domain0” refers to a special domain that provides the manage- ment environment.
  • Page 13: Xen Virtualization Architecture

    AMD* Virtualization or Intel* Virtualization Technology. Some guest operating systems hosted in full virtualization mode, can be configured to run the Novell* Virtual Machine Drivers instead of drivers originating from the operating system. Running virtual machine drivers improves performance dramat- ically on guest operating systems, such as Windows XP and Windows Server 2003.
  • Page 14: The Virtual Machine Host

    Figure 1.1 Virtualization Architecture On the left, the virtual machine host’s Domain0 is shown running the SUSE Linux op- erating system. The two virtual machines shown in the middle are running paravirtualized operating systems. The virtual machine on the right shows a fully virtual machine run- ning an unmodified operating system, such as Windows Server 2003 or Windows XP.
  • Page 15 Figure 1.2 Desktop Showing Virtual Machine Manager and Virtual Machines Introduction to Xen Virtualization...
  • Page 17: Setting Up A Virtual Machine Host

    Setting Up a Virtual Machine Host This section documents how to set up and use SUSE Linux Enterprise 11 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.
  • Page 18: Best Practices And Suggestions

    System Compo- Minimum Requirements nent 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. •...
  • Page 19: Managing Domain 0 Memory

    • 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. •...
  • Page 20: Network Card In Fully Virtualized Guests

    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.
  • Page 21 (mac 00:16:3e:54:79:a6) (model rtl8139) (type ioemu) Find more details about editing the xend configuration at Section 4.3, “Configuring a Virtual Machine by Modifying its xend Settings” (page 33). paravirtualized When not specifying a model or type, xend uses the paravirtualized network inter- face: (device (vif...
  • Page 22: Starting The Virtual Machine Host

    For more about Kdump, see also .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.
  • Page 23: Pci Pass-Through

    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.
  • Page 24 The configuration of PCI Pass-Through is twofold. First, the hypervisor must be in- formed at boot time that a PCI device should be available for reassigning. Second, the PCI device must be assigned to the VM Guest. 2.5.1 Configuring the Hypervisor for PCI Pass-Through 1 Select a device to reassign to a VM Guest.
  • Page 25: For More Information

    Adding the device while installing: During installation, add the pci line to the configuration file: pci=['06:01.0'] Hot adding PCI devices to VM Guest systems The command xm may be used to add or remove PCI devices on the fly. To Add the device with number 06:01.0 to a guest with name sles11 use: xm pci-attach sles11 06:01.0 Adding the PCI device to xend...
  • Page 26 • http://software.intel.com/en-us/articles/intel-virtualization-technology-for-directed- io-vt-d-enhancing-intel-platforms-for-efficient-virtualization-of-io-devices/ • http://www.amd.com/us-en/assets/content_type/white_pa- pers_and_tech_docs/34434.pdf Virtualization with Xen...
  • Page 27: Setting Up Virtual Machines

    Setting Up Virtual Machines A virtual machine is comprised of data and operating system files that define the virtual environment. Virtual machines are hosted and controlled by the VM Host Server. This section provides generalized instructions for installing virtual machines. Virtual machines have few if any requirements above those required to run the operating system.
  • Page 28: Creating A Virtual Machine

    3.1 Creating a Virtual Machine Before creating a virtual machine, you need the following: • Install a host server as described in Chapter 2, Setting Up a Virtual Machine Host (page 7). • If you want to use an automated installation file (AutoYaST, NetWare® Response File, or RedHat Kickstart), you should create and download it to a directory on the host machine server or make it available on the network.
  • Page 29: Installing An Operating System

    If the wizard does not appear or the vm-install command does not work, review the process of installing and starting the virtualization host server. The virtualization software might not be installed properly. 3.2 Installing an Operating System You can choose to run an installation program or choose a disk or disk image that already has an installed and bootable operating system.
  • Page 30 Figure 3.2 Summary Information about the following operating systems is included: • OES NetWare Virtual Machines, see Section 7.1, “NetWare Virtual Machines” (page 75). • OES Linux Virtual Machines, see Section 7.2, “OES Linux Virtual Machines” (page 75). • SUSE Linux Virtual Machines, see Section 7.4, “SUSE Linux Virtual Machines”...
  • Page 31 1 Select if the VM Guest should run as full or paravirtualized guest. If your computer supports hardware-assisted virtualization, you can create a vir- tual machine that runs in fully virtual mode. If you are installing an operating system that is modified for virtualization, you can create a virtual machine that runs in paravirtual mode.
  • Page 32 • File backed, which means that the virtual disk is a single image file on a larger physical disk. • A sparse image file, which means that the virtual disk is a single image file, but the space is not preallocated. •...
  • Page 33 NOTE: Using Arbitrary Bridge Names If installing a fully virtualized guest and you are using a bridge name that is different than the default names, explicitly specify the bridge by select- ing the bridge name from the Source menu on the Virtual Network Adapter page.
  • Page 34: Including Add-On Products In The Installation

    If all the information on the Summary screen is correct, click OK to create the virtual machine. A TightVNC screen appears and at this point you begin the installation of your OS. From this point on, follow the regular installation instructions for installing your OS.
  • Page 35: Using The Command Line To Create Virtual Machines

    During the installation, add the Add-On product to the installation by entering the device path. Commonly, this path looks like hd:///?device=/dev/xvd<letter>. In the special example with “xvdc” as Add-On product, this would look like: hd:///?device=/dev/xvdc 3.4 Using the Command Line to Create Virtual Machines From the command line, you can enter vm-install to run a text version of the Create Virtual Machine Wizard.
  • Page 36: Troubleshooting

    To be able to still boot the system, you must know which device is used for the root partition of your virtual system. For example, hdaxx will be changed to xvdaxx where xx is the partition number. When booting the system, append an extra root option to the kernel command line, that tells the system about its root file system.
  • Page 37 In this case you need to increase the size of the swiotlb. Add “swiotlb=128” on the Domain0 cmdline. Note that the number can be adjusted up or down to find the optimal size for the machine. Setting Up Virtual Machines...
  • Page 39: Managing A Virtualization Environment

    Managing a Virtualization Environment Graphical utilities, text-based commands, and modified configuration files are methods you can choose from to manage your virtualization environment.Virtual Machine Manager is a graphical utility available in YaST that can be launched from the virtual machine Domain0. Figure 4.1 Desktop Showing Virtual Machine Manager and Virtual Machines Managing a Virtualization Environment...
  • Page 40: Virtual Machine Manager

    From a command line interface on the virtual machine host, you can use the vm-install and xm commands to create and manage virtual machines. You can also edit configuration files to change the settings of the virtual machine host or a virtual machine.
  • Page 41 chine does not manage virtual domains, the Virtual Machine Manager first has to connect the managing domain of a Xen VM Host Server. To do this, use the following procedure: 1 Make sure that Domain0 on the VM Host Server accepts incoming SSH connec- tions.
  • Page 42: Controlling The Host By Modifying Xend Settings

    4.2 Controlling the Host by Modifying xend Settings The xend is a key component of Xen virtualization. It performs management functions and stores settings that relate to the host environment and each virtual machine. You can customize xend to meet your specific configuration requirements. •...
  • Page 43: Configuring A Virtual Machine By Modifying Its Xend Settings

    The parameters in the xend-config.sxp file can be customized to meet your re- quirements for virtualization. For a full list of all available options, read the manual page of xend-config.sxp. 4.3 Configuring a Virtual Machine by Modifying its xend Settings The machine settings of each virtual guest are stored in an internal database managed by xend.
  • Page 44: The Xm Command

    (bootloader /usr/bin/pygrub) (on_crash destroy) (uuid aa6969f3-8012-24f0-1e3a-35f150001950) (bootloader_args -q) (vcpus 2) (name sles11) (cpus (() ())) (on_reboot restart) (on_poweroff destroy) (maxmem 512) (memory 512) (shadow_memory 0) (features ) (on_xend_start ignore) (on_xend_stop ignore) (start_time 1240210933.16) (cpu_time 35.841108115) (online_vcpus 2) ..3 Delete the existing configuration from xend with the command xm del vm_name 4 Enter xm new -F filename to import the virtual machine’s new settings into xend.
  • Page 45 -b---- 16.3 SLES10 12.9 The State information tells if a machine is running, and in which state it is. The most common flags are r (running) and b (blocked) where blocked means it is either waiting for IO, or just sleeping because there is nothing to do. For more details about the state flags, see man 1 xm.
  • Page 46: Automatic Starting Of Domains

    4.5 Automatic Starting of Domains If you need automatic starting of domains at bootup, or after a crash, the xend must be configured to execute the desired behavior. There are five different situations that need to be handled. After boot of the Hypervisor Set the xend variable on_xend_start to the desired value.
  • Page 47 machine can be migrated to other machines in order to avoid interruption of service. These are only two examples, many more reasons may apply to your personal situation. Before starting, some preliminary considerations regarding the VM Host Server should be taken: •...
  • Page 48 VM Guest system. Common possibilities include: • iSCSI can be setup to give access to the same block devices from different systems http://www.novell at the same time. For more information about iSCSI, see .com/documentation/sles11/stor_admin/data/cha_inst_system _iscsi.html.
  • Page 49: Virtual Networking

    Virtual Networking All VM Guest need some means to communicate either with other VM Guest systems or with a local network. The network interface to the VM Guest system is made of a split device driver, which means, that any virtual ethernet device has a corresponding network interface in Domain0.
  • Page 50: Virtual Bridges

    5.1 Virtual Bridges When using SUSE Linux Enterprise Server the system configures one bridge for each physical network device by default. For each virtual bridge, a physical ethernet device is enslaved, and the IP address assigned to the bridge. To add a new bridge, e.g. after installing an additional ethernet device, or to create a bridge that is not connected to a real network, proceed as follows: 1 Start yast2 >...
  • Page 51 Systems that are not aware of paravirtualized hardware, may not have this option. To connect systems to a network that can only run fully virtualized, several emulated net- work interfaces are available. The following emulations are at your disposal: • Realtek 8139 (PCI). This is the default emulated network card. •...
  • Page 52: Special Configurations

    overview about which interface is connected to which bridge, run the command brctl show. The output may look like the following: # brctl show bridge name bridge id STP enabled interfaces 8000.001cc0309083 eth0 vif2.1 8000.000476f060cc eth1 vif2.0 8000.000000000000 In this example, there are three bridges configured: br0, br1 and br2. Currently, br0 and br1 each have a real ethernet device added: eth0 and eth1 respectively.
  • Page 53 In the configuration file, first search for the device that is connected to the virtual bridge. The configuration looks like the following: (device (vif (bridge br0) (mac 00:16:3e:4f:94:a9) (backend 0) (uuid bf840a86-6aa9-62df-f8df-a7cf8c192c24) (script /etc/xen/scripts/vif-bridge) To add a maximum transfer rate, add a parameter rate to this configuration as in: (device (vif (bridge br0)
  • Page 54 5.3.2 Monitoring the Network Traffic To monitor the traffic on a specific interface, the little application iftop is a nice program that displays the current network traffic in a terminal. When running a Xen VM Host Server, you have to define the interface that is monitored. The interface that Domain0 uses to get access to the physical network is the bridge de- vice, e.g.
  • Page 55 To configure a bonding device, use the following procedure: 1 Run YaST > Network Devices > Network Settings. 2 Use Add and change the Device Type to Bond. Proceed with Next. 3 Select how to assign the IP address to the bonding device. Three methods are at your disposal: •...
  • Page 56 • balance-xor • broadcast • 802.3ad • balance-tlb • balance-alb 6 Make sure that the parameter miimon=100 is added to the Bond Driver Options. Without this parameter, the data integrity is not checked regularly. 7 Click on Next and leave YaST with Ok to create the device. All modes, and lots of more options are explained in detail in the Linux Ethernet Bonding Driver HOWTO found at /usr/src/linux/Documentation/ networking/bonding.txt after installing the package kernel-source.
  • Page 57: Virtualization: Configuration Options And Settings

    It is provided as a courtesy and does not imply that all documented options and tasks are supported by Novell, Inc. 6.1 Updating SLE 10 VM Host Server...
  • Page 58: Networking Configuration

    6.1.2 Networking Configuration After the upgrade, networking is not configured correctly. This is due to a change in how networking for Xen is done between SUSE Linux Enterprise 10 and SUSE Linux Enterprise 11. You will need to delete the existing card configuration and manually create a new network bridge, adding that card to the bridge.
  • Page 59: Virtual Cd Readers

    Section 6.2.3, “Adding Virtual CD Readers” (page 50). The most recent Virtual Machine Manager package is available through the http://www.novell SUSE Linux Enterprise Server 11 update channel or at .com/products/vmdriverpack/. 6.2.1 Virtual CD Readers on Paravirtual Machines A paravirtual machine can have up to 100 block devices comprised of virtual CD readers and virtual disks.
  • Page 60 If several CDs are needed for the installation of an operating system, make all of them available to the paravirtual machine and change the path to the data on request. If you do not have enough CD readers, create image files from the CDs and make those available.
  • Page 61 4 Select the virtual machine, then click Details. 5 Click Add and select Storage Device. 6 Click Normal Disk Partition if you want to specify the path to a physical CD reader, such as /dev/cdrom. 7 Click Simple File if you are adding a virtual CD reader based on an ISO. Specify the path to the ISO image file in File Location.
  • Page 62 6.2.4 Adding Virtual CD Readers (Command Line Method) 1 Make sure that the virtual machine is running and the operating system has fin- ished booting. 2 Insert the CD into the physical CD reader or copy the ISO image to the host. 3 In a terminal on the host, enter the appropriate command •...
  • Page 63: Remote Access Methods

    The CD or ISO image file should appear in the virtual machine’s operating system. 6.2.5 Removing Virtual CD Readers 1 Make sure that the virtual machine is running and the operating system has fin- ished booting. 2 If the virtual CD reader is mounted, unmount it from within the virtual machine. You can enter cat /proc/partitions in the virtual machine’s termi- nal to view its block devices.
  • Page 64: Vnc Viewer

    Graphical Desktop with X Window Server If a graphical desktop, such as GNOME or KDE, is installed on the virtual machine host you can use a remote viewer, such as a VNC viewer. On a remote computer, log in and manage the host environment by using graphical tools, such as Virtual Machine Manager.
  • Page 65 To use the VNC viewer from a remote computer, the firewall must permit access to as many ports as VM Guest systems run from port 5900 and up. For example, if you want to run 10 VM Guest systems, you will have to open the tcp ports 5900:5910. In addition to this, change vnc-listen in /etc/xen/xend-config.sxp to open the access to the VM Guest.
  • Page 66 When successfully connected, the VNC viewer shows the display of the running virtual machine. 6.4.1 Assigning VNC Viewer Port Numbers to Virtual Machines Although the default behavior of VNC viewer is to assign the first available port number, you might want to assign a specific VNC viewer port number to a specific virtual ma- chine.
  • Page 67: The Boot Loader Program

    • If it is a fully virtual machine, use vnc=0 and sdl=1. • If it is a paravirtual virtual machine, use vfb=["type=sdl"]. Remember that, unlike a VNC viewer window, closing an SDL window terminates the virtual machine. 6.5 The Boot Loader Program The boot loader controls how the virtualization software boots and runs.
  • Page 68 Figure 6.3 Boot Loader Settings: Section Management You can use the Boot Loader program to specify functionality, such as: • Pass kernel command line parameters • Specify the kernel image and initial RAM disk • Select a specific hypervisor • Pass additional parameters to the hypervisor (see /usr/share/doc/packages/ xen/pdf/user.pdf section “Xen Boot Options”...
  • Page 69 Example 6.1 Xen Section in the menu.lst File (Typical) title XEN root (hd0,5) kernel /boot/xen.gz hyper_parameters module /boot/vmlinuz-xen kernel_parameters module /boot/initrd-xen The title line defines sections in the boot loader file. Do not change this line, because YaST looks for the word XEN to verify that packages are installed. The root line specifies which partition holds the boot partition and /boot directory.
  • Page 70: Virtual Machine Initial Startup Files

    6.6 Virtual Machine Initial Startup Files During the process of creating a new virtual machine, initial startup settings are written to a file created at /etc/xen/vm/. During the creation process, the virtual machine starts according to settings in this file, but the settings are then transferred and stored in xend for ongoing operations.
  • Page 71 Entry Description disk = [ 'file:/var/lib/xen/images/VM1_SLES10/hda,xvda,w' This entry specifies a virtual disk based on a file ( file:) named hda and located at /var/lib/xen/images/VM1_SLES10/. It presents itself as the first drive (xvda) and has read/write access (w). Disks can also be based on a block device. memory = Virtual memory in Mb.
  • Page 72: Sparse Image Files And Disk Space

    Entry Description bootentry = Location of the kernel and initial ramdisk. ostype = Type of operating system. uuid = Identification number for a virtual drive. 6.7 Sparse Image Files and Disk Space If the host’s physical disk reaches a state where it has no available space, a virtual ma- chine using a virtual disk based on a sparse image file is unable to write to its disk.
  • Page 73: Virtual Keyboards

    The resizing of the file system inside the sparse file involves tools that are depending on the actual file system. This is described in detail in the Storage Administration Guide, http://www.novell.com/documentation/sles11/stor_admin/ found at data/bookinfo.html. 6.8 Virtual Keyboards When a virtual machine is started, the host creates a virtual keyboard that matches the keymap entry according to the virtual machine’s settings.
  • Page 74 In the device > vfb section, add the desired keymap entry to the file /etc/xen/ xend-config.sxp. For example, you can specify a German keyboard. Make sure the virtual machine’s operating system is set to use the specified keyboard. After you specify the host’s keymap setting, all virtual machines created by using the Create Virtual Machine Wizard on the host add the host’s keymap entry to their virtual machine settings.
  • Page 75: Mapping Physical Storage To Virtual Disks

    Language Keymap Setting Icelandic Italian Japanese Dutch Dutch-Belgium nl-be Norwegian Polish Portuguese Portuguese-Brazil pt-br Russian Swedish 6.9 Mapping Physical Storage to Virtual Disks To specify a mapping between physical storage and the virtual disk, you might need to edit the virtual machine’s disk information. Follow the instructions in Section 4.3, “Configuring a Virtual Machine by Modifying its xend Settings”...
  • Page 76 Example 6.2 Example: Virtual Machine Output from Xend (vbd (dev xvda:disk) (uname file:/var/lib/xen/images/sles11/disk0) (mode w) (type disk) (backend 0) Table 6.3 uname Settings Protocol Description Example phy: Block devices, such as a physical disk, phy:/dev/sdc in domain 0 file: Raw disk images accessed by using file:/path/file loopback tap:aio:...
  • Page 77: Virtual Disks

    6.10 Virtual Disks Virtual disks can be based on the following types of physical devices and files. Each type includes an example statement. • A physical disk device, such as a DVD, that is accessible as a device to the host. phy:/dev/cdrom •...
  • Page 78: Passing Key Combinations To Virtual Machines

    a host running a 64-bit hypervisor. If any of the pieces do not match exactly, migration will fail. Another requirement is, that the involved file systems are available on both machines. The options to accomplish this task include Network Block Devices (NBD), iSCSI, NFS, drbd and fiber channel devices.
  • Page 79: Xm Block-List Device Numbers

    6.13 xm block-list Device Numbers Virtual devices are named internally in Xen using the Linux-style major and minor numbers. This is true even for non-Linux virtual machines. The number returned from xm block-list is a decimal representation of the combined major and minor numbers.
  • Page 80: Saving Virtual Machines

    To simultaneously run more file-backed virtual disks on a host, you can increase the number of available loopback devices by adding the following option to the host’s /etc/modprobe.conf.local file. options loop max_loop=x where x is the maximum number of loopback devices to create. Changes take effect after the module is reloaded.
  • Page 81: Restoring Virtual Machines

    Procedure 6.2 Save a Virtual Machine’s Current State (Virtual Machine Manager) 1 Make sure the virtual machine to be saved is running. 2 Select the virtual machine. 3 Click Open to view the virtual machine console or Details to view virtual machine information.
  • Page 82: Virtual Machine States

    Procedure 6.4 Restore a Virtual Machine’s Current State (Virtual Machine Manager) 1 Make sure the virtual machine to be restored has not been started since you ran the save operation. 2 Run Virtual Machine Manager. 3 Select the hypervisor that should restore the virtual machine. On the local machine, this is localhost.
  • Page 83 • b - blocked - The virtual machine’s processor is not running and not able to run. It is either waiting for I/O or has stopped working. • p - paused - The virtual machine is paused. It does not interact with the hypervisor but still maintains its allocated resources, such as memory.
  • Page 85: Xen Guest Systems

    Xen Guest Systems 7.1 NetWare Virtual Machines In Novell® Open Enterprise Server (OES) 2, the NetWare® operating system has been modified to run in paravirtual mode on a Xen virtual machine. The documentation of OES Netware virtual machines is discussed in a separate docu- http://www.novell.com/...
  • Page 86 8.2, “Loading the Driver Pack” (page 87). 2 Install the package vmdp-xen-<operating_system> with YaST. The iso image of the driver pack is copied to /opt/novell/vm-driver-pack/ xen. 3 Add the iso image as CD drive to your VM Guest as described in Section 6.2,...
  • Page 87: Suse Linux Virtual Machines

    5 Install the virtual machine driver pack with the command: rpm -Uhv --nodeps kmod-vmdp-version Take care to use the correct version of the virtual machine driver pack for your system. 6 Reboot the VM Guest system. 7.4 SUSE Linux Virtual Machines On current SUSE Linux Enterprise systems, Xen is fully integrated into the product.
  • Page 88 7.4.1 Updating SLE 10 Virtual Machines to SLE 11 Typically, the guest operating system on a virtual machine can be updated using the same procedures as if running on a physical machine. However, SLE 10 virtual machines created on a SLE 10 host need to be updated to SLE 11 by recreating the virtual machine from the settings stored in the virtual machine’s configuration file.
  • Page 89 6 Choose the selection to install an operating system. 7 Specify the same settings for the new virtual machine as the settings specified in the VM’s configuration. Make sure the following settings in Virtual Machine Manager match those in the VM’s configuration file. •...
  • Page 90 13 If you receive a message stating that an error occurred while installing GRUB, click OK. 14 If you receive a message stating that an error occurred during boot loader in- stallation, click No. 15 Continue the installation/update by following the instructions on the screen. The installation program continues by booting the virtual machine and display- ing the rest of the installation in text mode.
  • Page 91 Because paravirtual machines present removable media, such as a CD inserted in the CD reader, as a non-removable disk device, the Add-On Product program does not recognize inserted CD as valid add-on product media. To use the Add-On Products program on a paravirtual machine, you must set up the add-on product media as a network installation source or copy the ISO image file to the virtual machine’s filesystem.
  • Page 92 cat /proc/sys/xen/independent_wallclock • 0 means that the virtual machine is getting its time from the host and is not using independent wallclock. • 1 means that the virtual machine is using independent wallclock and manag- ing its time independently from the host. Procedure 7.2 Permanently Changing the Independent Wallclock Setting 1 Log in to the virtual machine environment as root.
  • Page 93 /srv/ftp. Create this directory manually, if it does not exist already. 1 Get the latest kernel package for your system from the Novell Customer Center. 2 Create a directory for executables in your home directory: mkdir -p $HOME/bin 3 Copy the script create_update_source.sh from http://www.suse...
  • Page 94: Windows Virtual Machines

    6 Copy all updated packages to the directory /srv/ftp/updates/suse/ <arch>/. 7 Run the following commands to make all the new packages known to the instal- lation source: cd /srv/ftp/updates/suse; perl /usr/bin/create_package_descr -x setup/descr/EXTRA_PROV 8 Create the checksums needed for the installation process with the commands: cd /srv/ftp/updates/suse/setup/descr for i in *;...
  • Page 95: Virtual Machine Drivers

    Virtual Machine Drivers SUSE® Linux Enterprise Virtual Machine Driver Pack contains disk and network device drivers for a number of third-party operating systems in order to enable the high-perfor- mance hosting of these unmodified guest operating systems on top of SUSE Linux Enterprise Server 11 (SLES 11).
  • Page 96: Buying A Support Subscription

    8.1 Buying a Support Subscription The customer support you receive for the SUSE Linux Enterprise Virtual Machine Driver Pack is at the same level as your SUSE Linux Enterprise support subscription [http://support.novell.com/linux/sles_support.html]. You can choose the following levels of support: • Basic •...
  • Page 97: Loading The Driver Pack

    8 Select the drivers you want to install, then click Accept. 9 When asked if you want to install more packages, click No. The drivers are now on your system in the /opt/novell/vm-driver-pack directory. 8.3 SUSE Drivers for Red Hat...
  • Page 98 8.3.1 Installing the RHEL 4 Drivers 1 Open a terminal. 2 Locate the RPM package you want to install ( opt/novell/ vm-driver-pack). If you are installing from the binary RPM included with the driver pack, the RPM is located on the driver pack ISO. .
  • Page 99 9 Open the virtual machine configuration file located on the virtualization host server ( /etc/xen/vm/vm_cfgfile where vm_cfgfile is usually the same as the name of the virtual machine). 10 Remove all parameters from the vif= line except the mac=mac_address parameter. Make sure to leave the single quotes. For example, change the line vif=[ 'mac=00:16:3e:55:24:21,model=pcnet,type=ioemu', ] vif=[ 'mac=00:16:3e:55:24:21', ]...
  • Page 100 8.3.3 Upgrading the RHEL 4 Drivers 1 Open a terminal. 2 Locate the RPM package you want to install ( opt/novell/ vm-driver-pack). If you are installing from the binary RPM included with the driver pack, the RPM is located on the driver pack ISO. Refer to Section 6.2, “Virtual CD Readers”...
  • Page 101 8.3.5 Building Your Own RPMs If you do not have a driver pack that was built for your Linux kernel, you can build your own SUSE Drivers for Red Hat Enterprise Linux 4 on Xen RPM. 1 Open a terminal. 2 Mount the driver pack ISO.
  • Page 102 3d Edit the /boot/grub/menu.lst file and make the following changes: • Set the default= xxx (where xxx is the old boot entry) to default=0, which is the boot entry with the latest initrd. • For each drive specified in the virtual machine configuration file (for example, hda and hdb), append hdx=noprobe to the kernel line for the updated kernel, where hdx is the drive specification found in the virtual machine configuration file.
  • Page 103 9 Restart the virtual machine. 8.4.2 Uninstalling the RHEL 5 Drivers 1 Open a terminal. 2 Enter rpm -e kmod-vmdp-rhel5- xxx , where xxx is the version of the installed driver pack. Enter rpm -qa | grep vmdp to find out what you have installed. 3 Edit the /boot/grub/menu.lst and make the following changes: •...
  • Page 104 8.4.4 Using the Drivers with an Upgraded Kernel 1 Install the kernel. IMPORTANT Do not reboot the virtual machine. 2 Before rebooting the virtual machine, make sure all the following directories are present in /lib/modules/xxx/weak-updates/vmdp (where xxx is the new kernel version): •...
  • Page 105: Suse Drivers For Windows On Xen

    If a security alert appears, indicating the Bus driver has not been properly signed, click Yes to install the Bus driver software. It is important that you do not click No. The Novell Virtual Device Driver Installer launches. Virtual Machine Drivers...
  • Page 106 4 Click Next. The End User License Agreement window appears. 5 Click I accept this agreement, then click Next. A software installation note appears, indicating that the software has not passed Windows logo testing. If you are installing Windows XP or Windows Server 2003, you see the fol- lowing: Virtualization with Xen...
  • Page 107 If you are installing Windows 2000, you see the following: 6 Click Continue Anyway or click Yes for each occurrence of this window. A Congratulations window indicates that the drivers were installed. Virtual Machine Drivers...
  • Page 108 NOTE Clicking Cancel on this screen does not cancel the installation. If you want to cancel, you have to uninstall (see Section 8.5.1, “Uninstalling the Driver Pack” (page 100)). 7 Click Finish. A message appears, indicating that you must restart the system. 8 Click Yes.
  • Page 109 10 Click Install the Software Automatically, then click Next. A software installation note appears, indicating that the software has not passed Windows logo testing. If you are installing Windows XP or Windows Server 2003, you see the fol- lowing: If you are installing Windows 2000, you see the following: Virtual Machine Drivers...
  • Page 110 13 If you are installing the Windows 2000 Server, you must reboot the system again. 8.5.1 Uninstalling the Driver Pack 1 Make sure the installation CD is detached from the virtual machine. 2 Browse to c:\Program Files\Novell\XenDrv. Virtualization with Xen...
  • Page 111 3 Double-click uninstall.exe. You will be prompted to reboot the system. 4 Close all applications that are running and click OK. The system restarts. The Found New Hardware Wizard appears, indicating that new hardware has been found. 5 Click Yes, this time only, then click Next. The wizard asks to install software for the PCI Device.
  • Page 112 8.5.3 Recovering from a Catastrophic Failure In the event of a catastrophic failure caused by the driver pack, you can safely remove the driver pack and return to your previous system configuration. 1 Shut down the virtual machine and reboot in safe mode. 2 Uninstall the driver pack (see Section 8.5.1, “Uninstalling the Driver Pack”...
  • Page 113 8.6 SUSE Drivers for SUSE Linux Enterprise Server on Xen The drivers for SUSE Linux Enterprise 11 and later are included in the distribution. In this case, no extra driver pack is necessary. The supported guest systems are SUSE Linux Enterprise Server 9 SP4 or later. 8.6.1 Virtual Network Card in HVM Guests To configure a paravirtualized network interface for a fully virtualized VM Guest system, the xend settings must be modified.
  • Page 114 4 Add the configuration to the xend again and the VM Guest. The first time the virtual machine boots, you might see a message indicating that new hardware was found. This message can be safely canceled. 8.6.2 Configuring the Virtual Network Card 1 Run YaST.
  • Page 115 SXP Configuration Options The Xend can read and write all of its configurations in a semi-structured form, also called “S-expression”. These expressions are either standalone, or have another expres- sion as argument. For example, to define that a VM Guest has 2 CPUs available, the expression would look like: (domain (vcpus 2)
  • Page 116 domain (5) domain — Top Xend VM Guest SXP Configuration Element Synopsis (domain { bootloader | bootloader_args | cpus |cpu_time | device | features | image | maxmem | memory | name | online_vcpus | on_crash | on_poweroff | on_reboot | on_xend_start | on_xend_stop | shadow_memory | start_time | status | store_mfn | uuid | vcpus }) The top level element of each VM Guest configuration is “(domain)”.
  • Page 117 (cpu_time 59.157413326) device (device { console | pci | vbd | vfb | vif | vkbd }) All devices that are presented to the VM Guest start with the element “device” 1 console (console { location | protocol | uuid }) Defines the console that can be accessed with xm console id.
  • Page 118 2 pci (pci { dev | uuid }) Defines the device of a PCI device that is dedicated to the given VM Guest. The PCI device number is organized as [[[[domain]:]bus]:][slot][.[func]]. 2.1 dev (dev { bus | domain | func | slot | uuid | vslt }) Defines the path to the PCI device that is dedicated to the given VM Guest.
  • Page 119 2.2 uuid Unique identifier for this device. Example: (uuid 9bef35d3-17c6-ac75-ac28-1aecb1cb509d) 3 vbd (vbd { backend | bootable | dev | mode | protocol | uname | uuid | VDI }) Defines a virtual block device. 3.1 backend All paravirtualized virtual devices are implemented by a “split device driver”. This expression defines the domain that holds the backend device that the frontend device of the current VM Guest should connect to.
  • Page 120 3.6 uname Defines where the virtual block device really stores its data. See also Section 6.9, “Mapping Physical Storage to Virtual Disks” (page 65). Example: (uname file:/var/lib/xen/images/sles11/disk1) 3.7 uuid Unique identifier for the current virtual block device. Example: (uuid 7892de3d-2713-a48f-c3ba-54a7574e283b) 3.8 VDI Defines if the current virtual block device is a virtual disk image (VDI).
  • Page 121 4.3 type Defines whether to use VNC or SDL. VNC will only provide a server that has to be connected from a client. SDL provides a display that is started on creation of the VM Guest. Example: (type vnc) 4.4 uuid Unique identifier for the current virtual frame buffer device.
  • Page 122 5.2 bridge Defines the bridge where the virtual network interface should connect to. Example: (bridge br0) 5.3 mac Defines the mac address of the virtual network interface. The mac addresses reserved for Xen virtual network interfaces look like 00:16:3E:xx:xx:xx. Example: (mac 00:16:3e:32:e7:81) 5.4 model When using emulated IO, this defines the network interface that should be presented...
  • Page 123 6.1 backend Defines the backend domain that is used for paravirtualized keyboard interfaces. Exam- ple: (backend 0) image (image { linux | HVM }) This is the container for the main machine configuration. The actual image type is one of linux, or HVM for fully virtualized guests. HVM is only available if your computer supports VMX and also activates this feature during boot.
  • Page 124 1.4 notes Displays several settings and features available to the current VM Guest. 2 hvm (hvm { acpi | apic | boot | device_model | extid | guest_os_type | hap | hpet | isa | kernel | keymap | loader | localtime | monitor | nographic | notes | pae | pci | rtc_timeoffset | serial | stdvga | timer_mode | usb | usbdevice | vnc | vncunused | xauthority }) The hvm image definition is used for all fully virtualized installations.
  • Page 125 (extid 1) 2.6 guest_os_type Defines the guest operating system type. Allowed values are default, linux, and windows. Currently, this has only an effect on Itanium systems. Example: (guest_os_type default) 2.7 hap Defines if hardware assisted paging should be enabled. Enabled with value 1, disabled with value 0.
  • Page 126 2.12 loader Defines the path to the hvm boot loader. Example: (loader /usr/lib/xen/boot/hvmloader) 2.13 localtime Defines if the emulated RTC uses the local time. Example: (localtime 1) 2.14 monitor Defines if the device model (e.g. qemu-dm) should use monitor. Use Ctrl + Alt + 2 in the VNC viewer to connect to the monitor.
  • Page 127 2.19 rtc_timeoffset Defines the offset between local time and hardware clock. Example: (rtc_timeoffset 3600) 2.20 serial Defines Domain0 serial device that will be connected to the hvm VM Guest. To connect /dev/ttyS0 of Domain0 to the hvm VM Guest, use: (serial /dev/ttyS0) 2.21 stdvga Defines if a standard vga (cirrus logic) device should be used.
  • Page 128 2.26 vncunused If not set to 0, this option enables the VNC server on the first unused port above 5900. (vncunused 1) 2.27 xauthority When using SDL, the specified file is used to define access rights. If not set, the value from the XAUTHORITY environment variable is used.
  • Page 129 on_crash (on_crash { coredump-destroy | coredump-restart | destroy | preserve | rename-restart | restart }) Defines the behavior after a domain exits because of a “crash”. 1 coredump-destroy Dump the core of the VM Guest before destroying it. Example: (on_crash coredump-destroy) 2 coredump-restart Dump the core of the VM Guest before restarting it.
  • Page 130 (on_crash restart) on_poweroff (on_poweroff { destroy | preserve | rename-restart | rename }) Defines the behavior after a domain exits because of a restart. For the details about the available parameters, see the section called “on_crash” (page 119). on_reboot (on_reboot { destroy | preserve | rename-restart | rename }) Defines the behavior after a domain exits because of a reboot.
  • Page 131 start_time Time in seconds when the VM Guest was started. Example: (start_time 1236325777.38) status Lists the current state of the VM Guest. The VM Guest is stopped. The VM Guest is suspended. The VM Guest is running. Example: (status 0) store_mfn Number of shared pages for the current VM Guest.

This manual is also suitable for:

Linux enterprise server 11 suse

Table of Contents