background image

5

Virtualization: Configuration
Options and Settings

The documentation in this section, describes advanced management tasks and configu-
ration options that might help technology innovators implement leading-edge virtual-
ization solutions. It is provided as a courtesy and does not imply that all documented
options and tasks are supported by Novell, Inc.

Virtualization technology is being rapidly developed. In an effort to keep you up to
date on the most current information, this documentation will be updated more often
than traditional Novell product documentation. To create a more dynamic environment,
it will quickly include any feedback and new virtualization discoveries made by you
and other users through the User Comments feature at the bottom of each page.

Although a more dynamic documentation environment can be beneficial, there will also
be some drawbacks. The information might not have gone through a formal editing
cycle before being published. The information might be less authoritative, might not
completely cover obvious topics, and could have more typos than traditional product
documentation. It might also include untested instructions for virtualization procedures
you might want to try.

5.1 Virtual CD Readers

Virtual CD readers can be set up when a virtual machine is created or added to an ex-
isting virtual machine. A virtual CD reader can be based on a physical CD/DVD, or
based on an ISO image. Virtual CD readers work differently depending on whether
they are paravirtual or fully virtual.

Virtualization: Configuration Options and Settings

33

Summary of Contents for SUSE Linux Enterprise Server

Page 1: ...SUSE Linux Enterprise Server www novell com 10 SP2 July 15 2008 Virtualization with Xen...

Page 2: ...t 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 man...

Page 3: ...naging Domain 0 Memory 11 2 4 Networks Card in Fully Virtualized Guests 12 2 5 Starting the Virtual Machine Host 13 3 Setting Up Virtual Machines 15 3 1 Creating a Virtual Machine 15 3 2 Installing an...

Page 4: ...ks 52 5 11 Virtual Disks 53 5 12 Migrating Virtual Machines 54 5 13 Passing Key Combinations to Virtual Machines 54 5 14 xm block list Device Numbers 55 5 15 File Backed Virtual Disks and Loopback Dev...

Page 5: ...mentation included with this product Please use the User Comments feature at the bottom of each page of the online documentation and enter your comments there 2 Additional Documentation For additional...

Page 6: ...a key to press or a key combination keys are shown in uppercase as on a keyboard File File Save As menu items buttons This paragraph is only relevant for the specified architectures The arrows mark t...

Page 7: ...e 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...

Page 8: ...full virtualization mode Xen Based Virtual Machines A Xen based virtual machine also referred to as a domain consists of the follow ing components At least one virtual disk that contains a bootable o...

Page 9: ...tual 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 Typica...

Page 10: ...2003 or Windows XP 1 4 The Virtual Machine Host After you install the virtualization components and reboot the computer the GRUB boot loader menu should display a Xen menu option Selecting the Xen me...

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

Page 12: ......

Page 13: ...planned VM Guest systems TIP Remember that VM Guest systems just like physical machines perform better when they run on faster processors and have access to more system memory The following table list...

Page 14: ...ware 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 installati...

Page 15: ...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 Setting Up a 32 Bit Domain 0...

Page 16: ...nux installation media 8 On the SUSE Linux installation source media find the x86_64 directory that contains xen rpm 9 Use the following command to install the RPM rpm U xen rpm ignorearch force 10 Ed...

Page 17: ...e maximum amount would be 20 percent of the total system memory up to 2 GB An appropriate minimum amount would at least be 512 MB 2 3 1 Setting a Maximum Amount of Memory 1 Determine the amount of mem...

Page 18: ...network cards are available for the VM Guest The MAC addresses of both cards are identical in this case which leads to problems when running the network The following network options are available em...

Page 19: ...about Kdump see also http www novell com rc docrepository public 37 basedocument 2007 09 13 2960758124 4622069_f_en pdf If the Xen option is not on the GRUB menu review the steps for installation and...

Page 20: ...ect time on all VM Guest systems also activate the network time services on each respective guest or make sure that the guest uses the system time of the host For more about Independent Wallclocks in...

Page 21: ...virtualization mode and requires specific device drivers to be loaded You should be aware of any licensing issues related to running a single licensed copy of an operating system on multiple virtual m...

Page 22: ...ration Guide http www novell com documentation sles10 sles_admin data sec_deployment_remoteinst_instserver html For further prerequisites consult the manuals of the respective operating system to in s...

Page 23: ...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 wa...

Page 24: ...chines page 70 When running through the creation of a VM Guest the following steps have to be ac complished 1 Select if the VM Guest should run as full or paravirtualized guest If your computer suppor...

Page 25: ...PUs You can specify up to 32 virtual CPUs however for best performance the number of virtual processors should be less than or equal to the number of physical processors 4 Select the graphics mode to...

Page 26: ...to a default bridge configured in the host You can also create additional virtual network cards in the Network Adapters page of vm install NOTE Using Arbitrary Bridge Names If installing a fully virt...

Page 27: ...options or options for linuxrc More information about linuxrc can be found at http www novell com documentation sles10 sles_admin data sec_deployment_remoteinst_bootinst html If all the information o...

Page 28: ...evice 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 The text version of the w...

Page 29: ...eted To delete all components of a virtual machine configured with a file backed virtual disk you must manually delete its virtual disk image file var lib xen images and its initial startup file etc x...

Page 30: ...to have a valid initial ramdisk that knows about the new location of the root filesystem run the command mkinitrd 1 Start the VM Guest with the extra root command line as explained above 2 Log into th...

Page 31: ...bytes at device 000 01 02 0 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 f...

Page 32: ......

Page 33: ...les 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 Fig...

Page 34: ...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 Mana...

Page 35: ...edit the etc xen xend config sxp file The settings take effect the next time xend starts sh Xend configuration file This example configuration is appropriate for an installation that utilizes a bridge...

Page 36: ...edit the settings in the file to meet your configuration requirements import the file back into xend and restart the virtual machine NOTE It is no longer recommended that you edit the initial startup...

Page 37: ...nter xm new F filename to import the virtual machine s new 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 export...

Page 38: ...o 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 privile...

Page 39: ...you and other users through the User Comments feature at the bottom of each page Although a more dynamic documentation environment can be beneficial there will also be some drawbacks The information...

Page 40: ...following the instructions in Section 5 1 4 Adding Virtual CD Readers Command Line Method page 37 5 1 1 Virtual CD Readers on Paravirtual Machines A paravirtual machine can have up to 16 block device...

Page 41: ...e 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 t...

Page 42: ...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...

Page 43: ...signation 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 t...

Page 44: ...the hardware eject button to eject the CD 5 2 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...

Page 45: ...cess or on box access or from a remote computer You can use the IP address of a VM Guest and a VNC viewer to view the display of this VM Guest When a virtual machine is running the VNC server on the h...

Page 46: ...s page 29 To access the virtual machine from the local console or a remote computer running a VNC viewer client enter one of the following commands vncviewer host_ip 590 vncviewer host_ip where host_i...

Page 47: ...pecific port number on a fully virtualized guest edit the virtual machine s setting etc xen vm name by including vncdisplay where vnc 1 vncdisplay vncunused 0 vnc must be set to 1 is the assigned port...

Page 48: ...ngs page 30 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 v...

Page 49: ...the boot loader and Xen function Figure 5 4 Boot Loader Settings Section Management You can use the Boot Loader program to specify functionality such as Pass kernel command line parameters Specify th...

Page 50: ...le XEN root hd0 5 kernel boot xen gz hyper_parameters module boot vmlinuz xen kernel_parameters module boot initrd xen Example 5 2 Xen Section in the menu lst File PAE title XEN root hd0 5 kernel boot...

Page 51: ...ost To set the GRUB boot loader to automatically boot the Xen virtualization software change the default entry from 0 which means the first title entry to the number that corresponds to the title XEN...

Page 52: ...al machine s operating system crashes its disks are not shut down in an orderly manner This should not pose a problem to a virtual machine running in full virtualization mode because the pending disk...

Page 53: ...oader Program page 42 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 t...

Page 54: ...nd 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...

Page 55: ...machine is started the host creates a virtual keyboard that matches the keymap entry according to the virtual machine s settings If there is no keymap entry in the virtual machine s settings the host...

Page 56: ...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...

Page 57: ...ca French Canada fr ch French Switzerland hu Hungarian is Icelandic it Italian ja Japanese nl Dutch nl be Dutch Belgium no Norwegian pl Polish pt Portuguese pt br Portuguese Brazil ru Russian sv Swed...

Page 58: ...ev xvda disk uname file var lib xen images oes2l disk0 mode w type disk backend 0 Table 5 3 uname Settings Example Description Protocol phy dev xvda Block devices such as a physical disk in domain 0 p...

Page 59: ...t contains a disk image accessible from the file system of the host Disk images can be encoded as raw QEMU or VMware file mnt disks sles10sp1 iso tap aio mnt disks sles10sp1 iso specifies a raw disk t...

Page 60: ...ices NBD iSCSI NFS drbd and fiber channel devices Furthermore the routing of the network connection to the virtual network device must be correct The following xend options which are located in the et...

Page 61: ...f a virtual machine s virtual disk is designated as hda the number returned from xm block list is 768 hda has major number 3 and minor number 0 The major number is stored as a high order byte the mino...

Page 62: ...ork unmount all existing loop devices or reboot the computer 5 16 Saving Virtual Machines The save operation preserves the exact state of the virtual machine s memory The op eration is slightly simila...

Page 63: ...rmation 5 Select Virtual Machine Save from the menu 6 Name and save the file Procedure 5 2 Save a Virtual Machine s Current State xm Command 1 Make sure the virtual machine to be saved is running 2 In...

Page 64: ...r 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 In Virtual Machine Manager click File Restore Saved Machine from...

Page 65: ...ng 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 s...

Page 66: ......

Page 67: ...on this topic see http www novell com documentation oes2 inst_oes_nw data b8m3eeb html 6 2 OES Linux Virtual Machines The documentation of OES Linux virtual machines is discussed in a separate documen...

Page 68: ...es SUSE Linux operating systems supported as guest operating systems such as SUSE Linux 10 SP1 or later and SUSE Linux 9 SP3 or later can be installed as guests on a host that is running any of the fo...

Page 69: ...main 0 SLE 64 bit Fully virtual 64 bit hypervisor 32 bit PAE domain 0 64 bit hypervisor 64 bit domain 0 SLE 64 bit Paravirtual 64 bit hypervisor 32 bit PAE domain 0 64 bit hypervisor 64 bit domain 0 6...

Page 70: ...nning the most recent SLE updates The host computer must be running software that is more recent than the software planned for the virtual machine update 2 Prepare the virtual machine s operating syst...

Page 71: ...ins the virtual machine s boot files 11 Click OK to create the virtual machine and start the SLE 10 SP1 installation program A new window displaying the installation program opens on the Domain0 If th...

Page 72: ...ine that begins with 1 2345 respan sbin mingetty add the following lines 2 2345 respawn sbin mingetty tty2 3 2345 respawn sbin mingetty tty3 4 2345 respawn sbin mingetty tty4 5 2345 respawn sbin minge...

Page 73: ...Clock Settings When booting virtual machines get their initial clock time from their host After getting their initial clock time fully virtual machines manage their time independently from the host Pa...

Page 74: ...ently Changing the Independent Wallclock Setting 1 Log in to the virtual machine environment as root 2 Edit the virtual machine s etc sysctl conf file 3 Add or change the following entry xen independe...

Page 75: ...rprise Server 9 is only supported from a network installation source To have the right device names supported in Xen you must update the kernel and initrd that are used to install the system Furthermo...

Page 76: ...e i done srv ftp updates content After this procedure the packages that are copied to the updates directory are available during the installation However they will only be used if they are newer than...

Page 77: ...re 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 Serve...

Page 78: ...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 requiri...

Page 79: ...pack ISO then click 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...

Page 80: ...x rpm where xxx is the RPM filename 5 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 h...

Page 81: ...store so it is managed again 11 Restart the virtual machine 7 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 vmd...

Page 82: ...tall 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 7 3 3 Upgrad...

Page 83: ...1 Installing 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 5 1 Virtual CD Readers page 33 Optional If you are installing fr...

Page 84: ...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...

Page 85: ...line 4 Restart the virtual machine 7 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 5 1 Virtual CD Readers pag...

Page 86: ...t 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 7 4 3 Upgrading the RH...

Page 87: ...ive the server a fixed IP address before installing the driver pack otherwise you have to switch to a different intermediate IP address before finishing the installation 1 Launch the Virtual Machine M...

Page 88: ...The Novell Virtual Device Driver Installer launches 4 Click Next The End User License Agreement window appears 82 Virtualization with Xen...

Page 89: ...ed 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 6 Click Continue Anyway or click Yes for...

Page 90: ...ou have to uninstall see Section 7 5 1 Uninstalling the Driver Pack page 87 7 Click Finish A message appears indicating that you must restart the system 8 Click Yes The system restarts The Found New H...

Page 91: ...tall 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...

Page 92: ...If you are installing Windows 2000 you see the following 11 Click Continue Anyway or click Yes A message indicates the Found New Hardware Wizard is done 86 Virtualization with Xen...

Page 93: ...owse to c Program Files Novell XenDrv 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 Ha...

Page 94: ...e 2 Uninstall the driver pack see Section 7 5 1 Uninstalling the Driver Pack page 87 7 5 4 Avoiding Problems with the Drivers To avoid problems and potential failure of the device drivers in the drive...

Page 95: ...for running SUSE Linux Enterprise as a fully virtual guest with Xen drivers Running SUSE Linux Enterprise requires a VM Host Server based on SUSE Linux Enterprise Server 10 SP2 or later The supported...

Page 96: ...rnel command line as follows kernel vmlinuz kernel_ver other_options hda noprobe hdb noprobe 2 Now the devices dev hda and dev hdb are disabled and the machine must be prepared to use the paravirtuali...

Page 97: ...to vif mac 00 16 3e 55 24 21 type netfront 5 At the terminal enter xm new vm_cfgfile to reference the virtual machine in the Xen store so it is managed again 6 Restart the virtual machine by using Ya...

Page 98: ...k 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...

Reviews: