[Libguestfs] virt-builder is very slow in git master when building ubuntu 14.04 vm

阎淼 yanmiaobest at gmail.com
Thu Dec 3 11:16:31 UTC 2015


Hi All,

I been using virt-builder to create testing VMs (most ubuntu) for a
while, and it works great. But when I cloned the git repo today and
found the process becoming extremely slow, please see the output
below.

log that produced by pre-installed vendor package:

virt-builder ubuntu-14.04 --firstboot-command 'useradd -m -p "" myan;
chage -d 0 myan; usermod -aG sudo myan;'
[   3.0] Downloading: http://libguestfs.org/download/builder/ubuntu-14.04.xz
[   4.0] Planning how to build this image
[   4.0] Uncompressing
[   6.0] Opening the new disk
[  11.0] Setting a random seed
[  11.0] Installing firstboot command: [1] useradd -m -p "" myan;
chage -d 0 myan; usermod -aG sudo myan;
[  11.0] Setting passwords
virt-builder: Setting random password of root to 5bRx9fpQ7kjPh0Dd
[  12.0] Finishing off
                   Output file: ubuntu-14.04.img
                   Output size: 4.0G
                 Output format: raw
            Total usable space: 2.9G
                    Free space: 2.0G (69%)



log that produced by git master:

~/vm$../work/libguestfs/run virt-builder ubuntu-14.04
--firstboot-command 'useradd -m -p "" myan; chage -d 0 myan; usermod
-aG sudo myan;'

[   0.4] Downloading:
file:///home/myan/work/libguestfs/builder/website/ubuntu-14.04.xz
[   1.7] Planning how to build this image
[   1.7] Uncompressing
[   4.4] Opening the new disk
[ 628.3] Setting a random seed
[ 628.4] Installing firstboot command: useradd -m -p "" myan; chage -d
0 myan; usermod -aG sudo myan;
[ 628.4] Setting passwords
virt-builder: Setting random password of root to owA2CFqJeDYT92Sq
[ 629.4] Finishing off
                   Output file: ubuntu-14.04.img
                   Output size: 4.0G
                 Output format: raw
            Total usable space: 2.9G
                    Free space: 2.0G (69%)


Turning on debug shows that it spent most of time spinning here:

[...]
/sbin/dhclient-script: 31: /sbin/dhclient-script: cannot open
/etc/fstab: No such file
RTNETLINK answers: File exists
[...]

Any idea what's the problem or is it a known issue ? Thanks.

Miao




More information about the Libguestfs mailing list