提交 50a06452 编写于 作者: G Gerd Hoffmann 提交者: Alex Bennée

tests/vm: move vga setup

Move '-device VGA' from basevm.py to the guests, so they have
the chance to opt out and run without display device.
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Signed-off-by: NAlex Bennée <alex.bennee@linaro.org>
Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200310083218.26355-3-kraxel@redhat.com>
Message-Id: <20200323161514.23952-3-alex.bennee@linaro.org>
上级 698a64f9
......@@ -179,7 +179,6 @@ class BaseVM(object):
def boot(self, img, extra_args=[]):
args = self._args + [
"-device", "VGA",
"-drive", "file=%s,if=none,id=drive0,cache=writeback" % img,
"-device", "virtio-blk,drive=drive0,bootindex=0"]
args += self._data_args + extra_args
......
......@@ -82,6 +82,7 @@ class FedoraVM(basevm.BaseVM):
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso
])
self.console_init(300)
......
......@@ -92,6 +92,7 @@ class FreeBSDVM(basevm.BaseVM):
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso
])
self.console_init()
......
......@@ -86,6 +86,7 @@ class NetBSDVM(basevm.BaseVM):
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso
])
self.console_init()
......
......@@ -82,6 +82,7 @@ class OpenBSDVM(basevm.BaseVM):
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso
])
self.console_init()
......
......@@ -36,7 +36,10 @@ class UbuntuX86VM(basevm.BaseVM):
img_tmp = img + ".tmp"
subprocess.check_call(["cp", "-f", cimg, img_tmp])
self.exec_qemu_img("resize", img_tmp, "50G")
self.boot(img_tmp, extra_args = ["-cdrom", self.gen_cloud_init_iso()])
self.boot(img_tmp, extra_args = [
"-device", "VGA",
"-cdrom", self.gen_cloud_init_iso()
])
self.wait_ssh()
self.ssh_root_check("touch /etc/cloud/cloud-init.disabled")
self.ssh_root_check("apt-get update")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册