]> xenbits.xensource.com Git - osstest.git/commitdiff
TestSupport: don't put kernel= in HVM config when using xl and libvirt
authorWei Liu <wei.liu2@citrix.com>
Sun, 12 Jul 2015 11:29:02 +0000 (12:29 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 31 Jul 2015 09:59:14 +0000 (10:59 +0100)
Setting kernel to hvmloader is ignored in xl but not in libvirt. Libvirt
config converter will translate that then pass it to QEMU. QEMU
complains there is no kernel called hvmloader and exits.

Remove this option for xl and libvirt.  Xl is not affected and libvirt
will be able to create HVM guest. Xend might still need it.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- use toolstack($ho) not $ho->{Toolstack} ]

Osstest/TestSupport.pm

index 4696d68c6dc47ce660fc937b506776e18cbdcfa7..ceb4d0fe647104922f9f694eaf9ac6c678aefe12 100644 (file)
@@ -1733,8 +1733,11 @@ sub more_prepareguest_hvm ($$$$;@) {
     }
     my $disks = join ",\t\t\n", map { "'$_'" } @disks;
 
+    my $kernel = toolstack($ho)->{Name} =~ m/xend/ ?
+       "kernel      = 'hvmloader'" : '';
+
     my $cfg = <<END;
-kernel      = 'hvmloader'
+$kernel
 builder     = 'hvm'
 #
 disk        = [