Create virtio-blk devices using '-drive if=none,...' and '-device virtio-blk-pci'. Has the advantage that we can support bootindex this way.
Signed-off-by: Gerd Hoffmann <kra...@redhat.com> --- client/virt/kvm_vm.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/client/virt/kvm_vm.py b/client/virt/kvm_vm.py index c1421a6..cf7fc73 100644 --- a/client/virt/kvm_vm.py +++ b/client/virt/kvm_vm.py @@ -447,6 +447,13 @@ class VM(virt_vm.BaseVM): dev += " -device ide-drive,bus=ahci.%s,drive=%s" % (index, name) format = "none" index = None + if format == "virtio": + name = "virtio%s" % index + dev += " -device virtio-blk-pci" + dev += _add_option("bootindex", bootindex) + dev += _add_option("drive", name) + format = "none" + index = None if format == "usb2": name = "usb2.%s" % index dev += " -device usb-storage" -- 1.7.1 _______________________________________________ Autotest mailing list Autotest@test.kernel.org http://test.kernel.org/cgi-bin/mailman/listinfo/autotest