Lee Revell
2015-Mar-11 19:09 UTC
Re: [Libguestfs] Name resolution not working inside virt-customize
On 03/10/2015 05:12 PM, Richard W.M. Jones wrote:> Just for comparison, libguestfs 1.29.29 on Fedora host, plus > virt-builder, with a Fedora guest does this: >libguestfs 1.29.29 on a ubuntu 14.04 host with fedora-21 guest seems have no functioning network, it cannot ping the host. Is there some configuration required on the host? leer@eng-leer:~/libguestfs-1.29.29$ virt-builder fedora-21 --run-command "ping -c 4 172.16.12.200" [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-21.xz [ 1.0] Planning how to build this image [ 1.0] Uncompressing [ 28.0] Opening the new disk [ 31.0] Setting a random seed [ 31.0] Running: ping -c 4 172.16.12.200 connect: Network is unreachable virt-builder: error: ping -c 4 172.16.12.200: command exited with an error Lee
Richard W.M. Jones
2015-Mar-12 08:35 UTC
Re: [Libguestfs] Name resolution not working inside virt-customize
On Wed, Mar 11, 2015 at 03:09:56PM -0400, Lee Revell wrote:> On 03/10/2015 05:12 PM, Richard W.M. Jones wrote: > >Just for comparison, libguestfs 1.29.29 on Fedora host, plus > >virt-builder, with a Fedora guest does this: > > > > libguestfs 1.29.29 on a ubuntu 14.04 host with fedora-21 guest seems > have no functioning network, it cannot ping the host. Is there some > configuration required on the host? > > leer@eng-leer:~/libguestfs-1.29.29$ virt-builder fedora-21 > --run-command "ping -c 4 172.16.12.200" > [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-21.xz > [ 1.0] Planning how to build this image > [ 1.0] Uncompressing > [ 28.0] Opening the new disk > [ 31.0] Setting a random seed > [ 31.0] Running: ping -c 4 172.16.12.200 > connect: Network is unreachable > virt-builder: error: ping -c 4 172.16.12.200: command exited with an errorBecause of the non-root networking technology we use (SLIRP), 'ping' doesn't work and there are other shortcomings. See: http://libguestfs.org/virt-rescue.1.html#network If you use the libvirt backend, it is able to set up a real network without needing root (but using a setuid program called 'qemu-bridge-helper' supplied by qemu), but we don't have that for the direct backend yet. http://libguestfs.org/guestfs.3.html#backend 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
Lee Revell
2015-Mar-13 13:14 UTC
Re: [Libguestfs] Name resolution not working inside virt-customize
On 03/12/2015 04:35 AM, Richard W.M. Jones wrote:>> leer@eng-leer:~/libguestfs-1.29.29$ virt-builder fedora-21 >> --run-command "ping -c 4 172.16.12.200" >> [ 1.0] Downloading: http://libguestfs.org/download/builder/fedora-21.xz >> [ 1.0] Planning how to build this image >> [ 1.0] Uncompressing >> [ 28.0] Opening the new disk >> [ 31.0] Setting a random seed >> [ 31.0] Running: ping -c 4 172.16.12.200 >> connect: Network is unreachable >> virt-builder: error: ping -c 4 172.16.12.200: command exited with an error > > Because of the non-root networking technology we use (SLIRP), 'ping' > doesn't work and there are other shortcomings. See:I think the problem actually goes deeper than name resolution. On a Ubuntu 14.04 host the firstboot-command doesn't seem to be run at all and it appears that the network never gets configured. Here is a complete log. The same command, libguestfs + supermin version, and images all work perfectly on a Fedora 21 host. Command tested: $ ./run virt-builder fedora-21 --firstboot-command "echo 'testing' > /var/log/test" -v -x 2>&1 | tee virt-builder.log This appears to succeed as the log shows, but then mounting the image with guestfish: $ ./run guestfish -a fedora-21.img Welcome to guestfish, the guest filesystem shell for editing virtual machine filesystems and disk images. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell ><fs> run ><fs> mount /dev/sda3 / ><fs> ls /var/log/ README anaconda audit journal ppp ><fs> exit Lee
Maybe Matching Threads
- Re: Name resolution not working inside virt-customize
- Re: Name resolution not working inside virt-customize
- Re: Name resolution not working inside virt-customize
- Name resolution not working inside virt-customize
- Re: Name resolution not working inside virt-customize