A.53 create Vm

Creates a virtual machine.

Syntax

create Vm [ memory=value ] [ memoryLimit=value ] [ cpuCount=value ] [ cpuCountLimit=value ] [ cpuPriority=value ] [ cpuUtilizationCap=value ] [ highAvailability= { Yes | No } ] [ hugePagesEnabled= { Yes | No } ] [ osType=value ] [ restartActionOnCrash= { RESTART | STOP | RESTART_AFTER_DUMP | STOP_AFTER_DUMP } ] [ mouseType= { OS_DEFAULT | PS2_MOUSE | USB_MOUSE | USB_TABLET } ] domainType= { XEN_HVM | XEN_HVM_PV_DRIVERS | XEN_PVM | LDOMS_PVM | UNKNOWN } [ keymapName= { en-us | ar | da | de | de-ch | en-gb | es | et | fi | fo | fr | fr-be | fr-ca | fr-ch | hr | hu | is | it | ja | lt | lv | mk | nl | nl-be | No | pl | pt | pt-br | ru | sl | sv | th | tr } ] [ bootOrder= { PXE | DISK | CDROM } ] [ networkInstallPath=value ] repository=value [ server=value ] [ startPolicy= { BEST_SERVER | BALANCE_SERVER | CURRENT_SERVER | USE_POOL_POLICY } ] [ viridian= { Yes | No } ] name=value [ description=value ] on ServerPool instance

Where instance is:

{ id=value | name=value }

Description

This command creates a virtual machine.

Options

The following table shows the available options for this command.

Option

Description

memory=value

The memory size the virtual machine is allocated in MB. May be an integer between 32 and 512000. The default is 512.

memoryLimit=value

The maximum memory size the virtual machine can be allocated in MB. May be an integer between 32 and 512000. The default is 512.

cpuCount=value

The number of processors the virtual machine is allocated. May be an integer between 1 and 999999, but cannot exceed the maximum limit for the domain type, as follows:

  • PVM: 256.

    Important

    As of Oracle VM Release 3.4.6, support for PVM guests is removed. For more information, see Disabling Paravirtualized Guests on Oracle VM Server in the Oracle VM Administrator's Guide.

  • HVM: 128; or 32 for Microsoft Windows guests.

    Note

    As of Release 3.4.6, the HVM limit is 64 for Microsoft Windows guests.

  • PVHVM: 128; or 32 if using Oracle VM Paravirtual Drivers for Microsoft Windows.

    Note

    As of Release 3.4.6, the PVHVM limit is 64 if using Oracle VM Paravirtual Drivers for Microsoft Windows.

  • LDOMS_PVM: Equivalent to the number of available CPUs on the server.

cpuCountLimit=value

The maximum number of processors the virtual machine can be allocated. May be an integer between 1 and 999999, but cannot exceed the maximum limit for the domain type, as follows:

  • PVM: 256.

    Important

    As of Oracle VM Release 3.4.6, support for PVM guests is removed. For more information, see Disabling Paravirtualized Guests on Oracle VM Server in the Oracle VM Administrator's Guide.

  • HVM: 128; or 32 for Microsoft Windows guests.

    Note

    As of Release 3.4.6, the HVM limit is 64 for Microsoft Windows guests.

  • PVHVM: 128; or 32 if using Oracle VM Paravirtual Drivers for Microsoft Windows.

    Note

    As of Release 3.4.6, the PVHVM limit is 64 if using Oracle VM Paravirtual Drivers for Microsoft Windows.

  • LDOMS_PVM: Equivalent to the number of available CPUs on the server.

cpuPriority=value

The CPU priority of the virtual machine. A value between 1 and 100; the higher the number, the more priority the CPU is given.

cpuUtilizationCap=value

The maximum percentage to which the virtual CPUs can receive scheduled time. A value between 10 and 100; the higher the number, the more scheduled time the CPU is given.

highAvailability= { Yes | No }

Whether to enable High Availability (HA).

hugePagesEnabled= { Yes | No }

Whether to enable HugePages.

Note

The HugePages feature is deprecated in Oracle VM Release 3.4.1. You should not enable HugePages when creating or editing virtual machines in the Oracle VM Manager Web Interface or Oracle VM Manager Command Line Interface. This feature will be removed in a future release of Oracle VM.

If you have HugePages enabled for any PVM guests, Oracle recommends that you change the domain type for virtual machines from Paravirtualized (PVM) to Hardware virtualized, with paravirtualized drivers (PVHVM). If you cannot change the domain type for a virtual machine, you should disable the HugePages setting and then restart the virtual machine.

osType= value

The operating system of the virtual machine. To find the operating system type, use the getVmOsTypes command.

[ restartActionOnCrash= { RESTART | STOP | RESTART_AFTER_DUMP | STOP_AFTER_DUMP } ]

The action to perform in the case where a virtual machine crashes. This option must only be used for virtual machines that are running on the Xen hypervisor and that have been configured to run on a particular Oracle VM Server.

Note that in the case where High Availability (HA) is enabled for a virtual machine, the virtual machine is always restarted in the event of a crash, since HA takes precedence over this setting. Therefore, you should be aware that if the highAvailability parameter is set to the value of Yes, any value for this option, other than RESTART and RESTART_AFTER_DUMP, is effectively ignored.

If you select and option to generate a core dump file, you should be aware that these are saved to /var/xen/dump on the Oracle VM Server where the virtual machine is hosted. Each core dump file is named uniquely so that files are not overwritten. This can use up disk space rapidly. You must ensure that there is either enough disk space available at this path on the Oracle VM Server where the virtual machine will run; or you should mount additional storage at this path to avoid using up disk space required to host dom0.

mouseType= { OS_DEFAULT | PS2_MOUSE | USB_MOUSE | USB_TABLET }

The mouse type of the virtual machine.

domainType= { XEN_HVM | XEN_HVM_PV_DRIVERS | XEN_PVM | LDOMS_PVM | UNKNOWN }

The domain type of the virtual machine.

keymapName= { en-us | ar | da | de | de-ch | en-gb | es | et | fi | fo | fr | fr-be | fr-ca | fr-ch | hr | hu | is | it | ja | lt | lv | mk | nl | nl-be | No | pl | pt | pt-br | ru | sl | sv | th | tr }

The keyboard mapping to use for the virtual machine.

bootOrder= { PXE | DISK | CDROM }

The boot media order for the virtual machine. Enter options separated by commas (,), for example:

bootOrder='CDROM,DISK'

If you use the PXE boot option to boot from network-based installation media, also use the networkInstallPath parameter.

To set an empty bootOrder option, use bootOrder="".

networkInstallPath=value

The location at which the installation media (mounted ISO file) is located when creating a PVM guest.

repository=value

The name or ID of the storage repository in which to create the virtual machine configuration file.

server=value

The name or ID of the Oracle VM Server on which to create the virtual machine.

startPolicy= { BEST_SERVER | BALANCE_SERVER | CURRENT_SERVER | USE_POOL_POLICY }

Optional virtual machine start up policy.

viridian= { Yes | No }

Viridian support enables the exposure of Windows virtualization compatible entitlements to Microsoft Windows guest operating systems. Enabling viridian support is strongly recommended to ensure improved performance for Microsoft Windows guest operating systems.

Enabling viridian support is permitted for all Microsoft Windows guest operating system types. However, it is only effective from Microsoft Windows Vista and Microsoft Windows Server 2008 onwards.

name=value

A name to identify the virtual machine.

description=value

Optional description for the virtual machine. value is a maximum of 4,000 characters.

To set an empty description, use description="".

{ id=value | name=value }

The instance of the object using either the id or name option, for example name=MyServer.

Note

Any create command only creates a single instance of an object, and therefore only accepts a single object instance as an attribute. Providing more than one object of the same attribute type as a parameter always results in the last attribute value taking precedence.

Examples

Example A.69 Creating a virtual machine

OVM> create Vm name=MyVM repository=MyRepository domainType=XEN_HVM \ 
  server=MyServer startPolicy=USE_POOL_POLICY on ServerPool name=MyServerPool

See Also