Copying direct volume (multi-disk method)
Migrate multi-disk VMware VMs to VPC by creating target volumes, using worker VMs for conversion with virt-v2v, and provisioning from existing boot volumes.
Architecture Components
The following table lists the architecture components of a direct volume copy migration.
| Architecture components | Description |
|---|---|
| Worker virtual server instance |
A temporary virtual server instance that serves as your migration workspace. This virtual server instance needs the following prerequisites:
|
| Ephemeral virtual server instance | A short-lived virtual server instance created solely to generate boot and data volumes with the correct configuration. You delete this virtual server instance immediately but keep its volumes. |
| Target Volumes | The actual volumes that become your migrated VM's disks. |
Overview of the copying direct volume migration process
The following steps layout the process to migrate by using direct volume copy.
-
Provision worker virtual server instance
- Ubuntu or RHEL instance with adequate workspace
- Attach a large secondary volume if workspace is needed for VMDKs
- Install the required tools
qemu-imglibguestfs-tools(for virt-v2v)
-
Create Ephemeral virtual server instance
- Configure it to match your target VM (OS, boot disk size, secondary disk count/sizes)
- Critical: Disable auto-delete on all volumes
- Critical: Use
general-purposestorage profile for boot volume - Network configuration can be throwaway
- Note the volume sizes and order
-
Delete Ephemeral virtual server instance, Retain Volumes
- Delete the virtual server instance through UI or CLI
- Confirm that volumes still exist and are available for attachment
-
Attach Volumes to worker virtual server instance
- Attach them in the same order that they were created
- Note device names (for example, /dev/vdb, /dev/vdc, and so on)
- Verify sizes:
blockdev --getsize64 /dev/vdb
-
Transfer and convert VM Disks
- If exported: Copy VMDK to worker virtual server instance
- Convert and write in one step:
qemu-img convert -f vmdk -O raw source-vm-boot.vmdk /dev/vdb qemu-img convert -f vmdk -O raw source-vm-data.vmdk /dev/vdc- Optionally use virt-v2v for Windows driver injection (see the following Windows section)
-
Verify and Flush
- Spot check partition tables:
fdisk -l /dev/vdb - Flush buffers:
blockdev --flushbufs /dev/vdb
- Spot check partition tables:
-
Detach Volumes from worker
- Detach all target volumes
- They're now ready to be attached to the final virtual server instance
-
Create Final virtual server instance from Existing Boot Volume
- Instead of selecting an image, select "existing boot volume"
- Choose the boot volume that you populated
- Configure network, security groups, SSH key (required even though it is not used if it is an existing VM)
- For secondary volumes: Use CLI/API or attach after creation and restart
-
Post-Migration Configuration
- Boot virtual server instance, access through VNC console if network config needs adjustment
- Verify that all disks are present and mounted
- Expand boot volume partition if you resized it upward
Direct volume copy design advantages
The following table lists the design advantages of direct volume copy migration.
| Design advantage | Description |
|---|---|
| Multi-Disk Support | Multi-disk support handles virtual machines with any number of disks, up to VPC's 12-disk limit. |
| No Image Proliferation | You're not creating a custom image for each virtual machine. Your custom image list stays clean. |
| Flexible Transformation | Enables easy integration with virt-v2v for driver injection, OS tweaks, and so on. |
| Storage Efficiency Option | If you import a base template as a custom image and use it as the boot volume source for your ephemeral virtual server instance (step 2), the final boot volume inherits the linked-clone space efficiency. |
Direct volume copy design constraints and limitations
The following table lists the constraints and limitations of a direct volume copy migration.
| Limitation or Constraint | Description |
|---|---|
| Orchestration Complexity | There are more steps and moving parts. You need solid runbooks and preferably automation (Terraform, Ansible, scripts). |
| Volume attachment limitations. |
The IBM Cloud UI doesn't support attaching secondary volumes during virtual server instance creation. You must do one of the following:
|
| Export overhead | If you're exporting VMDKs from VMware, you still incur that overhead (though less than OVA export). |
Skip export by using network transfer
You can combine Method 2 with network transfer techniques (detailed in Method 3) to avoid exporting VMDKs entirely. Boot your source VM from an ISO, establish network connectivity to your worker virtual server instance, and stream the disk contents directly:
-
On the worker virtual server instance (destination), issue the following command:
nc -l 192.168.100.5 8080 | gunzip | dd of=/dev/vdb bs=16M status=progress -
On the source virtual machine (booted from ISO), issue the following command:
dd if=/dev/sda bs=16M | gzip | nc -N -v 192.168.100.5 8080
This process eliminates export time and export storage requirements.
Using this process for multi-disk VMs, for scenarios where you want precise control, or where avoiding custom image proliferation is important. You can improve efficiency with network transfer too.