background image

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. For more information about modifying

xend-config.sxp

see

Section 4.2, “Controlling the Host by Modifying xend Set-

tings”

(page 32).

To access the virtual machine from the local console running a VNC viewer client,
enter one of the following commands:

vncviewer ::590#

vncviewer :#

#

is the VNC viewer port number assigned to the virtual machine.

When accessing the VM Guest from a machine other than Domain0, use the following
syntax:

vncviewer 192.168.3.100::590#

In this case, the IP address of Domain0 is 192.168.3.100.

If you are using the java VNC server, use

580#

as the port number, where

#

is the

VNC viewer port number assigned to the virtual machine.

Figure 6.1

Mozilla Firefox VNC Viewer

Virtualization: Configuration Options and Settings

55

Summary of Contents for LINUX ENTERPRISE SERVER 11 - VIRTUALIZATION

Page 1: ...SUSE Linux Enterprise Server www novell com 11 May 27 2009 Virtualization with Xen ...

Page 2: ...es 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 For Novell trademarks see the Novell Trademark and Service Mark list http www novell com company legal trademarks tmlist html Linux is a registered trademark of Linus Torvald...

Page 3: ...ork Card in Fully Virtualized Guests 10 2 4 Starting the Virtual Machine Host 12 2 5 PCI Pass Through 13 3 Setting Up Virtual Machines 17 3 1 Creating a Virtual Machine 18 3 2 Installing an Operating System 19 3 3 Including Add On Products in the Installation 24 3 4 Using the Command Line to Create Virtual Machines 25 3 5 Deleting Virtual Machines 25 3 6 Using an Existing SUSE Linux Enterprise Ser...

Page 4: ... Startup Files 60 6 7 Sparse Image Files and Disk Space 62 6 8 Virtual Keyboards 63 6 9 Mapping Physical Storage to Virtual Disks 65 6 10 Virtual Disks 67 6 11 Migrating Virtual Machines 67 6 12 Passing Key Combinations to Virtual Machines 68 6 13 xm block list Device Numbers 69 6 14 File Backed Virtual Disks and Loopback Devices 69 6 15 Saving Virtual Machines 70 6 16 Restoring Virtual Machines 7...

Page 5: ...8 4 SUSE Drivers for Red Hat Enterprise Linux 5 on Xen 91 8 5 SUSE Drivers for Windows on Xen 95 8 6 SUSE Drivers for SUSE Linux Enterprise Server on Xen 103 A SXP Configuration Options 105 ...

Page 6: ......

Page 7: ...er questions about installation or configuration make reliable security updates available and support development projects Documentation regarding the Open Enterprise Server 2 is found at http www novell com documentation oes2 index html 1 Available Documentation We provide HTML and PDF versions of our books in different languages The following manuals for users and administrators are available on...

Page 8: ... of application and installation types of each of the platforms supported by SUSE Linux Enterprise Server as well as a short description of the installation procedure Storage Administration Guide Provides information about how to manage storage devices on a SUSE Linux En terprise Server In addition to the comprehensive manuals several quick start guides are available Installation Quick Start Insta...

Page 9: ...lease use the User Comments feature at the bottom of each page of the online documentation and enter your comments there 3 Documentation Conventions The following typographical conventions are used in this manual etc passwd directory names and filenames placeholder replace placeholder with the actual value PATH the environment variable PATH ls help commands options and parameters user users or gro...

Page 10: ... Dancing Penguins Chapter Penguins Another Manual This is a reference to a chapter in another manual x Virtualization with Xen ...

Page 11: ...r the Domain0 any number of other VM Guests and the tools commands and configu ration files that let you manage virtualization Collectively the physical computer run ning all these components is referred to as a VM Host Server because together these components form a platform for hosting virtual machines The Xen Hypervisor The Xen hypervisor sometimes referred to generically as a virtual machine m...

Page 12: ...ll virtualization mode Xen Based Virtual Machines A Xen based virtual machine also referred to as a VM Guest or DomU consists of the following components At least one virtual disk that contains a bootable operating system The virtual disk can be based on a file partition volume or other type of block device Virtual machine configuration information which can be modified by exporting a text based c...

Page 13: ...ual mode does not require the host computer to support hardware assisted virtualization technology but does require the guest operating system to be modified for the virtualization environment Typically operating systems running in paravir tual mode enjoy better performance than those requiring full virtualization mode Operating systems currently modified to run in paravirtual mode are referred to...

Page 14: ...03 or Windows XP 1 4 The Virtual Machine Host After you install the virtualization components and reboot the computer the GRUB boot loader menu displays a Xen menu option Selecting the Xen menu option loads the Xen hypervisor and starts the Domain0 running the SUSE Linux operating system Running on Domain0 the SUSE Linux operating system displays the installed text console or desktop environment s...

Page 15: ...Figure 1 2 Desktop Showing Virtual Machine Manager and Virtual Machines Introduction to Xen Virtualization 5 ...

Page 16: ......

Page 17: ...anned 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 Requ...

Page 18: ...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 The installation can also be performed with YaST using the module Virtualization Install Hypervisor and Tools After the Xen software is installed restart the computer Updat...

Page 19: ... for OCFS2 default timeouts in SP2 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 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 amou...

Page 20: ...lized 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 only the paravirtuali...

Page 21: ...e br0 mac 00 16 3e 50 66 a4 script etc xen scripts vif bridge uuid 0a94b603 8b90 3ba8 bd1a ac940c326514 backend 0 emulated and paravirtualized If the administrator should be offered both options simply specify both type and model The xend configuration would look like device vif bridge br0 uuid e2b8f872 88c7 0a4a b965 82f7d5bdd31e devid 0 mac 00 16 3e 54 79 a6 model rtl8139 type netfront In this c...

Page 22: ...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 lin...

Page 23: ...ugh To take full advantage of VM Guest systems it is sometimes necessary to assign spe cific PCI devices to a dedicated domain When using fully virtualized guests this functionality is only available if the chipset of the system supports this feature and if it is activated from the BIOS This feature is available from both AMD and Intel For AMD machines the feature is called IOMMU in Intel speak th...

Page 24: ...t Corporation DECchip 21142 43 rev 41 In this case the PCI number is 06 01 0 2 Run yast System Boot Loader 3 Select the Xen section and press Edit 4 Add the PCI number to the Optional Kernel Command Line Parameter line pciback hide 06 01 0 5 When preparing for fully virtualized guests add the parameter iommu 1 to Additional Xen Hypervisor Parameters 6 Press Ok and finish YaST 7 Reboot the system 8...

Page 25: ... slot 0x01 domain 0x0 bus 0x06 vslt 0x0 func 0x0 For more information about modifying the xend database see Section 4 3 Con figuring a Virtual Machine by Modifying its xend Settings page 33 After assigning the PCI device to the VM Guest the guest system must care for the configuration and device drivers for this device 2 5 3 For More Information PCI Pass Through is a new technology However there a...

Page 26: ...icles 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 16 Virtualization with Xen ...

Page 27: ...rtualization mode and requires specific device drivers to be loaded The hardware that is presented to the VM Guest depends on the configuration of the Xend You should be aware of any licensing issues related to running a single licensed copy of an operating system on multiple virtual machines Consult the operating system license agreement for more information NOTE Virtual Machine Architectures The...

Page 28: ...g the Installation Sources Chapter 14 Remote Installation Deployment Guide For further prerequisites consult the manuals of the respective operating system to in stall The Create Virtual Machine Wizard YaST Virtualization Create Virtual Machines helps you through the steps required to create a virtual machine and install its operating system The information that follows is generalized for installi...

Page 29: ...n installed and bootable operating system Figure 3 1 Installing an Operating System If you choose to run an installation program you are presented with a list of operating systems Select the one you want to install The Summary page shows you a summary of the virtual machine you are creating You can click on any of the headings to edit the information As you edit the information in the Summary cons...

Page 30: ...e 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 77 Windows Virtual Machines see Section 7 5 Windows Virtual Machines page 84 When running through the creation of a VM Guest the following steps have to be ac complished 20 Virtualization with Xen ...

Page 31: ...and number of virtual processors for your virtual machine Initial Memory The amount of memory initially allocated to the virtual machine specified in megabytes Maximum Memory The largest amount of memory the virtual machine will ever need Virtual Processors If desired you can specify that the virtual machine has more virtual CPUs than the number of physical CPUs You can specify up to 32 virtual CP...

Page 32: ...uire ments 6 If you want to install from DVD or CD Rom add the drive to the list of available hard disks To learn about device names of the available optical drives run hwinfo cdrom and search for the line starting with Device File Add this device file to the available hard disks of the VM Guest Instead of the real dvd or CD Rom drive you can also add the ISO image of an installation medium For mo...

Page 33: ...he virtual machine cannot access the CD or any other newly inserted CD and receives I O errors WARNING Changing CD Roms On paravirtual guests it is currently not possible to go on with the instal lation of a system after changing the CD Rom Instead you should use a DVD or a network based installation For a workaround to this problem see Section 6 2 1 Virtual CD Readers on Paravirtual Machines page...

Page 34: ...stem are out of sync due to different mouse acceleration values To still be able to use the YaST installation system the mouse pointer should be locked into TightVNC with the keycombination Ctrl Alt 3 3 Including Add On Products in the Installation In order to include an Add On product in the installation process of a VM Guest it is necessary to provide the installation system with both the standa...

Page 35: ...he man pages of vm install and vm install jobs 3 5 Deleting Virtual Machines When you use Virtual Machine Manager or the xm command to delete a virtual machine it no longer appears as a virtual machine but its initial startup file and virtual disks are not automatically deleted To delete all components of a virtual machine configured with a file backed virtual disk you must manually delete its vir...

Page 36: ...initrd 1 Start the VM Guest with the extra root command line as explained above 2 Log into the system as user root 3 Edit the file etc fstab and correct all device entries 4 Edit the virtual machine s boot grub menu lst file At the kernel line fix the root and the resume parameters according the new naming schema 5 Reboot the virtual machine 3 7 Troubleshooting In some circumstances problems may o...

Page 37: ... 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 27 ...

Page 38: ......

Page 39: ...iles 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 29 ...

Page 40: ... then secured either with an SSL TLS with x509 certificate or with a tunnel over SSH NOTE 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 Figure 4 2 Virtual Machine Manager Main Console When starting the Virtual Machine Manager locally on the controlling Domain0 it is directly co...

Page 41: ...r root access on the controlling Domain0 For more details see Section SSH Authentication Mechanisms Chapter 14 SSH Secure Network Operations Security Guide When connected to a controlling Domain0 the Virtual Machine Manager offers several configuration possibilities Selecting a virtual machine and clicking Open displays the virtual machine window showing the virtual machine s current state Clickin...

Page 42: ...e configuration is appropriate for an installation that utilizes a bridged network configuration Access to xend via http is disabled Commented out entries show the default for that entry unless otherwise specified logfile var log xen xend log loglevel DEBUG The Xen API server configuration This value configures the ports interfaces and access controls for the Xen API server Each entry in the list ...

Page 43: ...le back into xend and restart the virtual machine Some commonly used configurations can be done online with the xm command These include the attachment or detachment of virtual block network or pci devices For more details see the manual page of xm NOTE It is no longer recommended that you edit the initial startup files stored in etc xen vm because they are used only during the creation of a new v...

Page 44: ...settings into xend 5 Enter xm start vm_name to start the virtual machine with its new settings You should repeat the entire process of exporting the file each time you want to make changes to a virtual machine s settings 4 4 The xm Command The xm command provides a command line interface for managing virtual machines It can be used to create pause and shut down virtual machines It can also be used...

Page 45: ...oy immediately terminates a virtual machine xm block list displays all virtual block devices attached to a virtual machine All xm operations require that the Xen control daemon xend be running For this reason you should make sure xend starts whenever the host boots Most xm commands require root privileges to allow interaction with the Xen hyper visor Entering the xm command when you are not logged...

Page 46: ...utdown When rebooting the VM Guest Xend has control about what to do when a VM Guest does a reboot By default it is restart the guest just as one would expect on_reboot restart During poweroff of a VM Guest When a guest is shut off the xend by default destroys the guest without shutting it down on_poweroff destroy After a crash of the VM Guest After a VM Guest crashes the xend can restart the gues...

Page 47: ...s Using special features like pciback may be problematic Do not implement these when deploying for an environment that should migrate VM Guest systems between different VM Host Server systems For fast migrations a fast network is mandatory If possible use gigabit ethernet and fast Switches Deploying vlan might also help avoiding collisions 4 6 1 Configuring Xend for Migrations To prepare a VM Host...

Page 48: ...r 25 Sharing File Systems with NFS Administration Guide DRBD can be used if only two VM Host Server systems are involved This gives some extra data security because the used data is mirrored over the network For more information see http www novell com documentation sles11 book_sleha data cha_ha_drbd html SCSI can also be used if the available hardware permits shared access to the same disks 4 6 3...

Page 49: ...n and customize it to the local needs If desired Xen VM Host Server can be installed after performing a default Physical Server installation using the Install Hypervisor and Tools module in YaST This module will prepare the system for hosting virtual machines including invocation of the default bridge networking proposal In case that the necessary packages for a Xen VM Host Server are installed ma...

Page 50: ...u intend to create a virtual bridge that has no connection to a real ethernet device use Statically assigned IP Address In this case it is a good idea to use addresses from the private IP address ranges e g 192 168 x x or 10 x x x After the bridge is created it may be used by any of the Xen VM Guest systems A purely virtual bridge without connection to a real network device is good to provide fast...

Page 51: ... xx Normally the amount of available MAC addresses should be big enough to only get unique addresses However if you have a very big installation or if you want to make sure that no problems arise from random MAC address assignment you can also manually assign these addresses For debugging or system management purposes it may be useful to know which virtual interface in Domain0 is connected to whic...

Page 52: ...At this time the third bridge with name br2 is not connected to any VM Guest nor real ethernet device 5 3 Special Configurations There are many network configuration possibilities available to Xen Most of these are directly configurable with YaST These include Setting up a masqueraded network with YaST Security and Users Firewall Creating bonded network interfaces or setup static routes with YaST ...

Page 53: ...6 6aa9 62df f8df a7cf8c192c24 script etc xen scripts vif bridge Note that the rate is either Mb s megabit per second or MB s megabyte per second In the above example the maximum transfer rate of the virtual interface is 100 megabit By default there is no limitation to the bandwidth of a guest to the virtual bridge It is even possible to fine tune the behavior in specifying the time window that is ...

Page 54: ...ossibilities are available in the manual page man 8 iftop 5 3 3 Setup Bonding Devices For some systems it is desired to implement network connections that comply to more than the standard data security or availability requirements of a typical ethernet device In these cases several ethernet devices can be aggregated to a single bonding device The configuration of the bonding device is done by mean...

Page 55: ...s are at your disposal No IP Address Dynamic Address with DHCP or Zeroconf Statically assigned IP Address Use the method that is appropriate for your environment 4 Select the ethernet devices that should be included into the bond by activating the check box in front of the respective Bond Slave 5 Edit the Bond Driver Options The modes that are available for configuration are the following balance ...

Page 56: ... 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 46 Virtualization with Xen ...

Page 57: ...e of a normal SUSE Linux Enterprise system For details about the update see Chapter 7 Updating SUSE Linux Enterprise Deployment Guide However there are some issues that you have to resolve manually 6 1 1 Xend Configuration Due to changes in default settings the Xen Management Daemon xend configuration file is replaced on upgrade Customizations are saved to etc xen xend config sxp rpmsave for mergi...

Page 58: ...e 3 Start the Virtual Machine Manager from YaST Virtualization menu 4 Make sure that your VM Guest system are in state Shutoff 5 Open the Details window and select the Hardware tab Choose the network configuration and write down the used MAC address 6 Remove the network device with Remove 7 Use Add to readd the network device Use the MAC address of the previously deleted network interface 8 Repeat...

Page 59: ...t Virtual Machine Manager package is available through the SUSE Linux Enterprise Server 11 update channel or at http www novell 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 On paravirtual machines virtual CD readers present the CD as a virtual disk with read only a...

Page 60: ... a physical CD reader to interact For example in a Windows XP virtual machine the inserted CD appears in the Devices with Removable Storage section of My Computer When a CD is inserted in the physical CD reader on the host computer all virtual ma chines with virtual CD readers based on the physical CD reader such as dev cdrom are able to read the inserted CD Assuming the operating system has autom...

Page 61: ...ng 10a Open a terminal in the virtual machine and enter fdisk l to verify that the device was properly added You can also enter ls sys block to see all disks available to the virtual machine The CD is recognized by the virtual machine as a virtual disk with a drive designation for example dev xvdb 10b Enter the command to mount the CD or ISO image using its drive designation For example mount o ro...

Page 62: ...e virtual machine is paravirtual replace the device designation with a vdb x device designation such as xm block attach vm_id file mycd iso xvdb cdrom r To set up a physical CD reader enter xm block attach vm_id phy dev cdrom hdc cdrom r where vm_id is the virtual machine ID dev cdrom is the path to the physical CD reader hdc is the physical drive designation to be presented to the virtual machine...

Page 63: ...anager 4 Select the virtual machine then click Details 5 Click Hardware Disk 6 Select the virtual CD ROM device to remove 7 Click Remove to remove the virtual CD ROM device 8 Press the hardware eject button to eject the CD 6 3 Remote Access Methods Some configurations such as those that include rack mounted servers require a com puter to run without a video monitor keyboard or mouse This type of c...

Page 64: ...s and the vm install command to create new virtual machines 6 4 VNC Viewer By default Virtual Machine Manager uses the VNC viewer to show the display of a virtual machine You can also use VNC viewer from Domain0 known as local access or on box access or from a remote computer You can use the IP address of a VM Host Server and a VNC viewer to view the display of this VM Guest When a virtual machine...

Page 65: ... Modifying xend Set tings page 32 To access the virtual machine from the local console running a VNC viewer client enter one of the following commands vncviewer 590 vncviewer is the VNC viewer port number assigned to the virtual machine When accessing the VM Guest from a machine other than Domain0 use the following syntax vncviewer 192 168 3 100 590 In this case the IP address of Domain0 is 192 16...

Page 66: ...ngs of a machine see Section 4 1 Virtual Machine Manager page 30 TIP Assign higher port numbers to avoid conflict with port numbers assigned by the VNC viewer which uses the lowest available port number 6 4 2 Using SDL instead of a VNC Viewer If you access a virtual machine s display from the virtual machine host console known as local or on box access you might want to use SDL instead of VNC view...

Page 67: ...ader properties by using YaST or by directly editing the boot loader configuration file The YaST boot loader program is located at YaST System Boot Loader The Boot Loader Settings screen lists the sections that appear as options on the boot menu From this screen you can change the boot loader so it auto selects the virtual machine host option when booting Figure 6 2 Boot Loader Settings Select the...

Page 68: ...fter installing the package xen doc pdf You can customize your virtualization environment by editing the boot grub menu lst file If the Xen option does not appear on the GRUB boot menu you can compare your up dated GRUB boot loader file with the examples below to confirm that it was updated correctly The first example shows a typical GRUB boot loader file updated to load the kernel that supports v...

Page 69: ... units with a K M or G suffix for example 128M If the amount is not specified the Domain0 takes the maximum possible memory for its operations For more information about hypervisor parameters see usr share doc packages xen pdf user pdf section Xen Boot Options after installing the package xen doc pdf The first module line specifies the directory and filename of the Linux kernel to load Replace ker...

Page 70: ...e instructions in Section 6 5 The Boot Loader Program page 57 When a virtual machine s settings are stored in xend it is referred to as a xen managed domain or xen managed virtual machine Whenever the xen managed virtual machine starts it takes its settings from information stored in the xend database not from settings in the initial startup file Although it is not recommended you might need to st...

Page 71: ...e virtual machine name Randomly assigned MAC addresses and bridges assigned to use the virtual machine s network addresses vif Specifies a localtime 0 or UTC 1 time setting localtime Specifies the action that the virtual machine performs when the operating system is powered off on_poweroff Specifies the action that the virtual machine performs when the operating system reboots on_reboot Specifies ...

Page 72: ...he physical disk remount the virtual machine s file system and set the file system back to read write To check the actual disk requirements of a sparse image file use the command du h image file To increase the available space of a sparse image file first increase the file size and then increase the file system WARNING Backup Before Resize Touching the sizes of partitions or sparse files always be...

Page 73: ...ults to English US Unless you manually specify it a keymap entry is not specified in the host s xend file or for any virtual machine Therefore by default all virtual machine settings use the English US virtual keyboard It is recommended that you specify a keymap setting for xend and for each virtual machine especially if you want to migrate virtual machines to different hosts To view a virtual mac...

Page 74: ... Virtual machines created before a host s keymap entry is specified are not automati cally updated These virtual machines start with the keyboard specified by the host but the keymap entry is not a permanent part of the virtual machine s settings For the entry to be permanent it must be explicitly stated in the virtual machine s settings Table 6 2 Language and Keymap Settings Keymap Setting Langua...

Page 75: ... 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 33 to change the respective device entry to the desired setting Virtualization Configuration Options and Settings 65 ...

Page 76: ...using loopback file tap aio path file Raw disk images accessed by using blktap Similar to loopback but with out using loop devices tap aio tap vmdk path file VMware disk images accessed by using blktap tap vmdk ndb ip_port Raw disk images accessed by using NBD nbd tap qcow path file QEMU disk images accessed by using blktap tap qcow iscsi IQN LUN iSCSI targets using connections initiated from doma...

Page 77: ...device specified using the Internet SCSI iSCSI protocol iscsi iqn 2001 04 com acme 0ac47ee2 216e 452a a341 a12624cd0225 A remote storage device specified using a Fibre Channel NPIV protocol npiv 210400e08b80c40f 6 11 Migrating Virtual Machines A running virtual machine can be migrated from its source virtual machine host to an other virtual machine host This functionality is referred to as live mi...

Page 78: ...ng the Host by Modifying xend Settings page 32 For more details about using xm to migrate VM Guest systems see Section 4 6 Migrating Xen VM Guest Systems page 36 6 12 Passing Key Combinations to Virtual Machines In a virtual machine window some key combinations such as Ctrl Alt F1 are rec ognized by the virtual machine host but are not passed to the virtual machine To bypass the virtual machine ho...

Page 79: ... 256 0 768 Another example sda3 has major number 8 and minor number 3 so its decimal representation is 8 256 3 2051 Of course it is possible to manually work backwards from a number to discover the human readable device name For your reference some common mappings are listed in the following table dev hda 768 dev hdb 832 dev hdc 5632 dev hdd 5696 dev sda 2048 dev sdb 2064 dev sdc 2080 dev sdd 2096...

Page 80: ...e is off but it can be quickly restored to its previously saved running condition The operation does not make a copy of any portion of the virtual machine s virtual disk When saved the virtual machine is paused its current memory state saved to a location you specify and then the virtual machine is stopped The amount of time to save the virtual machine depends on the amount of memory allocated Whe...

Page 81: ...al machine ID you want to save and state file is the name you specify for the memory state file 6 16 Restoring Virtual Machines The restore operation loads a virtual machine s previously saved memory state file and starts the virtual machine The virtual machine does not boot the operating system but resumes at the point that it was previously saved The operation is slightly similar to coming out o...

Page 82: ...e and the guest operating system are restored to the previously saved state Procedure 6 5 Restore a Virtual Machine s Current State xm Command 1 Make sure the virtual machine to be restored has not been started since you ran the save operation 2 In the host environment enter xm restore state file where state file is the previously saved memory state file 6 17 Virtual Machine States A virtual machi...

Page 83: ...he hypervisor but still maintains its allocated resources such as memory s shutdown The guest operating system is in the process of being shutdown rebooted or suspended and the virtual machine is being stopped c crashed The virtual machine has crashed and is not running d dying The virtual machine is in the process of shutting down or crashing Virtualization Configuration Options and Settings 73 ...

Page 84: ......

Page 85: ...n oes2 inst_oes_nw data b8m3eeb html 7 2 OES Linux Virtual Machines The documentation of OES Linux virtual machines is discussed in a separate document For more information on this topic see http www novell com documentation oes2 inst_oes_lx data b9kmg9x html 7 3 Red Hat Linux Virtual Machines On VM Host Server computers running SUSE Linux Enterprise 11 Red Hat Enterprise Linux systems are only su...

Page 86: ...ck Apply 9 The actual installation is started by clicking on Ok in the installation summary 7 3 1 Installing the Virtual Machine Driver Pack The virtual machine driver pack can only be installed after the basic installation has finished To install the driver pack proceed as follows 1 Add the Driver Pack Add On CD to the VM Host Server as described in Sec tion 8 2 Loading the Driver Pack page 87 2 ...

Page 87: ...to 1024x768 using 8MB of memory in SLES11 simply edit the file boot grub menu lst and add the following line to the end of the kernel line xenfb video 8 1024 768 For SLES10 the same parameter is needed However it must be added to the extra boot parameters of the configuration TIP Mouse Synchronization in VNC During the installation of SUSE Linux Enterprise it may happen that the mouse in VNC is no...

Page 88: ... etc xen vm vm_name was acceptable In SLE 10 SP1 and later editing the configuration file is no longer recommended Instead virtual machine configuration changes should be made in Virtual Machine Manager and by editing virtual machine settings stored in the xend database To update a SLE 10 virtual machine to SLE 10 SP1 or SLE 11 complete the following procedure 1 Make sure the host computer is runn...

Page 89: ... Linux Enterprise installation source as the Installation Source for the virtual machine 10 In the Operating System Installation section add the following argument in Additional Arguments root dev xvda2 where dev xvda2 is the path and drive designation for the root partition that contains the virtual machine s boot files 11 Click OK to create the virtual machine and start the SLE 11 installation p...

Page 90: ...ing from its command line 17a Enter init 3 17b Enter sax2 to configure the GUI environment 17c Enter init 5 to restart the GUI If the mouse pointer stops working within the virtual machine you might need to restart the GUI on the virtual machine host by entering init 3 then init 5 on the host s command line After completing these instructions the updated SLE 11 virtual machine should perform corre...

Page 91: ...setting If the independent wallclock is enabled the virtual machine manages its time independently and does not synchronize with the host If the independent wallclock is disabled the virtual machine periodically synchronizes its time with the host clock NOTE OES 2 NetWare virtual machines manage clock time independently after booting They do not synchronize with the host clock time If a guest oper...

Page 92: ...ndent_wallclock 1 Enter 1 to enable or 0 to disable the wallclock setting 4 Save the file and reboot the virtual machine operating system While booting a virtual machine gets its initial clock time from the host Then if the wallclock setting is set to 1 in the sysctl conf file it manages its clock time independently and does not synchronize with the host clock time Procedure 7 3 Temporarily Changi...

Page 93: ...trd that are used to install the system Furthermore the updated kernel must be available in the installation source In the following example the network installation source is found at 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...

Page 94: ...o the updates directory are available during the installation However they will only be used if they are newer than the packages provided by the installation itself Note that in order to use a new kernel during the installation you must also create an appropriate installation initrd as it is found in srv ftp boot 7 5 Windows Virtual Machines The installation of Windows virtual machines is supporte...

Page 95: ...e Windows Server 2008 Windows Vista Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 5 Windows Server 2003 Windows XP Windows 2000 Server SUSE Linux Enterprise Server 9 SUSE Linux Enterprise Server 10 Virtualization allows the consolidation of Linux workloads on newer more powerful energy efficient hardware Paravirtualized operating systems such as SUSE Linux En terprise Server are aware of the...

Page 96: ...h the virtualization platform with no emulation to efficiently deliver disk access allowing the disk and network subsystems to operate at near native speeds in a virtualized environment without requiring changes to existing operating systems TIP Best Practices Before installing SUSE Linux Enterprise Virtual Machine Driver Pack in your production environment we strongly recommend that you run it in...

Page 97: ...ick Open Click OK 7 Select Patterns from the Filter drop down list The drivers are located under Virtual Machine 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 Enterprise Linux 4 on Xen This section provides in...

Page 98: ... in Section 6 2 Virtual CD Readers page 49 4 Enter rpm U xxx rpm where xxx is the RPM filename 5 Run mkinitrd to provide the drivers to the initial boot system 6 Edit the boot grub menu lst file and make the following change 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 ...

Page 99: ... 16 3e 55 24 21 model pcnet type ioemu to vif mac 00 16 3e 55 24 21 11 At the terminal enter xm new vm_cfgfile to reference the virtual ma chine in the xenstore so it is managed again 12 Restart the virtual machine 8 3 2 Uninstalling the RHEL 4 Drivers 1 Open a terminal 2 Enter rpm e xxx where xxx is the name of the driver pack TIP Enter rpm qa grep vmdp to find out what you have installed 3 Edit ...

Page 100: ...r Own RPMs page 91 for more information 3 Enter rpm U xxx rpm where xxx is the filename of the new RPM 8 3 4 Using the Drivers with an Upgraded Kernel 1 Install the new kernel packages 2 Edit the boot grub menu lst file and remove all hdx noprobe entries from the kernel line 3 Restart the virtual machine 4 Upgrade the driver pack see Section 8 3 3 Upgrading the RHEL 4 Drivers page 90 5 Edit the bo...

Page 101: ... binary RPM in usr src redhat RPMS arch where arch is the architecture of the virtual machine 8 4 SUSE Drivers for Red Hat Enterprise Linux 5 on Xen This section provides instructions for installing uninstalling and updating the SUSE Drivers for Red Hat Enterprise Linux 5 on Xen 8 4 1 Installing the RHEL 5 Drivers 1 Open a terminal 2 Mount the driver pack ISO For instructions on how to use the ISO...

Page 102: ...er xm delete vm_name to delete the virtual machine s reference in xenstore so it is no longer managed TIP Enter xm list to see the name of the virtual machine vm_name 6 Open the virtual machine configuration file located on virtualization host server etc xen vm vm_cfgfile where vm_cfgfile is usually the same as the name of the virtual machine 7 Remove all parameters from the vif line except the ma...

Page 103: ... is the old boot entry to default 0 which is the boot entry with the latest initrd Remove all hdx noprobe entries from the kernel line 4 Restart the virtual machine 8 4 3 Upgrading the RHEL 5 Drivers 1 Open a terminal 2 Mount the driver pack ISO For instructions on how to use the ISO images see Section 6 2 Virtual CD Readers page 49 3 Enter rpm U xxx rpm where xxx is the name of the newer driver p...

Page 104: ...nt do the following 1 Edit the boot grub menu lst file and remove all hdx noprobe entries from the kernel line 2 Restart the virtual machine 3 Upgrade the driver pack see Section 8 4 3 Upgrading the RHEL 5 Drivers page 93 4 Edit the boot grub menu lst file and make the following change For each drive specified in the virtual machine configuration file for example hda and hdb append hdx noprobe to ...

Page 105: ...of the drivers you want to install as a virtual CD reader by following the instructions at Section 6 2 3 Adding Virtual CD Readers page 50 The ISO images are found in the SLES 10 virtual machine host opt novell vm driver pack xen directory 3 Right click the virtual CD ROM you just added then click Autoplay If a security alert appears indicating the Bus driver has not been properly signed click Yes...

Page 106: ...rs 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 96 Virtualization with Xen ...

Page 107: ... 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 97 ...

Page 108: ...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 The system restarts The Found New Hardware Wizard appears indicating that it has found new hardware 9 Click Yes this time only then click Next 98 Virtualization with Xen ...

Page 109: ... 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 99 ...

Page 110: ...zard is done 12 Click Finish 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 100 Virtualization with Xen ...

Page 111: ... 5 Click Yes this time only then click Next The wizard asks to install software for the PCI Device 6 Click Cancel The driver pack is now uninstalled from your system 8 5 2 Upgrading the Driver Pack To upgrade to a newer version of the driver pack follow these steps 1 Uninstall the current driver pack see Section 8 5 1 Uninstalling the Driver Pack page 100 2 Download and install the new driver pack...

Page 112: ...ll etc the device drivers in the driver pack Deleting driver files manually Always use the uninstall utility see Section 8 5 1 Uninstalling the Driver Pack page 100 Uninstalling the driver pack with the installation CD attached to the virtual machine Canceling the installation when you see security alert that indicates that the Bus driver has not been properly signed Click Yes to continue the inst...

Page 113: ...settings see Sec tion 4 3 Configuring a Virtual Machine by Modifying its xend Settings page 33 1 If your VM Guest is running first shut it down 2 In the sxp file of the machine to configure search for the vif device entry This may look like this device vif bridge br0 uuid 809f1a5e 397c 495b 7138 7278cc958c9f script etc xen scripts vif bridge mac 00 16 3e 54 79 a6 model rtl8139 backend 0 3 Remove t...

Page 114: ...figuring the Virtual Network Card 1 Run YaST 1a Make sure you are logged in as root 1b Open a terminal 1c Enter YaST2 2 In YaST click Network Devices Network Card 3 Click Change then select and delete each network card that is already configured 4 Click Add then change the ethx parameter to a network card number identified above Repeat the process to add all virtual network cards 104 Virtualizatio...

Page 115: ...hese 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 The following pages contain descriptions for most of the commonly used options for the Xend configuration However there is no guarantee for completeness ...

Page 116: ...ain It needs several subelements to store all needed data bootloader Define the program that is used to boot the VM Guest Paravirtualized SUSE Linux Enterprise 11 systems use usr bin pygrub by default Example bootloader usr bin pygrub bootloader_args Provide additional parameters to the boot loader program Example bootloader_args q cpus Defines which CPUs are available to a VM Guest The settings m...

Page 117: ... id 1 1 location Defines the connection information for the console of the given VM Guest A vfb device will look like location localhost 5901 1 2 protocol The interface to use for the console protocol This may be one of vt100 Standard vt100 terminal rfb Remote Frame Buffer protocol for VNC rdp Remote Desktop protocol 1 3 uuid Unique identifier for this device Example uuid 7892de3d 2713 a48f c3ba 5...

Page 118: ...s the bus number 0x03 bus 0x03 domain Most computers have only one PCI domain This is then 0x0 To check the domain numbers of the PCI devices use lspci D domain 0x0 func A PCI device with device number 03 02 1 has the function number func 0x1 slot A PCI device with device number 03 02 1 has the function number slot 0x02 uuid Unique identifier for this device Example uuid d33733fe e36f fa42 75d0 fe...

Page 119: ...sion defines the domain that holds the backend device that the frontend device of the current VM Guest should connect to Example backend 0 3 2 bootable Defines if this block device is bootable Example bootable 1 3 3 dev Defines the device name of the virtual block device in the VM Guest Example dev xvda disk 3 4 mode Defines if the device is writable Example mode w 3 5 protocol Defines the IO prot...

Page 120: ...block device is a virtual disk image VDI This is a read only setting Example VDI 4 vfb vfb keymap location type uuid vncunused xauthority The virtual frame buffer vfb defines a graphical interface and input device to the VM Guest 4 1 keymap Defines the language to use for the input Example keymap en 4 2 location Defines where to access the virtual frame buffer device when using VNC By default the ...

Page 121: ...ve 5900 vncunused 1 4 6 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 Example xauthority root Xauthority 5 vif vif backend bridge mac model script uuid The virtual interface definition is used to create and setup virtual network devices To list add or remove network interfaces during runtime you ca...

Page 122: ...rface that should be presented to the VM Guest See also Section 5 2 Network Devices for Guest Systems page 40 Example model rtl8139 5 5 script Defines the script to use to bring the network interface up or down Example script etc xen scripts vif bridge 5 6 uuid Unique identifier for the current virtual network device Example uuid cc0d3351 6206 0f7c d95f 3cecffec793f 6 vkbd vkbd backend Defines a v...

Page 123: ...eature during boot 1 linux linux args device_model kernel notes The linux image definition is used for paravirtualized linux installations 1 1 args When booting a kernel from the image definition args defines extra boot parameters for the kernel Example args sax2 1 1 2 device_model The device model used by the VM Guest This defaults to qemu dm Example device_model usr lib xen bin qemu dm 1 3 kerne...

Page 124: ... if acpi Advanced Configuration and Power Interface functionality should be available to the VM Guest Example acpi 1 2 2 apic Defines if apic Advanced Programmable Interrupt Controller functionality should be available to the VM Guest Example apic 1 2 3 boot Defines the drive letter to boot from Example boot c 2 4 device_model The device model used by the VM Guest This defaults to qemu dm Example ...

Page 125: ... with value 1 disabled with value 0 Example hap 1 2 8 hpet Defines if the emulated multimedia timer hpet should be activated Enabled with value 1 disabled with value 0 Example hpet 0 2 9 isa Defines if an ISA only system should be emulated Example isa 0 2 10 kernel Defines the path to the kernel image this VM Guest should boot Defaults to no image Example kernel 2 11 keymap Defines the language to...

Page 126: ...Example monitor 0 2 15 nographic Defines if the device model should disable the graphics support Example nographic 0 2 16 notes Displays several settings and features available to the current VM Guest Example notes SUSPEND_CANCEL 1 2 17 pae Enable or disable PAE Physical Address Extension of the HVM VM Guest Example pae 1 2 18 pci pci Bus Slot Function Add a given PCI device to a VM Guest This mus...

Page 127: ...tandard vga cirrus logic device should be used Example stdvga 0 2 22 timer_mode Defines if the timer should be delayed when ticks are missed or if the real time should always be used 0 delays the virtual time 1 always uses the real time timer_mode 0 2 23 usb Defines if USB devices should be emulated Example usb 1 2 24 usbdevice Adds the specified USB device to the VM Guest usbdevice tablet 2 25 vn...

Page 128: ...able is used Example xauthority root Xauthority maxmem Defines how much memory in MB can be assigned to the VM Guest while running Example maxmem 1024 memory Defines the initial amount of memory in MB of the VM Guest Example memory 512 name The name of the VM Guest as it appears in different managing utilities Example name sles11 online_vcpus Number of CPUs that are currently available to the VM G...

Page 129: ...f the VM Guest before restarting it Example on_crash coredump restart 3 destroy The VM Guest is cleaned up Example on_crash destroy 4 preserve In order to clean up a VM Guest with preserve status it has to be destroyed manually Example on_crash preserve 5 rename restart The old VM Guest is renamed and a new domain is started with the old name Example on_crash rename restart 6 restart The old VM Gu...

Page 130: ...parameters see the section called on_crash page 119 on_xend_start on_xend_start destroy preserve rename restart rename start Defines the behavior when Xend starts For the details about the available parameters see the section called on_crash page 119 on_xend_stop on_xen_stop destroy preserve rename restart rename shutdown Defines the behavior when Xend stops For the details about the available par...

Page 131: ...ed 0 The VM Guest is suspended 1 The VM Guest is running 2 Example status 0 store_mfn Number of shared pages for the current VM Guest Example store_mfn 262141 uuid Unique identifier for this VM Guest Example uuid 7892de3d 2713 a48f c3ba 54a7574e283b vcpus Number of virtually available CPUs in the current VM Guest Example vcpus 2 SXP Configuration Options 121 ...

Page 132: ......

Reviews: