Contents
A VM Guest is comprised of an image containing an operating system and data files and a configuration file describing the VM Guest's virtual hardware resources. VM Guests are hosted on and controlled by the VM Host Server.
Clicking vm-install. It provides the graphical that guides you through the guest installation. vm-install can also be run directly from the command-line or from YaST by choosing + .
in the Virtual Machine Manager launchesStart the
as described above and click .Choose whether to install an operation system or an already existing image or disk.
Select the operating system you want to install from the list. Each entry provides reasonable defaults for the chosen operating system.
The
page shows the default configuration for the chosen operating system. Edit the configuration by clicking on a headline. When having chosen to install a system, you at least have to specify either an image or a CD/DVD device from which to boot or choose PXE boot. When accepting the configuration with , the guest system boots to start the installation.Change the proposed configuration by clicking on a headline in the Summary page of the Create Virtual Machine Wizard:
Specify a _-.:+
characters. It must be unique among all
VM Guests on the VM Host Server. It is used to create and name the guest’s
configuration file and you will be able to access the guest with this
name from virsh.
Change memory and CPU assignments in this screen. It is recommended not to specify values larger than the resources the VM Host Server can provide (overcommit), since it may result in fatal errors or performance penalties.
The virtio
here.
Enabling | (Para-Virtualization)|
---|---|
If you enable para-virtualization by activating
Overwriting the default by activating para-virtualization for non-supported operating system currently only makes sense for SUSE Linux Enterprise Server SP3, if you plan to add the para-virtualized drivers during the installation (see Section 5.3.1, “Adding para-virtualized Drivers During the Installation” for installation instructions). |
Configure the type of virtualized graphics hardware and the keymap in this dialog. If you disable the graphics card support, the machine is only accessible via network services (ssh) or serial port.
: Manage virtual hard disks and CD/DVD drives in this dialog. A VM Guest must have at least one virtual disk—either an existing one or a newly created disk. Virtual disks can be:
a single file with a fixed size
a single file that grows on demand (Sparse Image
File)
Sufficient Space for Sparse Image Files | |
---|---|
When creating sparse image files, the partition on which you create them always needs sufficient free space. The VM Guest has no means to check the VM Host Server disk space. Having no space left on the host partition causes write errors and loss of data on the guest system. |
a block device, such as an entire disk, partition, or a network 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.
Live Migration | |
---|---|
If you need to be able to migrate your VM Guest to another host without shutting it down (live migration), all disks must reside on a network resource (network file system or iSCSI volume) that is accessible from both hosts. |
By default, a single, file-backed virtual disk is created as a sparse
image file in
/var/lib/kvm/images/
where VM_NAME
/VM_NAME
is the name of the virtual
machine.
Supported Disk format | |
---|---|
Currently, only the raw disk format is supported by Novell. |
Procedure 5.1. Creating a Virtual Disk
Click
.
Enter a /dev/disk/by-path/
.
It is strongly recommended not to use the simple device paths such as
path
/dev/sdb
or /dev/sda5
,
since they may change (by adding a disk or by changing the disk order
in the BIOS).
Specify the raw
format.
Enter a
in GB. This option is only available for file-backed disks.Choose whether to create a
. This option is only available for file-backed disks. If you want to disable write-access to the disk, choose .If you want to install from DVD or CD-ROM, add the drive to the list of available hard disks. To learn about device nodes of the available optical drives, run:
hwinfo --cdrom | egrep "(Device File:|Model:)"
Instead of the real DVD or CD-ROM drive, you can also add the ISO image of an installation medium. Note that each CD-Rom drive or ISO image can only be used by one guest at the same time.
To add a CD/DVD-ROM device or an ISO image, proceed as follows:
Click
.Enter a
. If adding a device, enter its node. If adding an ISO image, either enter the path directly or click to open a file browser.Specify the
. Choose for an ISO image and for a device.The disks are listed in the order in which they have been created. This order also represents the boot order. Use the
and arrows to change the disk order.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 on the VM Host Server. You can adjust the configuration in this dialog or create additional virtual network cards.
To add a new network adapter or edit an existing one, proceed as follows:
Click
to add a card or to change the configuration of the selected card.Choose a
from the drop-down list.Supported Virtual Network Adapter Types | |
---|---|
Currently, only |
Choose a
from the drop-down list.Choose whether to assign a randomly generated MAC address or manually specify an address.
MAC addresses need to be unique | |
---|---|
When choosing to manually specify a MAC address, make sure it is not already used in your network. If so, it may result in network problems, especially when using DHCP. Therefore avoid specifying MAC addresses such as 52:54:00:12:34:56 or 52:54:00:11:22:33. It is strongly recommended to always use a randomly generated MAC address for each adapter. |
This dialog is only available when having chosen to install an operating system. The installation can be booted from a virtual disk, from a CD/DVD device, from an ISO image or via PXE boot over the network— use this dialog to configure the boot device.
Also use this dialog to configure the behavior of the VM Guest when the operating system is powered off, rebooted or if it crashes. The following options are available
normal cleanup
a new VM Guest is started in place of the old one
no cleanup, do not delete temporary, configuration and image files
the VM Guest is not cleaned up but is renamed and a new domain started in its place
a crashed machine's core is dumped before a normal cleanup is performed
a crashed machine's core is dumped before a normal restart is performed
If $DISPLAY
is not set (for example, when operating on a
console or on an ssh shell with no X-forwarding),
vm-install offers a command-line wizard to
interactively set up a VM Guest for installation. Once the setup is
completed, the newly created guest boots into the installation system
which can be connected via VNC.
Graphical User Interface needed for Installation | |
---|---|
Once the VM Guest boots into the installation, you need to connect to the graphical console via VNC to attend the installation. Therefore, you need to start the viewer from a graphical user interface. If you are working from a console with no access to a graphical user interface, you can set up the VM Guest configuration and start the installation at a later time. Refer to Section 5.2.1, “Defining a VM Guest without Starting the Installation” for instructions. |
To start the wizard, just type vm-install to start. For a lot of parameters, the installation wizard already provides reasonable defaults which you can confirm by just pressing . Here is a log of an interactive setup for a SUSE Linux Enterprise Server 11 installation:
Example 5.1. Interactive Setup on the Command Line Using vm-install¶
~ # vm-install Gathering settings... Please specify the type of operating system that will run within the virtual machine. This defines many defaults, and helps decide how to start paravirtualized operating systems. Press 'q' or the Escape key to exit. 1: Novell Open Enterprise Server 2 (Linux) 2: Novell Open Enterprise Server 2 (NetWare) 3: Other operating system 4: PXE 5: RedHat (other) 6: RedHat Enterprise Linux 3 7: RedHat Enterprise Linux 4 8: RedHat Enterprise Linux 5 9: SUSE (other) 10: SUSE Linux Enterprise Desktop 10 11: SUSE Linux Enterprise Desktop 11 12: SUSE Linux Enterprise Server 8 13: SUSE Linux Enterprise Server 9 14: SUSE Linux Enterprise Server 10 15: SUSE Linux Enterprise Server 11 16: Solaris 9 and older 17: Solaris 10 18: Windows (other) 19: Windows (other, x64) 20: Windows NT 21: Windows Server 2008 22: Windows Server 2008 (x64) 23: Windows Vista, Windows 7 24: Windows Vista, Windows 7 (x64) 25: Windows XP, 2000, 2003 26: Windows XP, 2003 (x64) 27: openSUSE 28: openSUSE 11 [15] > PXE Boot (Y / N) [N] > Please choose a name for the virtual machine. [sles11] > Description > SLES 11 SP1 Specify the amount of memory and number of processors to allocate for the VM. Initial Memory [512] > Maximum Memory [512] > 768 Warning: Setting the maximum memory greater than the initial memory requires the VM operating system to have a memory balloon driver. Virtual Processors [2] > Please specify the type of virtualized graphics hardware. 1: Cirrus Logic GD5446 VGA 2: No Graphics Support 3: VESA VGA [1] > Virtual Disks: (None) Do you want to add another virtual disk? (Y / N) [Y] > Create a virtual disk based on a device (CD or other block device), an existing image file (ISO), or a new file. Specify a device by its device node, such as /dev/cdrom, not its mount point. What type of virtual disk do you want to add? 1: CD-ROM or DVD 2: Floppy 3: Hard Disk [3] > 3 Where will the virtual disk physically reside? [/var/lib/kvm/images/sles11/hda] > Size (GB) [4.0] > 8.0 Create a sparse image file for the virtual disk? (Y / N) [Y] > Virtual Disks: 8.0 GB Hard Disk (file:/var/lib/kvm/images/sles11/hda) Do you want to add another virtual disk? (Y / N) [N] > y Create a virtual disk based on a device (CD or other block device), an existing image file (ISO), or a new file. Specify a device by its device node, such as /dev/cdrom, not its mount point. What type of virtual disk do you want to add? 1: CD-ROM or DVD 2: Floppy 3: Hard Disk [3] > 1 Where will the virtual disk physically reside? [/var/lib/kvm/images/sles11/hdb] > /isos/SLES-11-SP1-CD-i386-GM-CD1.iso Virtual Disks: 8.0 GB Hard Disk (file:/var/lib/kvm/images/sles11/hda) 2.9 GB CD-ROM or DVD (file:/isos/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso) Do you want to add another virtual disk? (Y / N) [N] > Network Adapters (None) Do you want to add another virtual network adapter? (Y / N) [Y] > What type of virtual network adapter do you want to add? 1: Fully Virtualized AMD PCnet 32 2: Fully Virtualized Intel e100 3: Fully Virtualized Intel e1000 4: Fully Virtualized NE2000 (ISA Bus) 5: Fully Virtualized NE2000 (PCI Bus) 6: Fully Virtualized Realtek 8139 7: Paravirtualized [6] > 7 Network Adapters Paravirtualized; Randomly generated MAC address Do you want to add another virtual network adapter? (Y / N) [N] > Preparing to start the installation... Installing...
You may also provide parameters on the command line. The wizard will then prompt you for any missing parameters. In the following all parameters from Example 5.1, “Interactive Setup on the Command Line Using vm-install” for which a command line switch exists, are specified. See man 8 vm-install for a full list of parameters.
Example 5.2. vm-install command line switches¶
vm-install --os-type sles11 --name "sles11_test" \ --vcpus 2 --memory 512 --max-memory 768 \ --disk /var/lib/kvm/images/sles11/hda,0,disk,w,8000,sparse=1 \ --disk /iso/SLES-11-SP1-DVD-x86_64-GM-DVD1.iso,1,cdrom \ --nic mac=52:54:00:05:11:11,model=virtio \ --graphics cirrus --config-dir "/etc/libvirt/qemu"
Specifies the guest operating system to define suitable defaults. A
list of valid values can be obtained with vm-install
| |
Name of the VM Guest. This name must be unique. | |
Number of virtual processors. | |
Initial amount of memory. | |
Maximum amount of memory. Requires an operating system with a para-virtualized driver. | |
Defines a virtual hard disk. The file is located at
| |
Defines an ISO image for a CD-ROM as the second ( | |
Configures a para-virtualized network device with the MAC address
| |
Specifies the graphics card. | |
The directory in which the XML configuration file for the virtual
machine will be stored. It is strongly recommended to use the default
directory |
No Automated and Non-Interactive Setup | |
---|---|
An automated installation in the background utilizing, for example, AutoYaST
or a NetWare Response File with vm-install
The non-interactive setup of a VM Guest with vm-install
|
vm-install provides the --no-install
parameter. With this parameter the
XML configuration file defining the VM Guest is created, but the guest
does not booted automatically. You may use it regardless whether you start
vm-install in wizard mode or whether you specify all
other options in the command line.
No Virtual Disk Creation | |
---|---|
When using the |
Once the VM Guest XML configuration file is successfully created, you need to “register” it so it is recognized by Virtual Machine Manager or virsh. Do so by running:
virsh -c qemu:///system define PATH_TO_XMLFILE
This section provides instructions for operations exceeding the scope of a normal installation, such as adding para-virtualized drivers during the installation or including add-on packages.
Installing an operating system out of the box on machines with para-virtualized devices is currently only possible with SUSE Linux Enterprise Server 11 SP1 or RedHat Enterprise Linux 5.4 and newer. Novell offers para-virtualized drivers for SUSE Linux Enterprise Server 10 SP3 and Windows operating systems, that can be installed manually.
In case of SUSE Linux Enterprise Server 10 SP3 these drivers can be added at the start of the installation. Thus it is possible to install on a virtual machine with para-virtualized devices (hard disk, network adapter and memory ballooning). See Section 5.1.1.2, “ on how to activate para-virtualization when setting up a virtual machine. Windows operating systems refuse to install on para-virtualized drives, even if adding the drivers during the installation. Therefore para-virtualization for Windows can only be activated in an already installed system. ”
See Section A.1, “Installing Para-Virtualized Drivers” for instructions on installing para-virtualized drivers in an already installed system.
SUSE Linux Enterprise Server 10 SP3 does not support para-virtualized devices out of the box, because the drivers are not included. In order to use such devices, add the missing drivers during the installation. Proceed as follows:
Download the ISO image containing the para-virtualized drivers from http://drivers.suse.com/novell/Novell-virtio-drivers-2.6.27/sle10-sp3/novell-virtio-drivers-2.6.27-sle10sp3.iso.
When setting up the VM Guest, specify the ISO image containing the para-virtualized drivers as CDROM device. If you are installing from CDROM or from an ISO image, make sure to configure the para-virtualized driver image as the second CDROM device.
Finish the guest setup and start the installation. Enter
dud=1
at the boot prompt and boot into the installation.
After the installation system has loaded, a pop-up window opens and asks for the device from which to install the drivers. Choose the CDROM device containing the drivers.
Some operating systems such as SUSE Linux Enterprise Server offer to include add-on products in the installation process. In case the add-on product installation source is provided via network, no special VM Guest configuration is needed. If it is provided via CD/DVD or ISO image, it is necessary to provide the VM Guest installation system with both, the standard installation images and the image for the add-on product.
First add the standard installation image, and second the physical
CD/DVD-ROM or add-on image. The image or device added first is
automatically chosen as the boot image. In case you install SUSE Linux Enterprise Server, it
will be configured as /dev/sr0
, while the add-on
product source will be configured as /dev/sr1
.