Contents
A virtual machine is comprised of data and operating system files that define the virtual environment. Virtual machines are hosted and controlled by the virtual machine host. This section provides generalized instructions for installing virtual machines.
Virtual machines have few if any requirements above those required to run the operating system. If the operating system has not been optimized for the virtual machine host environment, the unmodified OS can run only on hardware-assisted virtualization computer hardware, in full 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 machines. Consult the operating system license agreement for more information.
![]() | Virtual Machine Architectures |
---|---|
The virtual machine host runs only on x86, AMD64 and Intel 64 hardware. It does not run on other system architectures such as Itanium, or POWER. A 64-bit virtual machine host can also run a 32-bit operating system, while a 32-bit host cannot run a 64-bit client. This holds true for both, the controlling domain and all further guests. |
Before creating a virtual machine, you need the following:
Install a host server as described in Chapter 2, Setting Up a Virtual Machine Host.
If you want to use an automated installation file (AutoYaST, NetWare® Response File, or RedHat Kickstart), you should create and download it to a directory on the host machine server or make it available on the network.
For NetWare and OES Linux virtual machines, you need a static IP address for each virtual machine you create.
If you are installing Open Enterprise Server (OES) 2 Linux, you need a network installation source for OES 2 Linux software including the SUSE Linux Enterprise Server 10 SP4 media and the OES 2 Linux add-on CD. For procedures to create the installation sources, see "Setting Up the Server Holding the Installation Sources" in the SUSE Linux Enterprise Server 10 Installation and Administration Guide
For further prerequisites, consult the manuals of the respective operating system to install.
The Create Virtual Machine Wizard helps you through the steps required to create a virtual machine and install its operating system. The information that follows is generalized for installing any operating system. In addition to these instructions, you should consult Chapter 6, Xen Guest Systems for information specific to the operating system you are installing.
The actual configuration files for the Xen guests are stored at
/etc/xen/vm/
. The default location for image
files is /var/lib/xen/images
.
Launch the
by using one of the following methods:From the virtualization host server desktop, click
+ +From within Virtual Machine Manager, click
.At the command line, enter vm-install.
If the wizard does not appear or the vm-install command does not work, review the process of installing and starting the virtualization host server. The virtualization software might not be installed properly.
You can choose to run an installation program or choose a disk or disk image that already has an installed and bootable 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
, consult Chapter 6, Xen Guest Systems
for instructions specific to the operating system you are installing.
Information about the following operating systems is included:
OES NetWare Virtual Machines, see Section 6.1, “NetWare Virtual Machines”.
OES Linux Virtual Machines, see Section 6.2, “OES Linux Virtual Machines”.
SUSE Linux Virtual Machines, see Section 6.3, “SUSE Linux Virtual Machines”.
Windows Virtual Machines, see Section 6.4, “Windows Virtual Machines”.
When running through the creation of a VM Guest, the following steps have to be accomplished:
Select if the VM Guest should run as full or paravirtualized guest.
If your computer supports hardware-assisted virtualization, you can create a virtual machine that runs in fully virtual mode. If you are installing an operating system that is modified for virtualization, you can create a virtual machine that runs in paravirtual mode. For more information about virtualization modes, see Section 1.2, “Understanding Virtualization Modes”.
Each virtual machine must have a unique name. The name entered on this
page is used to create and name the virtual machine’s configuration
file. The configuration file contains parameters that define the
virtual machine and is saved to the /etc/xen/vm/
directory.
The Hardware page allows you to specify the amount of memory and number of virtual processors for your virtual machine.
The amount of memory initially allocated to the virtual machine (specified in megabytes).
The largest amount of memory the virtual machine will ever need.
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 CPUs: however, for best performance, the number of virtual processors should be less than or equal to the number of physical processors.
Select the graphics mode to use:
The virtual machine operates like a server without a monitor. You can access the operating system through operating system supported services, such as SSH or VNC.
Requires that an appropriate graphics driver is installed in the operating system.
A virtual machine must have at least one virtual disk. Virtual disks can be:
File backed, which means that the virtual disk is a single image file on a larger physical disk.
A sparse image file, which means that the virtual disk is a single image file, but the space is not preallocated.
Configured from a block device, such as an entire disk, partition, or volume.
For best performance, create each virtual disk from an entire disk or a partition. For the next best performance, create an image file but do not create it as a sparse image file. A virtual disk based on a sparse image file delivers the most disk-space flexibility but slows installation and disk access speeds.
By default, a single, file-backed virtual disk is created as a
sparse image file in
/var/lib/xen/images/
where vm_name
vm_name
is the name of the virtual machine.
You can change this configuration to meet your specific requirements.
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.
By default, a single virtual network card is created for the virtual machine. It has a randomly generated MAC address that you can change to fit your desired configuration. The virtual network card will be attached to a default bridge configured in the host. You can also create additional virtual network cards in the Network Adapters page of vm-install.
![]() | Using Arbitrary Bridge Names |
---|---|
If installing a fully virtualized guest and you are using a bridge name that is different than the default names, explicitly specify the bridge by selecting the bridge name from the menu on the Virtual Network Adapter page. Paravirtual guests by definition are aware they are running on a virtualization platform and therefore, do not need to have the bridge explicitly specified, thus leaving as will suffice. |
The operating system can be installed from a CD/DVD device or an ISO image file. In addition, if you are installing a SUSE Linux operating system, you can install the operating system from a network installation source.
If you are installing a paravirtual machine's operating system from CD, you should remove the virtual CD reader from the virtual machine after completing the installation, because the virtual machine assumes that the original CD is still in the CD reader, even if it is ejected. If it is ejected, the virtual machine cannot access the CD (or any other newly inserted CD) and receives I/O errors.
![]() | Changing CD-Roms |
---|---|
On paravirtual guests, it is currently not possible to go on with the installation 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 5.1.1, “Virtual CD Readers on Paravirtual Machines”. |
If the installation program is capable of recognizing an installation profile, response file, or script, you can automate the installation settings by specifying the location of the profile, response file, or script you want to use. For example, SUSE Linux uses an AutoYaST profile, NetWare uses a NetWare Response File, and Red Hat uses a Kickstart file to move through the installation screens with no interaction.
You can also pass instructions to the kernel at install time by
entering parameters for the 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 on the Chapter 6, Xen Guest Systems.
screen is correct, click to create the virtual machine. A TightVNC screen appears and at this point you begin the installation of your OS. From this point on, follow the regular installation instructions for installing your OS. More information for any instructions that might be different for installing your OS in a virtualized environment may be found inIn 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 standard installation images and the image for the Add-On product.
First, add the system disk, the SUSE Linux Enterprise Server 10 SP4 installation image and the physical CD-Rom or Add-On image as disks to the VM Guest. For example, you may have:
Main system disk.
ISO image of the installation medium.
ISO image of the Add-On product.
During the installation, add the Add-On product to the installation by
entering the device path. Commonly, this path looks like
hd:///?device=/dev/xvd<letter>
.
In the special example with “xvdc” as Add-On product,
this would look like:
hd:///?device=/dev/xvdc
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 wizard is helpful in environments without a graphical user interface. This command defaults to using a graphical user interface if available and if no options were given on the command line.
For information on scripting a virtual machine installation, see the man pages of vm-install and vm-install-jobs.
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 virtual disk
image file (/var/lib/xen/images/
) and its initial
startup file (/etc/xen/vm
).
In SUSE Linux Enterprise Server 10, the device naming is different than the device naming of SUSE Linux Enterprise Server 9. Therefore, a SUSE Linux Enterprise Server 9 VM Guest will not be able to find its root file system when running on a SUSE Linux Enterprise Server 10 VM Host Server.
To be able to still boot the system, you must know which device
is used for the root partition of your virtual system. For
example, hda
xx
will be changed to
xvda
xx
where
xx
is the partition number.
When booting the system, you have to append an extra root option
to the kernel command line, that tells the system about its root
file system. If your VM Guest used to live on
/dev/hda2
, append the string
root=/dev/xvda2
to the kernel command line.
This option should enable you to boot the system, although
additional filesystems still will not be available to the system.
To make all the needed file systems available to the VM Guest, do the following:
In order to have a valid initial ramdisk that knows about the new location of the root filesystem, run the command mkinitrd.
Start the VM Guest with the extra root=
command line as explained above.
Log into the system as user root
.
Edit the file /etc/fstab
and correct all
device entries.
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.
Reboot the virtual machine.
In some circumstances, problems may occur during the installation of the VM Guest. This section describes some known problems and their solutions.
The software I/O translation buffer allocates a large chunk of low memory early in the bootstrap process. If the requests for memory exceed the size of the buffer it usually results in a hung boot process. To check if this is the case, switch to console 10 and check the output there for a message similar to
kernel: PCI-DMA: Out of SW-IOMMU space for 32768 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 for
the machine.