<div dir="ltr"><div><div style="font-size:12.8px">Package: libvirt</div><div style="font-size:12.8px">Version: 2.5.0-1</div><div style="font-size:12.8px">Severity: normal</div></div><div><br></div>This is a continuation of debbug 848247.<div>But you said you want to close that with next upload but I should come back.</div><div><br></div><div>While the tests are now working fine in local autopkgtest I was throwing them at launchpad this night.</div><div>And I think there I had a case where the discussion on "virt-host-validate qemu".</div><div><br></div><div>Maybe we should use it as an early exits as in the lxc case - to detect incompatible environments.</div><div>I've seen this:</div><div><div>+ virt-host-validate qemu</div><div> QEMU: Checking for hardware virtualization : PASS</div><div> QEMU: Checking if device /dev/kvm exists : FAIL (Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has enabled virtualization)</div></div><div><br></div><div>[...]</div><div><br></div><div><div>+ virsh start sqs</div><div>error: Failed to start domain sqs</div><div>error: unsupported configuration: Domain requires KVM, but it is not available. Check that virtualization is enabled in the host BIOS, and host configuration is setup to load the kvm modules.</div><div><br></div><div>That is IMHO due to only having "<span style="color:rgb(0,0,0);font-family:monospace">isolation-container", but could even happen in isolaton-machine dependin on the setup.</span></div><div><br></div><div>The TL;DR that I suggest is:</div><div>1. tampering with (actually more depending on) modules => needs isolation-machine</div><div>2. if virt-host-validate qemu fails use it as an early exit (as you agreed for the lxc case) as the env won't be good (in some way at least) to later on in the test really start the guests</div><div><br></div><div>I kept the needs-root for now in my local delta, it will still use the qemu:/// connection since the env is set.</div><div><br></div><div>So for now I'd suggest to add:</div><div><span style="font-family:monospace"><span style="font-weight:bold;color:rgb(0,0,0)">diff --git a/debian/tests/control b/debian/tests/control</span><span style="color:rgb(0,0,0)"> </span><br><span style="font-weight:bold;color:rgb(0,0,0)">index f965827..c4f5244 100644</span><span style="color:rgb(0,0,0)"> <wbr> </span><br><span style="font-weight:bold;color:rgb(0,0,0)">--- a/debian/tests/control</span><span style="color:rgb(0,0,0)"> <wbr> </span><br><span style="font-weight:bold;color:rgb(0,0,0)">+++ b/debian/tests/control</span><span style="color:rgb(0,0,0)"> <wbr> </span><br><span style="color:rgb(24,178,178)">@@ -5,7 +5,7 @@</span><span style="color:rgb(0,0,0)"> Restrictions: allow-stderr </span><br> Tests: smoke-qemu-session <wbr> <br> Depends: libvirt-daemon-system, libvirt-clients, qemu-system, libxml2-<br>utils, <wbr> <wbr> <br> qemu-kvm
<br><span style="color:rgb(178,24,24)">-Restrictions: allow-stderr, isolation-container, needs-root</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(24,178,24)">+Restrictions: allow-stderr, isolation-machine, needs-root</span><span style="color:rgb(0,0,0)">
</span><br> <br> Tests: smoke-lxc
<br> Depends: libvirt-daemon-system, libvirt-clients, libxml2-utils
<br><span style="font-weight:bold;color:rgb(0,0,0)">diff --git a/debian/tests/smoke-qemu-<wbr>session b/debian/tests/smoke-qemu-</span><br>session<span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(0,0,0)">index c238308..968a3f3 100755</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(0,0,0)">--- a/debian/tests/smoke-qemu-<wbr>session</span><span style="color:rgb(0,0,0)">
</span><br><span style="font-weight:bold;color:rgb(0,0,0)">+++ b/debian/tests/smoke-qemu-<wbr>session</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(24,178,178)">@@ -29,7 +29,7 @@</span><span style="color:rgb(0,0,0)"> if [ $(uname -m) != "x86_64" ]; then
</span><br> fi
<br> <br> echo echo "Running as $USER"
<br><span style="color:rgb(178,24,24)">-virt-host-validate qemu || true</span><span style="color:rgb(0,0,0)">
</span><br><span style="color:rgb(24,178,24)">+virt-host-validate qemu || exit 0</span><span style="color:rgb(0,0,0)">
</span><br> virsh capabilities
<br> virsh capabilities | grep -qs "arch.*x86_64"
<br> virsh capabilities | grep -qs 'os_type>hvm'<br></span></div><div><br></div><div><br></div><div>P.S. FYI I found another issue with the smoke-lxc on s390x but haven't debugged it yet - I'll let you know as soon as I know anything more.</div><div><br></div>-- <br><div class="gmail-m_-5451792817656550042gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="color:rgb(136,136,136);font-size:12.8px">Christian Ehrhardt</span><div style="color:rgb(136,136,136);font-size:12.8px">Software Engineer, Ubuntu Server</div><div style="color:rgb(136,136,136);font-size:12.8px">Canonical Ltd</div></div></div></div></div>
</div></div>