nbdcopy fails during disk copy (often DNS resolution)
Problem
A migration fails during the disk copy (live replicate) phase with an error similar to:
Failed to migrate VM: failed to live replicate disks: failed to copy disk Hard disk 1 (DeviceKey=2000): failed to run nbdcopy: exec: already started.Error signature:
failed to run nbdcopy: exec: already startedSymptoms
- Migration fails during the nbdcopy phase.
- Debug logs often show DNS resolution errors when attempting to connect to an ESXi host.
Root Cause
During the disk copy phase, vJailbreak needs to communicate with ESXi hosts. If name resolution for an ESXi host is not available from the vJailbreak VM, the nbdcopy workflow can fail.
This is commonly caused by missing DNS records or missing /etc/hosts entries for ESXi hosts.
Resolution
- Review the debug logs to confirm DNS/name-resolution errors.
See: Debug Logs.
- Ensure the vJailbreak VM can resolve ESXi host names.
If you are not using DNS, add a static entry on the vJailbreak VM:
sudo sh -c 'echo "<esxi-host-ip> <esxi-host-fqdn> <esxi-host-shortname>" >> /etc/hosts'- Re-run the migration.
Prevention
- Ensure DNS (or
/etc/hosts) is configured for all ESXi hosts in the cluster, not just vCenter.