Package: grml-debootstrap Version: 0.78 Severity: normal hi,
i'm trying to setup stretch images, and while the same commandline works
for jessie, it fails with stretch like this:
[...]
Processing triggers for mime-support (3.60) ...
Setting up libcurl3-gnutls:amd64 (7.52.1-5+deb9u4) ...
Setting up libtasn1-6:amd64 (4.10-1.1+deb9u1) ...
Setting up libssl1.0.2:amd64 (1.0.2l-2+deb9u2) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Setting up libdns-export162 (1:9.10.3.dfsg.P4-12.3+deb9u4) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Executing stage remove_apt_cache
Cleaning apt cache.
Executing stage services
[ ok ] Stopping OpenBSD Secure Shell server: sshd.
Executing stage remove_chrootmirror
Finished chroot installation, exiting.
umount: /mnt/debootstrap.2729/dev: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
* Removing chroot-script again
* Unmount /mnt/debootstrap.2729
umount: /mnt/debootstrap.2729: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
-> Failed (rc=32)
* Removing /var/cache/grml-debootstrap/variables_stretch-vm.img
* Removing /var/cache/grml-debootstrap/stages_stretch-vm.img
[ ok ] Stopping OpenBSD Secure Shell server: sshd.
* Unmounting /mnt/debootstrap.2729
umount: /mnt/debootstrap.2729: target is busy
(In some cases useful info about processes that
use the device is found by lsof(8) or fuser(1).)
-> Failed (rc=32)
Removing stages directory /var/cache/grml-debootstrap/stages_stretch-vm.img:
done
* Removing directory /mnt/debootstrap.2729
rmdir: failed to remove '/mnt/debootstrap.2729': Device or resource busy
-> Failed (rc=1)
* Removing loopback mount of file /home/kvm/stretch-vm.img.
device-mapper: remove ioctl on loop0p1 failed: Device or resource busy
loop deleted : /dev/loop0
-> Failed (rc=1)
* Notice: remove
/var/cache/grml-debootstrap/stages_stretch-vm.img/umount_chroot to reexecute
the stage
root@host ~ #
The command used is:
grml-debootstrap --hostname $1 --nopassword --vmsize ${4}g --chroot-scripts
$MY_TEMPDIR/ --force -r $DISTRO --debopt
"--include=fai-client,git,ssh,vim,cfengine2" --vmfile --target $IMAGE_FILE
$MY_TEMPDIR/ is filled like this:
#
# customisation of the kvm
#
MY_TEMPDIR=$(mktemp -d)
MY_TEMPFILE=$(mktemp --tmpdir=$MY_TEMPDIR)
touch $MY_TEMPFILE
chmod 700 $MY_TEMPFILE
cat >> $MY_TEMPFILE <<- EOF
cat > xxxxxxx.asc <<-FOE
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.6 (GNU/Linux)
[...]
-----END PGP PUBLIC KEY BLOCK-----
FOE
gpg -a --import ./xxxxxxxx.asc
gpg --export xxxxxxxx | apt-key add -
mkdir -p /root/.ssh
echo [...] >> /root/.ssh/authorized_keys
echo [...] >> /root/.ssh/authorized_keys
echo "-----BEGIN RSA PRIVATE KEY-----
[...]
-----END RSA PRIVATE KEY-----
" > /root/.ssh/id_rsa
echo [...] > /root/.ssh/known_hosts
echo [...] >> /root/.ssh/known_hosts
echo [...] >> /root/.ssh/known_hosts
cat > /root/.ssh/config <<- FOE
host bla
Hostname bla
Port 123
ForwardAgent no
ForwardX11 no
FOE
echo "$2 $1.bla $1" >> /etc/hosts
cat > /etc/network/interfaces <<- FOE
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address $2
netmask $NETMASK
gateway $GATEWAY
$POINTOPOINT
FOE
DEBIAN_FRONTEND=noninteractive dpkg -r resolvconf isc-dhcp-client
chmod -R 700 /root/.ssh
echo [...] >> /etc/fai/fai.conf # crude hack - last entry has precedence :)
EOF
#
# the actual setup:
#
grml-debootstrap --hostname $1 --nopassword --vmsize ${4}g --chroot-scripts
$MY_TEMPDIR/ --force -r $DISTRO --debopt
"--include=fai-client,git,ssh,vim,cfengine2" --vmfile --target $IMAGE_FILE
# so we can configure 1 cpu but allow upscaling
MAXCPU=$(grep -c ^processor /proc/cpuinfo)
virt-install --force --name $1 --ram $RAMSIZE --vcpus=2,maxvcpus=$MAXCPU
--import --disk $IMAGE_FILE --network=bridge:br0,model=virtio,mac=$3 --autostart
Glad for any help or ideas how to improve debugging.
--
cheers,
Holger
signature.asc
Description: PGP signature

