3.6.1.1 Create Virtual Machine

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.

    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.

    • Name Index: The start index number to use for the clone name suffix. The default is 0. This is used in conjunction with the VM Name field to create the name for each clone.

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

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

    • VM Name: An optional name for the virtual machines. The maximum name length is 256 characters and may contain any character. The name need not be unique. If no value is given, the default is the name of the virtual machine template being cloned. Each clone is suffixed with a dot (.) and the clone index number, starting with the value for the Name Index field. For example, if the VM Name field is set to MyVM, and the Name Index field is set to 1, the resulting clones would be named MyVM.1, MyVM.2 and so on.

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

    • Description: An optional 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.

    Select the Create a new VM option. Click Next.

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

    Enter or select the following:

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

    • Server: The server that the virtual machine should be created on. The default option is Any, but the drop-down selection lists the servers that exist in the server pool that you have selected. Selecting a particular server forces the virtual machine to be created on that server. This has implications for the Start Policy discussed later.

    • Repository: 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: Whether to enable High Availability (HA). See How does High Availability (HA) Work? in the Oracle VM Concepts Guide for more information on HA.

    • Enable Huge Pages: Whether to enable HugePages. This option can be used when configuring Huge Pages for paravirtualized VMs with the Domain Type set to XEN_PVM. Huge Pages are available by default for HVM and PVHVM and this parameter cannot be set if your Domain Type is not set to XEN_PVM. Setting this parameter automatically sets the page size to 2 MB. This means that when assigning memory to a virtual machine with this parameter set, you must ensure that the values specified are multiples of 2 MB. If you enable HugePages, you must also enable support for HugePages in the guest operating system. If you want to change this value when editing a virtual machine, the virtual machine must first be stopped. This option is not available if the virtual machine is to be deployed to a SPARC-based server pool.

      See How are Huge Pages Enabled for Virtual Machines?, in the Oracle VM Concepts Guide, for more information on Huge Page support.

    • Description: An optional description of the virtual machine.

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

    • Mouse Device Type: The mouse type to use for the virtual machine. This option is not available if the virtual machine is to be deployed to a SPARC-based server pool.

    • Keymap: The keyboard mapping to use for the virtual machine. This option is not available if the virtual machine is to be deployed to a SPARC-based server pool.

    • 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 machine guest. This option is not available if the virtual machine is to be deployed to a SPARC-based server pool.

      • XEN_HVM: Hardware virtualization, or fully virtualized. When you select this option you must supply an ISO file in a repository (in the Arrange Disks step of the wizard) from which to create the virtual machine. See Section 4.6.1.1, “Import ISO” 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 What are Virtualization Modes or Domain Types? in the Oracle VM Concepts Guide 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 ISO Provisioning for PVM Guest Installations in the Oracle VM Administrator's Guide.

      • LDOMS_PVM: 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 option is informational in the event that Oracle VM Manager is unable to determine the domain type for an existing virtual machine. It is not possible to actually set a virtual machine's domain type to this value. Attempting to do so generates a rule violation when you try to save the virtual machine settings and an error message is returned.

    • Start Policy: The policy that should be used to start the virtual machine. Select one of:

      • Best Server: The virtual machine is started on the best available Oracle VM Server as determined by the algorithm used for the server pool policies DRS and DPM. For more information on server pool policies, see What are Server Pool Policies? in the Oracle VM Concepts Guide.

      • Current Server: The virtual machine is started on the Oracle VM Server to which it is assigned. If you selected a particular server to create the virtual machine on, then it is started on this server.

      • Use Pool Policy: The virtual machine is started using the start policy defined for the entire server pool. See Section 3.1.2, “Create Server Pool” for more information on setting the start policy for a server pool.

    • Max. Memory (MB): The maximum memory size the virtual machine can be allocated. If you have enabled Huge Pages, the value here must be a multiple of 2 MB.

    • 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. If you have enabled Huge Pages, the value here must be a multiple of 2 MB.

    • 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. This option is not available if the virtual machine is to be deployed to a SPARC-based server pool.

    • 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. This option is not available if the virtual machine is to be deployed to a SPARC-based server pool.

    The Priority and Processor Cap% parameters are passed to the Xen hypervisor for use by the credit scheduler, which automatically load balances guest VCPUs across all available physical CPUs using an algorithm that combines these two parameters. Therefore, these parameters are a key factor for the performance of the virtual machine on x86 hardware.

    On SPARC, each virtual machine uses dedicated physical CPU threads and CPUs are not shared between virtual machines, being exclusively assigned to a single virtual machine.

    Click Next.

  5. The Set up Networks step is displayed in the wizard.

    This step of the wizard allows you to add VNICs to the virtual machine. If you want to specify the MAC address for a VNIC, select Specify MAC Address and enter the MAC address. Otherwise, leave the default Dynamically Assign MAC to dynamically assign a MAC Address. Select a network with the virtual machine role from the Network drop-down list. If no networks are available, you must first create a network with the virtual machine role as a dedicated network for virtual machine traffic is required. See Section 5.1.1, “Create New Network” for information on creating a network. Click Add VNIC.

    The VNIC order specified here is important, as it determines the order in which they are presented to the virtual machine. You can control the ordering of the VNICs using the up and down arrows on the right of the table.

    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 in the table. It is important that the VNIC belongs to a network already associated with the Oracle VM Servers on which it can run, or you cannot start the virtual machine. See Section 5.1.1, “Create New Network” and Section 5.1.2, “Edit Existing Network” for more information on associating Oracle VM Servers with networks.

    If you are editing an existing running virtual machine, you are able to add VNICs to the virtual machine, but you are not able to remove VNICs that are already in use. You also cannot reorder VNICs on a running virtual machine. If you choose to add a VNIC to a running machine you must ensure that the VNIC belongs to a virtual machine network already associated with the Oracle VM Servers on which it can run, by selecting the appropriate network from the Network drop-down list.

    A virtual machine can have up to eight (8) VNICs for HVM guests and up to 31 for PVM guests. A PVM guest requires network connectivity to perform the operating system install and must have at least one VNIC.

    Click Next.

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

    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: An empty slot.

    • Virtual Disk: This allows you to add or create a virtual disk. Virtual disks may be shared by virtual machines, or only available to a single virtual machine.

    • Physical Disk: The physical disks are the disks in a storage array. Physical disks may 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. You cannot add an empty CDROM on a SPARC-based server.

    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 guest can have up to 104 disks. A PVHVM guest can have up to 107 disks. An LDOMS_PVM guest can have up to 1024 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. 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 How are Virtual Disks Managed? in the Oracle VM Concepts Guide for more information about using virtual disks.

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

      • 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. 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 4.9.1.1, “Create Virtual Disk” and Section 3.5.2.1, “Edit Virtual Machine” for more information on creating a virtual disk and editing a virtual machine. There are some limitations on mixing virtual disks of differing device types on a virtual machine. See How are Virtual Disks Managed? in the Oracle VM Concepts Guide for more information about how device types are allocated to virtual disks and what you may need to do to solve any issues surrounding this problem.

    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. Select a physical disk from the list of available disks. If you want to leave the slot empty, select Leave Slot Empty. 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. Select a Iso file from the list of available files. If you want to leave the slot empty, select Leave Slot Empty. Click OK.

      Note

      When adding an ISO file to an existing virtual machine, the ISO file is available to the operating system, but may not be mounted. To access the ISO file, you may need to mount it, for example:

      # mkdir /cdrom
      # mount -o loop /dev/xvdb /cdrom

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

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

    Select the boot media order for your virtual machine.

    If you are creating a hardware virtualized machine 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 PXE option available. In this case, the PXE option refers to a network style boot. If the PXE option appears in the right-hand-side column, you must enter the location of the mounted ISO file from which to perform the operating system installation in the Network Boot Path field that is shown when editing or creating a PVM, for example

    http://example.com/EL6-x86

    For information on creating a mounted ISO file, see ISO Provisioning for PVM Guest Installations in the Oracle VM Administrator's Guide.

    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.

    If you have defined tags and want to add any to this virtual machine, click Next. Otherwise, click Finish to create and deploy the virtual machine to the server pool.

  8. The Tags step is optional and displays in the wizard if you clicked Next in the previous step.

    Note

    The virtual machine has already been created and deployed to the server pool at this point. This step is entirely optional. Cancelling the operation within this dialog does not prevent the virtual machine from being created.

    If you have previously created tags, they appear in the Available Tags column. Select the tags you want to apply to the virtual machine and move them to the Selected Tags column. See Section 1.14, “Tags” for more information on creating and managing tags. Click Finish.

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

  1. Stop the virtual machine. See Section 3.5.2.4, “Stop Virtual Machines” for information on stopping a 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. See Section 3.5.2.1, “Edit Virtual Machine” for information on editing a virtual machine.

  3. Start the virtual machine and complete the installation if necessary. See Section 3.5.2.3, “Start Virtual Machines” for information on starting a virtual machine.

To edit the virtual machine configuration information, see Section 3.5.2.1, “Edit Virtual Machine”.