Rate This Document
Findability
Accuracy
Completeness
Readability

Performing Live Migration of a Confidential VM

  1. To enable migration, add virtcca-migration-cap=1 to the QEMU startup parameter of the source server.
      <qemu:commandline>
        <qemu:arg value='-object'/>
        <qemu:arg value='tmm-guest,id=tmm0,sve-vector-length=128,num-pmu-counters=1,virtcca-migration-cap=1'/>
      </qemu:commandline>
  2. Start the VM to be migrated.
    virsh start <cvm-name>

    cvm-name indicates the name of the VM to be migrated.

  3. Perform a live cVM migration.
    virsh migrate --live --verbose --copy-storage-all <cvm-name> --cvm-miguri <remote migcvm listening ip address> qemu+ssh://<dest-ip>/system.

    In the preceding command:

    • cvm-name indicates the name of the VM to be migrated.
    • dest-ip indicates the IP address of the peer server.
    • --copy-storage-all is used in non-shared storage scenarios. During the migration, all VM image files are copied to the destination node.
    • --verbose is used to display the migration progress. If --copy-storage-all is added, the progress is displayed in two segments. The first segment is the file transfer progress, and the second segment is the live migration progress.

      In the non-shared storage scenario, the following error message is displayed during the migration.

      error: Unsafe migration: Migration without shared storage is unsafe

      You can add --unsafe to avoid this problem.

      virsh migrate --live --verbose --unsafe --copy-storage-all <cvm-name> --cvm-miguri <remote migcvm listening ip address> qemu+ssh://<dest-ip>/system.