Virtualization: Configuration Options and Settings

Contents

5.1. Virtual CD Readers
5.2. Remote Access Methods
5.3. VNC Viewer
5.4. The Boot Loader Program
5.5. Changing the Host’s Desktop from Text Mode to GUI Mode
5.6. Paravirtual Mode and Journaling File Systems
5.7. Virtual Machine Initial Startup Files
5.8. Sparse Image Files and Disk Space
5.9. Virtual Keyboards
5.10. Mapping Physical Storage to Virtual Disks
5.11. Virtual Disks
5.12. Migrating Virtual Machines
5.13. Passing Key Combinations to Virtual Machines
5.14. xm block-list Device Numbers
5.15. File-Backed Virtual Disks and Loopback Devices
5.16. Saving Virtual Machines
5.17. Restoring Virtual Machines
5.18. Virtual Machine States

The documentation in this section, describes advanced management tasks and configuration options that might help technology innovators implement leading-edge virtualization 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.

Virtual CD Readers

Virtual CD readers can be set up when a virtual machine is created or added to an existing 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.

[Note]Note

Only limited support for virtual machine removable media is available in the original version of SUSE Linux Enterprise Server. Much of the following information pertains to functionality available in maintenance updates.

If you are installing drivers from the SUSE Linux Enterprise Virtual Machine Driver Pack, proceed by completing one of the following:

  • If you have updated to virt-manager 0.3.1-0.24 or later, complete the instructions in Section 5.1.3, “Adding Virtual CD Readers”--> to set up the ISO image file as a virtual CD reader.

    The most recent virt-manager package is available through the SUSE Linux Enterprise 10 SP1 update channel.

  • If you are running an earlier version of virt-manager, you must set up the ISO image file as a virtual CD reader when you create the virtual machine, or add a virtual CD reader based on the ISO image file following the instructions in Section 5.1.4, “Adding Virtual CD Readers (Command Line Method)”-->.

Virtual CD Readers on Paravirtual Machines

A paravirtual machine can have up to 16 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 access. Unless you remove the virtual CD reader, the virtual machine assumes that the originally-inserted CD is still in the CD reader, even if you have ejected it. If it has been ejected, the virtual machine will not be able to access the CD (or any other newly-inserted CD) and will receive I/O errors. Virtual CD readers cannot be used to write data to a CD. They are configured as read-only devices.

After you have finished accessing a CD on a paravirtual machine, it is recommended that you remove the virtual CD reader from the virtual machine.

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. To create an image file, the following command may be used:

dd if=/dev/cdrom of=<path to image>/cdimage.iso

On request of the installation system, press Details and manually point to the correct disk by changing xvdb to xvdc, xvdc to xvdd and so on.

Virtual CD Readers on Fully Virtual Machines

A fully virtual machine can have up to four block devices comprised of virtual CD readers and virtual disks. A virtual CD reader on a fully virtual machine interacts with the inserted CD in the way you expect 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 machines 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 automount functionality, the CD should automatically appear in the file system. Virtual CD readers cannot be used to write data to a CD. They are configured as read-only devices.

Adding Virtual CD Readers

Virtual CD readers can be based on a CD inserted into the CD reader or on an ISO image file.

  1. Make sure that the virtual machine is running and the operating system has finished booting.

  2. Insert the desired CD into the physical CD reader or copy the desired ISO image to a location available to the virtual machine’s file system.

  3. Run Virtual Machine Manager.

  4. Select the virtual machine, then click Details.

  5. Click Hardware+Disk.

  6. Click CD-ROM.

  7. Specify the path to the physical CD reader, such as /dev/cdrom. If you are adding a virtual CD reader based on an ISO, specify the path to the ISO image file.

  8. Click OK to apply the changes.

    A new block device, such as /dev/xvdb, is added to the virtual machine.

  9. If the virtual machine is running Linux, complete the following:

    1. Open a terminal in the virtual machine and enter fdisk -l to verify that the device was properly added. You could 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
      
    2. Enter the command to mount the CD or ISO image using its drive designation. For example, enter

      mount -o ro /dev/xvdb /cd1
      

      mounts the CD to a mount point named /cd1.

      The CD or ISO image file should be available to the virtual machine at the specified mount point.

  10. If the virtual machine is running Windows, reboot the virtual machine.

    Verify that the virtual CD reader appears in its My Computer section

Adding Virtual CD Readers (Command Line Method)

  1. Make sure that the virtual machine is running and that the operating system has finished 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

    • To set up an ISO image file, enter:

      xm block-attach vm_id file:/mycd.iso hdc:cdrom r
      

      where vm_id is the virtual machine ID, mycd.iso is the path to the ISO image file, and hdc is the drive designation presented to the virtual machine.

      If the 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, and cdrom is the name you specify for the device.

      If the virtual machine is paravirtual, replace the hdc drive designation with a vdb x drive designation, such as

      xm block-attach vm_id phy:/dev/cdrom xvdb:cdrom r
      
  4. Conditional: If running full virtualization mode, reboot the virtual machine.

The CD or ISO image file should appear in the virtual machine’s operating system.

Removing Virtual CD Readers

  1. Make sure that the virtual machine is running and the operating system has finished booting.

  2. If the virtual CD reader is mounted, unmount it from within the virtual machine.

    [Tip]Tip

    You can enter fdisk -l in the virtual machine’s terminal to view its block devices.

  3. Run Virtual Machine Manager.

  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.


SUSE Linux Enterprise Server 10 SP2