From 4f6b143c1cb32a29cbd3ff04635ba220e5db82ed Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 19 Jan 2022 16:21:50 +0000 Subject: [PATCH] output: -o libvirt, qemu: Use correct device name for vsock According to https://libvirt.org/formatdomain.html#vsock it's not . There is also no model="none", we just omit it if not present. According to https://wiki.qemu.org/Features/VirtioVsock the qemu parameter is -device vhost-vsock-pci. Fixes: 05f780c16f0135c657615520c2245b42de1efc3e Reviewed-by: Laszlo Ersek --- output/create_libvirt_xml.ml | 8 ++------ output/output_qemu.ml | 4 +--- tests/test-v2v-i-ova.xml | 1 - 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml index 93ceb803..30c23973 100644 --- a/output/create_libvirt_xml.ml +++ b/output/create_libvirt_xml.ml @@ -511,12 +511,8 @@ let create_libvirt_xml ?pool source inspect e "address" ["type", "isa"; "iobase", "0x505"] [] ] ); - List.push_back devices ( - e "viosock" - ["model", - if guestcaps.gcaps_virtio_socket then virtio_model else "none"] - [] - ); + if guestcaps.gcaps_virtio_socket then + List.push_back devices (e "vsock" ["model", virtio_model] []); (* Standard devices added to every guest. *) List.push_back_list devices [ diff --git a/output/output_qemu.ml b/output/output_qemu.ml index 3d5d6782..10ec8904 100644 --- a/output/output_qemu.ml +++ b/output/output_qemu.ml @@ -277,9 +277,7 @@ and qemu_finalize dir source inspect target_meta if guestcaps.gcaps_isa_pvpanic then arg_list "-device" ["pvpanic"; "ioport=0x505"]; if guestcaps.gcaps_virtio_socket then - arg "-viosock" "virtio" - else - arg "-viosock" "none"; + arg "-device" "vhost-vsock-pci"; (* Add a serial console to Linux guests. *) if inspect.i_type = "linux" then diff --git a/tests/test-v2v-i-ova.xml b/tests/test-v2v-i-ova.xml index e72c1db3..1915dd40 100644 --- a/tests/test-v2v-i-ova.xml +++ b/tests/test-v2v-i-ova.xml @@ -46,7 +46,6 @@ /dev/urandom - -- 2.19.1.3.g30247aa5d201