9.3. Managing Template Revisions

9.3.1. Obtaining the ID of a Template Revision
9.3.2. Creating a Revision
9.3.3. Making a Revision the Master Revision
9.3.4. Renaming a Revision
9.3.5. Copying a Revision to a New Template
9.3.6. Copying a Revision to a New Desktop
9.3.7. Cloning a Revision to a New Desktop
9.3.8. Exporting a Revision
9.3.9. Applying System Preparation to a Revision
9.3.10. Applying a Revision for Cloning
9.3.11. Deleting a Revision

This section lists the available actions for managing revisions to templates, how you perform the action in Oracle VDI Manager, and the equivalent command-line command.

9.3.1. Obtaining the ID of a Template Revision

Whenever you use the vda command to perform an action to a template revision, you must use the unique ID of the revision rather than the name. Oracle VDI Manager only displays the name.

To obtain the ID of a revision, obtain the ID of the template (see Section 9.2.1, “Obtaining the ID of a Template”), and then use the vda template-revisions command to list the revisions to the template.

In the following example, the revisions to template1 in the pool MyPool are listed:

/opt/SUNWvda/sbin/vda pool-templates MyPool
NAME             ID   MACHINE_STATE                MASTER      DESKTOPS
template1         2     Powered Off  template1 Revision 1             3
template2         6     Powered Off  template2 Revision 1             -

/opt/SUNWvda/sbin/vda template-revisions 2
NAME                       ID          CREATION MASTER            DESKTOPS
template1 Revision 1        3   9/14/12 9:13 AM    Yes           MyPool(3)
template1 Revision 2        4   9/19/12 9:52 AM     No                   -
template1 Revision 3       12   9/28/12 5:58 AM     No                   -

9.3.2. Creating a Revision

Perform the following steps to save the current state of a template as a new revision. The first revision is created at the time of import and is made master revision. When you modify the template and create a new revision, you must change the master revision in order for the changes to be applied to pools.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab and select the template you want to work with.

  3. Click the Create Revision button.

    A dialog box is displayed.

  4. Enter a new revision name and click OK.

    The new revision appears in the template list, as a child entry of the template.

Command Line Steps

  1. Obtain the ID of the template you want to work with, see Section 9.2.1, “Obtaining the ID of a Template”.

  2. Create a new revision using the vda revision-create command.

    /opt/SUNWvda/sbin/vda revision-create -p template=template-id,name=revision-name
    

    For example:

    /opt/SUNWvda/sbin/vda revision-create -p template=6,name=template2 Revision 2

9.3.3. Making a Revision the Master Revision

Perform the following steps to mark a revision to be used for cloning in pools that have that template configured for desktop cloning. When a new revision becomes master, all cloned desktops (that are not currently in use or personally assigned) are deleted and new desktops are cloned.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. Click the Nominate Master button.

    The Nominate Master Revision window is displayed.

  4. Set the date and time when the revision is to become the master.

  5. (Optional) Select Log User Out to automatically log out users and reclone the desktops when the revision becomes master.

    If you do not select this option, desktops are only recloned when users log out of their desktops.

  6. Click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Nominate a revision master using the vda revision-setprops command.

    /opt/SUNWvda/sbin/vda revision-setprops -p is-master=Yes revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-setprops -p is-master=Yes 12

9.3.4. Renaming a Revision

Perform the following steps to give a new name to an existing revision of a template.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. Click the Rename button.

    A dialog box is displayed.

  4. Enter the new name for the revision and click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Rename an existing template revision using the vda revision-setprops command.

    /opt/SUNWvda/sbin/vda revision-setprops -p name=new-name revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-setprops -p name='"Windows update 28 Sept"' 12

9.3.5. Copying a Revision to a New Template

Perform the following steps to turn a revision into a new template within the current pool. Use this action to create an independent branch of any existing revision. The newly created template appears as a new parent entry in the list of templates. A first revision is also created.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select Copy to Template.

    A confirmation dialog box is displayed.

  4. Click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Copy an existing revision to a new template using the vda template-create command.

    /opt/SUNWvda/sbin/vda template-create -p revision=revision-id,name=new-template-name
    

    For example:

    /opt/SUNWvda/sbin/vda template-create -p revision=12,name='"Win 7 test"'

9.3.6. Copying a Revision to a New Desktop

Perform the following steps to create a new independent desktop from the specific revision, within the current pool. The newly created desktop appears in the Desktop tab of the pool, ready for user assignment.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select Copy to Desktop.

    A confirmation dialog box is displayed.

  4. Click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Copy an existing revision to a new desktop using the vda revision-desktop command.

    /opt/SUNWvda/sbin/vda revision-desktop revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-desktop 12

9.3.7. Cloning a Revision to a New Desktop

Perform the following steps to create a new cloned desktop from the specific revision, within the current pool. The newly created desktop appears in the Desktop tab of the pool, ready for user assignment.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select Clone Desktop.

    A confirmation dialog box is displayed.

  4. Click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Clone an existing revision to a new desktop using the vda revision-clone command.

    /opt/SUNWvda/sbin/vda revision-clone revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-clone 12

9.3.8. Exporting a Revision

Perform the following steps to save the revision's virtual machine configuration file and disk image to a location of your choice. You can then store and use this virtual machine independent of the Oracle VDI environment.

The export consists of an .xml file containing the virtual machine properties, and a .vdi disk image file.

You can perform this action on Oracle VM VirtualBox templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select Export Template.

    The Export Revision window is displayed.

  4. Specify the export location for the desktop by entering a target Server and Path, and a Name for the exported desktop.

  5. Click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Export an existing revision using the vda revision-export command.

    /opt/SUNWvda/sbin/vda revision-export -p \
    hostname=MyNfsServer.domain,path=/path-to-export-location revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-export -p \
    hostname=nfs.example.com,path=/home/user/exports 12

9.3.9. Applying System Preparation to a Revision

Perform the following steps to launch the Windows Sysprep operation. Internally a clone is created from the revision, which is subsequently started. The Windows Sysprep command is called. When system preparation is complete, a new snapshot is taken, which will be used to clone the desktops in the pools.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select System Preparation.

    A confirmation dialog box is displayed.

  4. Click OK.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Apply system preparation to a revision using the vda revision-sysprep command.

    /opt/SUNWvda/sbin/vda revision-sysprep revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-sysprep 37

9.3.10. Applying a Revision for Cloning

Perform the following steps to apply a specific revision for cloning in a pool. Normally, the master revision is used.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select Apply for Cloning in Pool.

    The Apply for Cloning window is displayed.

  4. Select the pool or pools you want to apply the revision to.

  5. Click OK.

9.3.11. Deleting a Revision

Perform the following steps to remove a revision, and all references to it, from Oracle VDI. For Oracle VM VirtualBox and Hyper-V the (iSCSI) disk is deleted from the storage. For VMware you have the option to keep the virtual machine available on vCenter.

You can perform this action on Oracle VM VirtualBox and Microsoft Hyper-V templates.

Oracle VDI Manager Steps

  1. In Oracle VDI Manager, select Pools and then select a pool.

  2. Click the Template tab, expand the template and select the revision you want to work with.

  3. In the More Actions list, select Delete.

    A confirmation dialog box is displayed.

  4. Click Delete.

Command Line Steps

  1. Obtain the ID of the revision you want to work with, see Section 9.3.1, “Obtaining the ID of a Template Revision”.

  2. Remove a revision using the vda revision-delete command.

    /opt/SUNWvda/sbin/vda revision-delete revision-id
    

    For example:

    /opt/SUNWvda/sbin/vda revision-delete 12