[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libguestfs] virt-customize issue/question



Rich,

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
616-745-6914



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

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

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
files.

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:

 http://libguestfs.org/guestfish.1.html#adding-remote-storage

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:

 http://git.annexia.org/?p=mclu.git;a=summary
 https://rwmj.wordpress.com/2015/03/23/mini-cloudcluster-v2-0/

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]