X
  • KVM
    July 6, 2017

KVM Deploying Guest VMs with ISO

Ruggero Citton
Product Development Architect

Article Table of Contents

There are at least three methods of creating a guest on ODA KVM machine: the virt-install tool, the virt-manager tool, and the virsh tool (in conjunction with XML files).

Deploy a KVM guest using virt-install (command line)

You can create a KVM guest with the virt-install command-line tool. This topic provides information about creating KVM guests, and specific example for Oracle Linux 7.

Example: Deploy a KVM Guest VM with Oracle Linux 7

The following command code example creates a KVM guest running Oracle Linux 7. Assumptions :

  • You have a running storage pool repository (/kvm_repos/kvm_repo1/)
  • MACVTap network bridge over public NIC btbond1 will be used
  • The OL6 ISO is available on ODA

The basic Command:

virt-install --name=OL-1 \
               --ram=16384 \
               --vcpus=4 \
               --os-type=linux \
               --os-variant=rhel7 \
               --accelerate \
               --disk /kvm_repos/kvm_repo1/OL-1_boot.img,device=disk,size=40,sparse=yes,cache=none,format=qcow2,bus=virtio \
               --network type=direct,source=btbond1,model=virtio \
               --vnc \
               --noautoconsole \
               --cdrom=/iso/OracleLinux-R7-U3-Server-x86_64-dvd.iso

Parameters Details

  • --name Name of the guest instance
  • --ram Memory to allocate for guest instance in megabytes
  • --vcpus Number of vcpus to configure for your guest
  • --os-type The OS type being installed
  • --os-variant The OS variant being installed guests
  • --accelerate KVM kernel acceleration capabilities are used
  • --disk you define the path, then comma delimited options, device is the type of storage, bus is the interface ide, scsi, usb, virtio – virtio is the fastest
  • --network The network configuration, in this case we are connecting to a MACVTap bridge over "btbond1", and using the virtio drivers which perform much better
  • --vnc configures the graphics card to use VNC allowing you to use virt-viewer or virt-manager to see the desktop as if you were at the a monitor of a physical machine
  • --noautoconsole configures the installer to NOT automatically try to open virt-viewer (if installed) to view the console to complete the installation – this is helpful if you are working on a remote system through SSH without graphical environment
  • --cdrom this option specifies the iso image with which to boot off
Note: instead to use '--cdrom', the OS installation source can be on http, nfs, ftp using
  •     --location=(eg, nfs:host:/path, http://host/path, ftp://host/path)
 

Deploy a KVM guest using virt-manager (GUI)

virt-manager, also known as Virtual Machine Manager, is a graphical tool for creating and managing guest virtual machines.

1. Lunch virt-manager

2. Create a new virtual machine

Click the Create a new virtual machine button to open the new vm wizard

3. Specify the installation type "Local install media (ISO image or CDROM)"

4. Locate the ISO image, Configure OS Type and Version

5. Configure CPU and memory

6. Configure the virtual storage

Note: "Manage" will give you the possibility to create a volume under a KVM "pool" (It should be an ACFS volume created previously)

7. Final Configuration

Verify the settings of the virtual machine and click "Begin Installation" 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.