According to
https://libvirt.org/formatdomain.html#vsock it's <vsock/>
not <viosock/>. 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
---
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 93ceb803cc..30c23973f7 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 3d5d67820e..10ec89042b 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 e72c1db396..1915dd40af 100644
--- a/tests/test-v2v-i-ova.xml
+++ b/tests/test-v2v-i-ova.xml
@@ -46,7 +46,6 @@
<backend model='random'>/dev/urandom</backend>
</rng>
<memballoon model='virtio-transitional'/>
- <viosock model='none'/>
<input type='tablet' bus='usb'/>
<input type='mouse' bus='ps2'/>
<console type='pty'/>
--
2.32.0