Skip to content

nbdcopy fails during disk copy (often DNS resolution)

Problem

A migration fails during the disk copy (live replicate) phase with an error that contains failed to run nbdcopy:.

As of v0.4.8, vJailbreak adds the underlying reason from the disk-copy debug log to this error. For a name-resolution problem, the reason contains text such as Host address lookup for server ... failed or Name or service not known, for example:

Failed to migrate VM: failed to live replicate disks: failed to copy disk Hard disk 1 (DeviceKey=2000): failed to run nbdcopy: <reason, e.g. Name or service not known>: exit status 1

Error signature:

failed to run nbdcopy: <reason>: ...

As of v0.6.0, the message ends with the nbdcopy exit status, for example exit status 1. From v0.4.8 to v0.5.x, it ends with exec: already started. Before v0.4.8, the error does not include a reason and reads only failed to run nbdcopy: exec: already started.

Symptoms

  • 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

  1. Review the debug logs to confirm DNS/name-resolution errors.

See: Debug Logs.

  1. Ensure the vJailbreak VM can resolve ESXi host names.

If you are not using DNS, add a static entry on the vJailbreak VM:

Terminal window
sudo sh -c 'echo "<esxi-host-ip> <esxi-host-fqdn> <esxi-host-shortname>" >> /etc/hosts'
  1. Re-run the migration.

Prevention

  • Ensure DNS (or /etc/hosts) is configured for all ESXi hosts in the cluster, not just vCenter.