Rapid Provisioning of virtual machines using the golden image

As mentioned above, for rapid provisioning of new virtual machines based on the golden image, we need to have full or space-optimized snapshots of the Golden Boot Volume. These snapshots can then be used as boot images for the new virtual machines. The process to create these snapshots is outlined below in the procedures below.

Creating Instant, Full Snapshots of Golden Boot Volume for Rapid Virtual Machine Provisioning

To create instant, full snapshots of the golden boot volume for rapid virtual machine provisioning

  1. Prepare the volume for an instant full snapshot. In the example, the disk group is boot_dg and the golden boot volume is gold-boot-disk-vol.
    $ vxsnap -g boot_dg prepare gold-boot-disk-vol
  2. Create a new volume which will be used as the boot volume for the new provisioned guest. The size of the guests boot volume must match the size of the golden boot volume.
    $ vxassist -g boot_dg make guest1-boot-disk-vol 16g layout=mirror
  3. Prepare the new boot volume so it can be used as a snapshot volume.
    $ vxsnap -g boot_dg prepare guest1-boot-disk-vol
  4. Create the full instant snapshot of the golden boot volume.
    $ vxsnap -g boot_dg make source=gold-boot-disk-vol/snapvol=\
    		guest1-boot-disk-vol/syncing=off
  5. Create a new virtual machine, using the snapshot guest1-boot-disk-vol as an "existing disk image."

To create instant, space-optimized snapshots of the golden boot volume for rapid virtual machine provisioning

  1. Prepare the volume for an instant snapshot. In the example, the disk group isboot_dg and the golden boot volume is gold-boot-disk-vol.
    $ vxsnap -g boot_dg prepare	gold-boot-disk-vol
  2. Use the vxassist command to create the volume that is to be used for the cache volume. The cache volume will be used to store writes made to the space-optimized instant snapshots.
    $ vxassist -g boot_dg make cache_vol 5g  layout=mirror init=active
  3. Use the vxmake cache command to create a cache object on top of the cache volume which you created in the previous step.
    $ vxmake -g boot_dg cache cache_obj cachevolname=cache_vol autogrow=on
  4. Start the cache object:
    $ vxcache -g boot_dg start cache_obj
  5. Create a space-optimized instant snapshot of the golden boot image:
    $ vxsnap -g boot_dg make source=\
    gold-boot-disk-vol/newvol=guest1-boot-disk-vol/cache=cache_obj
  6. Create a new virtual machine, using the snapshot of the golden image as an existing disk image.