Thanks for answering my email! I actually went about solving this by using ssh to issue remote commands to the hypervisor to run the virt-customize command. For my small setup this will work without issue.

Thanks again! 

Richard Maloley II

On Jun 10, 2017, at 2:33 AM, Richard W.M. Jones <> wrote:

On Fri, Jun 09, 2017 at 08:07:57PM -0400, Richard Maloley II wrote:

Hello - I am hoping that you can shed some light on an issue I am
encountering. This could be due to my inexperience with KVM/Libvirtd
and the associated tools.

Scenario: I am writing a VM deployment script for my home lab. From
my admin workstation I can connect to my KVM host and execute a
virt-clone operation without issue. I then want to virt-customize
the new VM. This ends up in an error.

Essentially I believe it is telling me that it can’t find the disk
file.  However I can validate that the file exists on my KVM Host:

[list of images]

My question: Is virt-customize attempting to look at my local system
(admin jump box) instead of the libvirtd connection to KVM02? Or is
this a bug? Or did I simply miss an option that I need to include?

When connected to a remote libvirtd, virt-customize simply asks
libvirt for a list of the domains, but then it tries to open the disk
images returned as regular files.  The libvirt XML doesn't contain any
information that disk images are remote nor how to connect to remote

There are however several ways to edit remote files, although none of
them are completely transparent.  Probably the simplest method is to
share /var/lib/libvirt/images over NFS so it appears at the same path
on every machine.

More complex methods include NBD, iSCSI, ssh:// URLs, etc.  See:

These URLs should work with virt-customize too if you use a recent
enough version.

You might also find my minimal cloud software useful, although this
does not use remote storage, but relies on the controller being able
to use passwordless ssh to connect to each cloud node:;a=summary


Richard Jones, Virtualization Group, Red Hat
Read my programming and virtualization blog:
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.