Bug#844123: autopkgtest-virt-qemu fails with sysvinit inside the vm
Hello Evgeni,
Evgeni Golov [2016-11-12 19:21 +0100]:
> I wanted to test if my packages work fine with sysvinit instead of systemd.
> For that I created a new image (using vmdebootstrap as described in the manpage),
> booted it with plain qemu, installed sysvinit-core and expected it to work.
FTR, this kind of stuff is usually easier with starting with a
standard image and using
--setup-commands 'apt-get install -y sysvinit-core'
That of course exposes the same problems, I just wanted to mention it.
> 1. there is no getty on ttyS0, so autopkgtest cannot control the VM
> this is solvable by uncommenting the ttyS0 line in /etc/inittab
> and maybe adjusting the speed to something more sensible than 9600
> I did not try, but using "agetty --keep-baud 115200,38400,9600 ttyS0 vt220"
> might also work nicely (that's what systemd is doing)
Right, sysvinit doesn't have automatic console=ttyS0 handling. So you
can extend the setup commands to do that:
--setup-commands 'apt-get install -y sysvinit-core; sed -i "/ttyS0/ s/^#//" /etc/inittab'
With that I can successfully run a trivial test. I think that part
would be harmless enough to put in setup-commands/setup-testbed, I
will keep this bug for this issue.
> 2. the VM does not get any network
> echo -e "auto ens3\niface ens3 inet dhcp" > /etc/network/interfaces.d/ens3
> seems to help, but smells like an awful hack to me.
> with systemd networkd just does the right thing here :/
Indeed vmdebootstrap defaults to networkd these days (if available
during building the VM). To use ifupdown, build it with "vmdebootstrap
--no-systemd-networkd".
Martin
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
Reply to: