Capturing a virtual machine

You can capture a virtual machine that you created or deployed. Follow these steps to enable a virtual machine to be captured and then to capture the virtual machine.

Before a virtual machine can be captured, it must meet specific requirements. If you do not prepare the virtual machine before you capture it, you can experience problems when you deploy the resulting image. For example, you might not be able to ping the virtual machine that is created when the image is deployed.

When capturing a virtual machine, all volumes that belong to its boot set are included in the image generated by the capture. If the virtual machine is brought into PowerVC management, then the boot set consists of all volumes that are marked as the boot set when managing the virtual machine. If the virtual machine is deployed from an image that is created within PowerVC, then the boot set consists of all volumes that the user chooses as the boot set when creating the image. Unlike the volumes that belong to the virtual machine's boot set, the user can choose which data volumes to include in the image generated by the capture.

You can use cloud-init to enable the virtual machines for capture. Cloud-init is a technology that takes user input and configures the operating system and software on deployed virtual machines. Cloud-init is widely used in OpenStack.

PowerVC supports live capture, with these considerations and restrictions:
  • Shared storage pool and IBM® System Storage® DS8000 devices are only supported for single volumes on a single storage provider.
  • Live capture of a shared storage pool thick volume is not supported.
  • Support for shared volumes depends on the application running on top of the volume.
  • Live capture produces a crash consistent backup only when capturing from a single storage provider. The capture is crash consistent within the storage provider, but not across storage providers if you are capturing multiple storage providers on the same virtual machine.
  • The Volume Groups quota must be at least 2n, where n is the number of storage providers. Set project quotas on the Project Quotas tab of the user interface. After making changes, or to see the latest data, manually refresh the page.
  • If a volume is shared across multiple virtual machines, you can capture only those virtual machines individually. They cannot be done in parallel.
  • Live capture with global mirror volumes in Storwize® associated with VMRM is not supported. Though users can use the Cinder CLIs to perform group clone operation with the group type replication_enabled_vmrm.
  • Live capture with mix of global mirror and non-mirror volumes in Storwize is not supported.
Notes:
  • If you are installing the cloud-init package for capturing a virtual machine, and already have the activation engine installed, you must uninstall the activation engine.
  • Before you perform live capture of a virtual machine with multiple disks, run scsi-rescan on the base virtual machine to scan the disks.
  1. Install cloud-init on the virtual machine you want to capture. You need to do this step only the first time you are capturing a virtual machine.
  2. Perform any pre-capture preparation that you want to do on the virtual machine, such as cleaning up log files or enabling RMC. Several PowerVC features, such as live migration and dynamic LPAR, add or remove NIC, etc require an active RMC connection between the management console (HMC or the NovaLink partition) and the virtual machine. In a NovaLink environment, the system will try to use an internal virtual switch (named MGMTSWITCH) to provide the RMC connections. This internal management network requires that images be created with rsct 3.2.1.0-15216 or later. See Updating Reliable Scalable Cluster Technology (RSCT) packages for PowerVM® NovaLink for details. For details, see Set up an RMC connection.
  3. For SUSE Linux® 11 virtual machines, change the devices so that they are mounted by UUID.
  4. Optional: Shut down the virtual machine. If the virtual machine is running when it is captured, a point-in-time snapshot is created, such as would be created if a server were immediately powered off. For more permanent captures, such as for creating a master image, it is recommended that you stop the virtual machine first.
  5. Select the virtual machine that you prepared and click Capture.
  6. After the capture is complete, you must manually power on the virtual machine. Ensure that the image name does not exceed 255 characters.
After the capture is complete, an entry is created in the glance repository with the details of the new image. If the capture fails, the image is removed from the glance repository. You can check the error log for more information on the image capture failure.
Note: If a virtual machine is captured as an image, then the image is stored in new volumes on the storage providers. For example, if a virtual machine is backed by two volumes, one on a SAN and the other one on a shared storage pool, then the image would be stored with one new volume on the SAN and another new volume on the shared storage pool.