6.3 SUSE Linux Virtual Machines

On host computers running SUSE Linux Enterprise Server 10 SP4, the following SUSE Linux operating systems are supported as guests.

Operating System

Fully virtual

Paravirtual

SUSE Linux Enterprise Server 10 SP1

Yes

Yes

SUSE Linux Enterprise Server Server 10

 

Yes

Open Enterprise Server 2 Linux*

Yes

Yes

Open Enterprise Server 1 Linux*

 

Yes

SUSE Linux Enterprise Desktop 10 SP1

Yes

Yes

SUSE Linux Enterprise Server 9 SP4

Yes

Yes

SUSE Linux Enterprise Server 9 SP3

Yes

 

6.3.1 SLE Virtual Machines on Host Architectures

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 following combinations of domain 0 and hypervisor architecture.

Table 6-1 Virtual Machines and Host Architectures

Operating System and Virtualization Mode

Hypervisor and Domain 0

SLE (32-bit) - Fully virtual

  • 32-bit hypervisor / 32-bit domain 0

  • 32-bit PAE hypervisor / 32-bit PAE domain 0

  • 64-bit hypervisor / 32-bit PAE domain 0

  • 64-bit hypervisor / 64-bit domain 0

SLE (32-bit) - Paravirtual

  • 32-bit hypervisor / 32-bit domain 0

SLE (32-bit PAE) - Fully virtual

  • 32-bit PAE hypervisor / 32-bit PAE domain 0

  • 64-bit hypervisor / 32-bit PAE domain 0

  • 64-bit hypervisor / 64-bit domain 0

SLE (32-bit PAE) - Paravirtual

  • 32-bit PAE hypervisor / 32-bit PAE domain 0

  • 64-bit hypervisor / 32-bit PAE domain 0

  • 64-bit hypervisor / 64-bit domain 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.3.2 Updating SLE 10 Virtual Machines to SLE 10 SP2

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 10 SP1 by recreating the virtual machine from the settings stored in the virtual machine’s configuration file.

SLE 10 virtual machines created on a SLE 10 SP1 host do not need to follow the same procedures to be updated to SP1. In addition, SLE 10 did not support SLE 10 fully virtual machines.

NOTE: In SLE 10, changing the configuration of a virtual machine by editing its configuration file (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, complete the following procedure.

  1. Make sure the host computer is running 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 system environment for the update by completing any prerequisite tasks. It is recommended to make a copy of the entire virtual disk.

  3. Shut down the virtual machine you want to update.

  4. View or print the virtual machine’s configuration file located at etc/xen/vm/vm_name.

  5. On Domain0, use Virtual Machine Manager to create a new virtual machine.

  6. Choose the selection to install an operating system.

  7. Specify the settings for the new virtual machine as the same settings specified in the VM’s configuration file.

    Make sure the following settings in Virtual Machine Manager match those in the VM’s configuration file.

    • Network MAC address

    • Memory size

    • Virtual disk size

  8. Make sure to select or specify the virtual machine’s already-created disk or disk image, for example, hda, as the virtual disk.

    For example, if the SLE 10 virtual machine was using /var/lib/xen/images/sles10/disk0 as its disk, the updated virtual machine should specify the same disk.

  9. Specify the virtual machine operating system installation source as the SLE 10 SP1 installation media.

  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 10 SP1 installation program.

    A new window displaying the installation program opens on the Domain0.

    If the new windows does not display, select the virtual machine in Virtual Machine Manager, and click Open.

  12. During the installation program, select Update from the Installation Mode screen.

  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 installation, click No.

  15. Continue the installation/update by following the instructions on the screen.

    The installation program continues by booting the virtual machine and displaying the rest of the installation in text mode.

    After the installation program is completed, the virtual machine should run SLE 10 SP1 and be registered with xend.

  16. Log in to the SLE 10 SP1 virtual machine.

  17. If you want the SLE 10 SP1 virtual machine to run in GUI mode, complete the following from its command line:

    1. Enter init 3.

    2. Enter sax2 to configure the GUI environment.

    3. Enter init 5 to restart the GUI.

  18. Open the virtual machine’s /etc/inittab file with a text editor.

  19. Find the section titled

    # getty-programs for the normal runlevels
    
  20. After the line 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/mingetty tty5
    6:2345:respawn:/sbin/mingetty tty6
    
  21. Save the file and restart the virtual machine’s operating system.

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 10 SP1 virtual machine should perform correctly. Configuration changes should be made using Virtual Machine Manager or by modifying xend settings.

6.3.3 Using the Add-On Products Program

The Add-On Products program is available during the SLE operating system installation and after installation at YaST > Software > Add-On Products. It allows you to install additional products that may reside on a separate CD, ISO image file, or installation source.

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.

On fully virtual machines, you can use the Add-On Products program to specify add-on product media as a network installation source, an ISO image file, or as a CD inserted in the host’s CD reader.

6.3.4 Virtual Machine 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. Paravirtual machines manage clock time according to their independent wallclock 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 operating system is configured for NTP and the virtual machine's independent wallclock setting is disabled, it will still periodically synchronize its time with the host time. This dual type of configuration can result in time drift between virtual machines that need to be synchronized. To effectively use an external time source, such as NTP, for time synchronization on a virtual machine, the virtual machine's independent wallclock setting must be enabled (set to 1). Otherwise, it will continue to synchronize its time with its host.

Viewing the Independent Wallclock Setting

  1. Log in to the virtual machine’s operating system as root.

  2. In the virtual machine environment, enter

    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 managing its time independently from the host.

Permanently 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.independent_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.

Temporarily Changing the Independent Wallclock Setting

  1. Log in to the virtual machine environment as root.

  2. Enter the following command:

    echo "1" > /proc/sys/xen/independent_wallclock
    

    Enter 1 to enable or 0 to disable the wallclock settting.

  3. Add or change the following entry:

    xen.independent_wallclock=1
    

    Enter 1 to enable or 0 to disable the wallclock setting.

    Although the current status of the independent wallclock changes immediately, its clock time might not be immediately synchronized. The setting persists until the virtual machine reboots. Then, it gets its initial clock time from the host and uses the independent wallclock according to setting specified in the sysctl.conf file.

6.3.5 Updating a Network Installation Source

The installation of SUSE Linux Enterprise 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. 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 $HOME/bin

  3. Copy the script create_update_source.sh from http://www.suse.de/~ug/tools/create_update_source.sh to the bin/ directory and make it executable.

    cd $HOME/bin
    wget http://www.suse.de/~ug/tools/create_update_source.sh
    chmod 755 create_update_source.sh
  4. Install the package inst-source-utils. Then, change your working directory to your network installation source.

  5. Run the command $HOME/bin/create_update_source.sh /srv/ftp.

  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 installation 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 *; do echo -n "META SHA1 "; \
    sha1sum $i|awk '{ORS=""; print $1}'; \
    echo -n " "; basename $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 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/.