[Libguestfs] Name resolution not working inside virt-customize

Lee Revell leer at inmotionhosting.com
Tue Mar 10 21:27:47 UTC 2015


On 03/10/2015 05:12 PM, Richard W.M. Jones wrote:
> I'm afraid our handling of /etc/resolv.conf inside the chroot is a
> large (and continuing) source of problems.  Currently this code is
> run:
>
> https://github.com/libguestfs/libguestfs/blob/master/daemon/command.c#L148
>
> There are a couple of thing you could do:
>
>   - Don't rely too heavily on name resolution.
>
>   - Use --firstboot* scripts instead, since they genuinely run in guest
>     context, and should therefore work more like you expect.

Thanks, I'll try these. I actually tried several other options like:

   --upload /home/leer/resolv.conf:/etc/resolv.conf

   --write /etc/resolv.conf:"nameserver 172.16.12.1"

   --run-command "echo 'nameserver 172.16.12.1' > /etc/resolv.conf"

   --copy-in /home/leer/resolv.conf:/etc/resolv.conf

The first three all failed with some variant on "'/etc/resolv.conf': No 
such file or directory". The fourth apparently has been removed from 
this version or was not compiled in.

Also I believe what I thought was scrollback buffer corruption is 
actually virt-customize making changes to the virtual as I noticed the 
md5sum of the image changed after each failed attempt.

Thanks again,

Lee




More information about the Libguestfs mailing list