8.3 Creating a virtual machine from an ISO

  1. Create a virtual machine using the 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

    For example:

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

    For more information on the syntax and usage, see Section A.53, “create Vm” .

  2. Create a virtual disk to use as the boot disk using the syntax:

    create VirtualDisk size=value shareable= { Yes | No } sparse= { Yes | No } name=value [ description=value ] on Repository instance

    For example:

    OVM> create VirtualDisk name=MyVMDisk size=10 sparse=Yes shareable=No on Repository \
      name=MyRepository

    For more information on the syntax and usage, see Section A.51, “create VirtualDisk” .

  3. Map the virtual disk to the virtual machine using the syntax:

    create VmDiskMapping slot=value { physicalDisk=value | virtualDisk=value | virtualCd= { value | EMPTY_CDROM } } name=value [ description=value ] on Vm instance

    For example:

    OVM> create VmDiskMapping slot=0 virtualDisk=MyVMDisk name="Boot Disk" on Vm name=MyVM

    For more information on the syntax and usage, see Section A.57, “create VmDiskMapping” .

  4. Map an ISO file to the virtual machine using the syntax:

    create VmDiskMapping slot=value { physicalDisk=value | virtualDisk=value | virtualCd= { value | EMPTY_CDROM } } name=value [ description=value ] on Vm instance

    For example:

    OVM> create VmDiskMapping slot=1 virtualCd=OracleLinux-dvd.iso \
      name="CDROM Drive" on Vm name=MyVM

    For more information on the syntax and usage, see Section A.57, “create VmDiskMapping”.

  5. Set up the disk boot order as the CDROM (ISO file) as the first disk, then the virtual disk as the secondary disk, using the syntax:

    edit Vm instance [ 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 ] [ startPolicy= { BEST_SERVER | BALANCE_SERVER | CURRENT_SERVER | USE_POOL_POLICY } ] [ viridian= { Yes | No } ] [ name=value ] [ description=value ]

    For example:

    OVM> edit Vm name=MyVM bootOrder='CDROM,DISK' startPolicy=BEST_SERVER

    For more information on the syntax and usage, see Section A.95, “edit Vm”.

  6. Create a VNIC and add it to the virtual machine using the syntax:

    create Vnic network=value name=value [ macAddress=value ] [ description=value ] on Vm instance

    For example:

    OVM> create Vnic name=MyVNIC network=MyVMNetwork on Vm name=MyVM

    For more information on the syntax and usage, see Section A.58, “create Vnic”.