Home Wiki > How to Add a VM
Sign up | Login

How to Add a VM

tagline: openSUSE sitesinden

Launch YaST's VMM Module

After completing the steps in How to Install a Xen VM Server, you can use YaST to add VMs. The YaST module makes it so easy!

  1. Launch YaST Control Center.
  2. Click System > Virtual Machine Management (Xen).
    01system vmmxen.png
  3. From the Manage Virtual Machines screen, click Add.
    01manvm.png

Prepare the Virtual Machine Environment

  1. Choose which method to use to set up the VM's operating system. You can run an OS installation program or use an already-installed disk or disk image that contains OS boot files.
  2. Change the settings (as required). When the OS installation program runs and loads into memory, it will recognize these settings as its virtual machine environment.
    • AutoYaST profile
    • Virtualization mode
    • VM properties such as VM name
    • Virtual hardware settings, such as allocated memory size, number of CPUs, and hardware clock
    • Virtual disk settings, such as size (such as 4GB) and type (such as a sparse image file or a "real" populated file)
    • Virtual network card settings, such as number of cards, MAC address, DHCP, and IP address.
    • Location of operating system installation program, such as CD/DVD, ISO image files, or network installation source.
  3. If you are installing from CD or DVD, insert CD1 or DVD1 into the CD reader.
  4. After reviewing and changing the settings (as required) on the Virtual Machine (Installation Settings) screen, launch the OS installation program by clicking Next. A new window opens and displays the first screen of the OS installation program.
    04startvmfull.png

Run the OS Installation Program

The first part of the installation program loads itself into memory and prompts you to choose a language, an installation mode, and a timezone.

  1. Complete each screen following the onscreen instructions. Make adjustments (as required) to the Installation Settings screen. Hint: Usually, no adjustments are required.
    04 1installsummary.png
  2. Read the Confirm Installation message.
  3. When you are satisfied with the settings, continue to the next section.

Copy OS Files to the VM's Disk

The second part of the OS installation program formats and copies files to the hard disk.

  1. From the Confirm Installation screen, click Install to continue the installation.
  2. If installing from CD, insert CD1, CD4, and then reinsert CD1 as prompted by the program.
  3. The files are copied from CD 1 and the VM automatically reboots.

Boot the VM's OS from the VM's Disk

When the VM boots its operating system, the Installation Complete screen appears.

  1. Click Continue on the
  2. Make any changes (as required) to the Virtual Machine (Final Settings) screen, and then click Next.
  3. The VM starts in a separate window and continues the OS installation program.
  4. If you are installing from DVD or using a Network Installation Source, skip to Step ??. If you are installing from CDs or ISO image files, you will receive the following message:
    03cannotAccess.png
    1. DO NOT EJECT THE CD! Instead of inserting the requested CD, you must complete the following steps each time you switch CDs:
    2. Open a terminal window and enter xm list. Note the name and the ID of the VM you are creating.
    3. Enter xm block-list vm_ID where vm_ID is the ID number of the VM. Decide which device is the mounted ISO image and note its Vdev number. Usually the last device displayed in the list is a mounted ISO image because the first devices are usually disk drives.
    4. Enter xm block-detach vm_ID Vdev_number. This command detaches the connection between the VM and the CD reader. For example, xm block-detach 1 832 detaches the the connection between VM ID 1 and Vdev 832.
    5. Enter eject to eject the CD.
    6. Insert the next CD (for example, CD2).
    7. Enter cat /etc/xen/vm/vm_name | grep disk where vm_name is the name of the VM you are creating. Note the attach string of the CD reader, which is usually listed towards the end of the output string and prefaced with phy: (for example, phy:/dev/sr0,hdb,r).
    8. Enter xm block-attach vm_ID attach_string where vm_ID is the VM’s ID number and attach_string is the attach string for the CD reader. For example, xm block-attach 1 phy:/dev/sr0 hdb r. Put spaces instead of commas between the attach_string parameters.
    9. Return to the VM’s installation program window and press OK to continue
    10. Repeat these steps each time the installation program indicates it cannot access the installation media.


Using an Already-Installed Disk Image

In progress.

This page is part of: