oakcli clone vm

Use the oakcli clone vm command to create clones and snap clones of virtual machines.

Syntax

To create a virtual machine from a template:

   oakcli clone vm vm_name -vmtemplate template_name -repo repo_name [-node 0|1] [-driverdomain]   

To create a snapshot clone of an existing virtual machine:

oakcli clone vm vm_name -vm src_vm_name -snap [-force] [-driverdomain]

To create a virtual machine snapshot from a template:

oakcli clone vm <vm_name> -vmtemplate src_vmtempl_name -snap [-driverdomain]

Parameters


Parameter Description

-vmvm_name

Identifies the name given to the new cloned virtual machine.

-vmtemplate template_name

Identifies the name of the template containing the virtual machine that you want to clone.

-repo repo_name

Identifies the name of the repository that contains the template being cloned.

-node 0 | 1

Identifies the Oracle Database Appliance node that contains the shared repository from which the virtual machine is to be cloned.

-vm src_name

Identifies the name of the virtual machine that is to be cloned.

-snap

(Optional) Creates a snapshot of the source virtual machine or virtual machine template.

-driverdomain

(Optional) Creates the virtual machine with driver domain option.

-h

(Optional) Displays help for using the command.


Usage Notes

  • The -node parameter must be used when you clone from a shared repository. The -node parameter is invalid for non-shared repositories.

  • The driver domain only works when you add virtual disks to a guest virtual machine. When -driverdomain is specified, the cloned virtual machine is in driver domain mode. The corresponding virtual machine configuration file, vm.cfg, has the following disk entries:

     When -driverdomain is specified, the cloned virtual machine is in driver domain mode. The corresponding virtual machine configuration file, vm.cfg, has the following disk entries:

    disk = [u'file:/OVS/Repositories/repo5/.ACFS/snaps/vm10/VirtualMachines/

    vm10/System.img,xvda,w',

    u'file:/u01/app/sharedrepo/repo5/.ACFS/snaps/

    vm10/VirtualMachines/vm10/u01.img,xvdb,w,oakDom1']

    All disks, with the exception of the xvda boot disk, have the path from oakDom1, that is odabase.

Example 4-2 Creating a Virtual Machine Image

Create a virtual machine image named myol6u_test from the virtual machine template named myol6u_15gb1, which is stored in the shared repository named repo2 on Node 0:

oakcli clone vm myol6u_test -vmtemplate myol6u_15gb1 -repo repo2 -node 0