7.7. Creating a Virtual Machine

Before you create a new virtual machine, make sure that the following resources are available:

This section discusses creating a virtual machine using a template, and creating a virtual machine from an ISO file, or from physical or virtual disks.

To create a virtual machine using a template:

  1. Click the Servers and VMs tab.

  2. Click Create Virtual Machine Create Virtual Machine icon in the toolbar.

  3. The Create Virtual Machine wizard is displayed.

    This figure shows the Create Virtual Machine wizard.

    Select the Clone from an existing VM Template option.

    Enter or select the following:

    • Clone Count: The number of virtual machines to create from the template.

    • Repository: Select the repository in which to create the virtual machine configuration files.

    • VM Template: The template to use to create the virtual machines.

    • VM Name: A name for the virtual machines. The maximum name length is 256 characters and may contain any character. The name need not be unique. Each clone is suffixed with a dot and the clone number, starting with 0, for example MyVM.0, MyVM.1 and so on.

    • Server Pool: The server pool in which to deploy the virtual machines.

    • Description: A description of the virtual machines.

    Click Finish. The virtual machines are created and deployed to the server pool.

To create a virtual machine using all other media:

  1. Click the Servers and VMs tab.

  2. Click Create Virtual Machine Create Virtual Machine icon in the toolbar.

  3. The Create Virtual Machine wizard is displayed.

    This figure shows the Create Virtual Machine wizard.

    Select the Create a new VM option. Click Next.

  4. The Create Virtual Machine step is displayed in the wizard.

    This figure shows the Create Virtual Machines step in the Create Virtual Machine wizard.

    Enter or select the following:

    • Server Pool: The server pool on which to create the virtual machine.

    • Server: A Oracle VM Server on which to run the virtual machine. If you do not have a preference as to which Oracle VM Server to use, select Any and the Oracle VM Server with the most available resources is selected to host the virtual machine.

    • Repository: Select the repository in which to create the virtual machine configuration file.

    • Name: A name for the virtual machine. The maximum name length is 256 characters and may contain any character. The name need not be unique.

    • Enable High Availability: Select to enable HA. See Section 6.4, “High Availability (HA)” for more information on HA.

    • Description: A description of your virtual machine.

    • Operating System: The operating system of your virtual machine. This setting enables or disables certain virtual machine settings that your guest operating system may require.

    • Keymap: The keyboard mapping to use for the virtual machine.

    • Domain Type: The domain type of the virtual machine. Oracle recommends you create paravirtualized virtual machines if possible, as the performance of a paravirtualized virtual machine is superior to that of a hardware virtualized guest.

      • Xen HVM: Hardware virtualization, or fully virtualized. When you select this option you must supply an ISO file in a repository (in the Create Storage step of the wizard) from which to create the virtual machine. See Section 7.5.5, “ISO Files (CD/DVD Images)” for information on importing an ISO file into a repository.

      • Xen HVM, PV Drivers: Identical to Xen HVM, but with additional paravirtualized drivers for improved performance of the virtual machine. See Section 7.11, “Converting to Paravirtualized Guests or Installing Paravirtualized Drivers” for more information about using paravirtualized drivers. This Domain Type is used to run Microsoft Windows guest operating systems with an acceptable performance level.

      • Xen PVM: Paravirtualized. Enables you to select a location for the mounted ISO file from which to create the virtual machine. Before you create the virtual machine using the paravirtualized method, mount the ISO file on an NFS share, or HTTP or FTP server. You supply the location of the mounted ISO file in the Network Boot Path field in the Boot Options step of the wizard. For information on creating a mounted ISO file, see Section 7.4, “Virtual Machine Installation Media”.

      • OVM/SPARC: This domain type should be selected if the server pool and hypervisors use Oracle VM Server for SPARC as the hypervisor instead of Oracle VM Server for x86.

      • Unknown: This hypervisor should be selected if the domain type is unknown.

    • Max. Memory (MB): The maximum memory size the virtual machine can be allocated.

    • Memory (MB): The memory size the virtual machine is allocated. When creating a virtual machine, this is the memory allocation used when starting the virtual machine. You can change this when editing a running PVM and no virtual machine restart is required. For HVM guests, increasing or decreasing the memory requires the virtual machine to be stopped.

    • Max. Processors: The maximum number of processors the virtual machine can be allocated. The number of processors is expressed in number of physical CPU cores, and is limited to 128. This cannot be changed when editing a running virtual machine. To edit this value, you must first stop the virtual machine.

    • Processors: The number of processors the virtual machine is allocated. The number of processors is expressed in number of physical CPU cores, and is limited to 128. You can change this when editing a running virtual machine, up to the value of Max. Processors.

    • Priority: The CPU priority of the virtual machine. The higher the priority, the more physical CPU cycles are given to the virtual machine.

    • Processor Cap %: Increase or decrease the percentage to which the virtual CPUs can receive scheduled time. This parameter defines the maximum percentage to which the virtual CPUs can receive scheduled time. Use this parameter to keep low priority virtual machines from consuming too many CPU cycles on a Virtual Machine Server.

    The Priority and Processor Cap% parameters are passed to the hypervisor, which determines the percentage. These two parameters are always combined by the hypervisor and are a key factor for the performance of the virtual machine.

    Click Next.

  5. The Setup Networks step is displayed in the wizard.

    This figure shows the Setup Networks step in the Create Virtual Machine wizard.

    For each VNIC you want to add to the virtual machine, select a VNICs from the Unassigned VNICs drop-down list. Select the network to use from the Network drop-down list, and click Add VNIC.

    If you are editing the networking of an existing stopped virtual machine, you can change the network to which the VNIC belongs using the Network drop-down list.

    If no VNICs are available in the Unassigned VNICs drop-down list, click Create VNICs to display the Create Virtual NICs dialog box.

    This figure shows the Create Virtual NICs step in the Create Virtual Machine wizard.

    Click (Auto Fill), then Create to create VNICs. Click Close.

    A virtual machine can have up to eight virtual network interfaces for emulated guests and up to 31 for PVM guests. A PVM guest requires network connectivity to perform the operating system install and must have a VNIC.

    Click Next.

  6. The Arrange Disks step of the wizard is displayed.

    This figure shows the Arrange Disks step in the Create Virtual Machine wizard.

    Select the desired storage configuration of your virtual machine, such as virtual disks, physical disks, and ISO files. On a separate slot, add one or more of the following disk types:

    • Empty A empty slot.

    • Virtual Disk: This allows you to add or create a virtual disk. Virtual disks can be shared by virtual machines.

    • Physical Disk The physical disks are the disks in a storage array. Physical disks can be shared by virtual machines.

    • CD/DVD: This adds an ISO file in a storage repository and can be used to create HVM and PVHVM virtual machines. When creating a virtual machine from an ISO file, you must use a single file. Installations that span multiple ISO files are not supported. ISO files cannot be used to create PVM virtual machines.

    Add or create any virtual disks to use as the virtual machine's hard disk, select any physical disks to add, and select any ISO files to use to create the virtual machine. Add the disks in the order they should appear in the virtual machine. The disk with the boot partition or installation media should be the first disk listed. An HVM guest can have up to four disks, including empty CD/DVD drives. A PVM or PVHVM guest can have up to 52 disks. Only one slot can contain an empty CD/DVD.

    Tip

    When editing a running virtual machine, you can change the CD/DVD using this dialog box and the CD/DVD is mounted in the operating system.

    To create or add a virtual disk:

    1. To create a virtual disk, select Virtual Disk from the Disk Type drop-down list and click Create a Virtual Disk Create a Virtual Disk icon .

    2. The Create Virtual Disk dialog box is displayed.

      This figure shows the Create Virtual Disk dialog box step in the Create Virtual Machine wizard.

      Enter or select the following to create a virtual disk:

      • Repository: The repository in which the virtual disk is to be created.

      • Virtual Disk Name: The name of the virtual disk to be created and made available to the virtual machine. See Section 7.5.6, “Virtual Disks” for more information about using virtual disks.

      • Size (GiB): The disk size in GiB of the virtual disk.

      • Description: A description of the virtual disk.

      • Shareable: Whether the virtual disk should be shareable (read/write) with other virtual machines.

      • Allocation Type: Whether to use a Sparse Allocation or Non-sparse Allocation. Sparse Allocation creates a sparse disk, so the size of the disk is initially small and increases as it is used. Sparse allocation is faster than using Non-Sparse Allocation when creating a virtual machine. Non-Sparse Allocation creates the entire disk when the virtual machine is created, and so is slower than creating a sparse disk.

      Click OK.

    3. To search for an existing virtual disk to add to the virtual machine, click Select a Virtual Machine Disk Select a Virtual Machine Disk icon . The Select a Virtual Machine Disk dialog box is displayed.

      This figure shows the Select a Virtual Disk step in the Create Virtual Machine wizard.

      Select the virtual disk to use and Click OK.

      Note

      If your virtual machine needs more than one disk, you can create the disk(s) afterwards in the repository, and add them to the virtual machine. See Section 7.5.6, “Virtual Disks” for more information.

    To add a physical disk:

    1. To add a physical disk to the virtual machine, select Physical Disk from the Disk Type drop-down list. Click Select a Virtual Machine Disk Select a Virtual Machine Disk icon . The Select a Physical Disk dialog box is displayed.

      This figure shows the Select a Physical Disk dialog box in the Create Virtual Machine wizard.

      Select a physical disk and click OK.

    To add an ISO file:

    1. To add an ISO file to the virtual machine, select CD/DVD from the Disk Type drop-down list. Click Select a Virtual Machine Disk Select a Virtual Machine Disk icon . The Select an ISO dialog box is displayed.

      This figure shows the Select an ISO dialog box in the Create Virtual Machine wizard.

      Select an ISO file and click OK.

    When you have set up the virtual machine's disks, click Next.

  7. The Boot Options step is displayed in the wizard.

    This figure shows the Boot Options step in the Create Virtual Machine wizard.

    Select the boot media order for your virtual machine.

    If you are creating a hardware virtualized virtual machine (HVM), you can choose the PXE boot option. If so, remember to put PXE first in the Select your boot options field, and change the boot order again after installation and before rebooting the virtual machine. To use PXE, you must configure a PXE/tftp environment to offer the necessary boot media and instructions to the virtual machine.

    If you are creating a paravirtualized virtual machine (PVM), you also have the Network option available (not shown in here). If so, specify Network to be at the top of the right-hand-side column, and enter the location of the mounted ISO file from which to perform the operating system installation in the Network Boot Path field (also not shown in here), for example

    http://example.com/Enterprise-R6-U1-Server-x86_64-dvd.iso/

    For information on creating a mounted ISO file, see Section 7.4, “Virtual Machine Installation Media”.

    You cannot use the Network Boot Path field to boot a virtual machine using PXE. This field can only be used to specify the path to a mounted ISO file to use when installing a PVM guest.

    Click Finish. The virtual machine is created and deployed to the server pool.

To access the virtual machine, select the server pool on which the virtual machine was created in the navigation tree, and select Virtual Machines in the Perspective drop-down list in the management pane. Select the virtual machine in the table to perform operations on it. Expand the virtual machine in the table to see more detailed configuration information.

This figure shows a virtual machine in the Virtual Machines perspective of the Servers and VMs tab.

If you created a PVM, there are some steps you should take after the operating system installation is completed:

  1. Stop the virtual machine.

  2. Edit the virtual machine and remove PXE from the Boot Order column in the Boot Options step of the Edit Virtual Machine wizard.

  3. Start the virtual machine and complete the installation if necessary.

To edit the virtual machine configuration information, see Section 7.9.2, “Editing a Virtual Machine”.