Hi,
On Thursday 16 June 2016 11:17:16 Mensik, Petr wrote:
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
This is not really a libvirt issue, but a libguestfs one.
When setting up the network, libguestfs tries to use first dhclient if
available, then dhcpcd otherwise.
I see that libguestfs0 currently in Stretch has a dependency on
isc-dhcp-client, but it looks like the version in Jessie does not.
Do you have isc-dhcp-client installed on the machine where you run the
Python script? If not, install it and then run `libguestfs-test-tool`
to update the libguestfs appliance (it will be done anyway later, but
this way your script doesn't take more than needed).
Once you have done that, does the network work?
--
Pino Toscano