[Libguestfs] libguestfs can't communicate over network while creating VM

Richard W.M. Jones rjones at redhat.com
Thu Jun 16 13:48:24 UTC 2016


On Thu, Jun 16, 2016 at 11:17:16AM +0000, Mensik, Petr wrote:
> Hello guys,
> 
> we use libguests for dynamic creation of our VM and we do various modifications of those VMs in the process. One with I am struggling with is to signing keys of our custom repository -  "
> vm.sh("wget -O - " + key_address + " | apt-key add -")" where "vm" is a GuestFS object. So I have set "vm.set_network(True)" and I have installed "dhcpcd5" package
> (that's whats on Debian Jessie) on both Host OS with KVM running and VM template (because we always copy Debian template we have in order to create new VM). However according to the log libvirt is still complaining that dhcpcd is missing (line 371 in the log). I ran dhcpcd command on both machines and I've even restarted networking service - unfortunately nothing helps. So I'd like to ask you for help or at least any hints. Thanks a lot.
> 
> http://pastebin.com/d6zZG1BK
> 
> P.S. I already wrote to the #libvirt channel on IRC but nobody replied so I am trying my luck here :)

Most likely dhcpcd is not being copied into the appliance.

Try doing:

  echo dhcpcd > /usr/lib/x86_64-linux-gnu/guestfs/supermin.d/zzz-dhcp

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html




More information about the Libguestfs mailing list