Bug#800845: autopkgtest: Add support for nested VMs
On 03/06/2016 06:26 PM, Martin Pitt wrote:
> Also, is it actually safe to add the base image *again* after a reboot
> if it already is added? Won't you have two drives then, and
> /dev/baseimage randomly points to one of it?
But setup_baseimage() doesn't do that. It's only run the first time
after QEMU is started - it's NOT run every boot. Just look at where
it's hooked in. :-)
(That was the point: I only wanted to add it once so I don't have to
deal with reboots - otherwise we need to intercept reboots and
remove the drive and all these nasty things that I didn't want to
>> What you _could_ do is create a flag file in /run and update the reboot
>> script to update the initramfs before rebooting if that flag file is
>> set - that way only if a reboot is needed will the initramfs be updated
>> and hence you optimize for the common case where that's not needed.
> That's one way to mitigate this, although it still sucks as it would
> run on *every* reboot,
No, only on the first reboot, because then the initramfs is generated
and doesn't need to be regenerated.
> We also need that
> flag file on the host side to avoid re-adding the drive to the QEMU
> monitor again on each reboot.
No, we don't, see the other patch I sent. I did use --shell on various
trivial tests to verify the presence / absence of that flag file at
various points in time.
> Maybe a better way to avoid this would be to introduce the concept of
> a pre-boot hook in adt-virt-*, which could then simply remove the
> drive via the QEMU monitor.
Why? It's not necessary.
So current git master + my flag file patch + debhelper (>= 9) works
just fine for me (and I did test it quite a bit) AND is (except for
the override) completely lintian clean, even with my lintian setting.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: OpenPGP digital signature