[Libguestfs] [PATCH v2 7/8] v2v: -o qemu: Add virtio-rng, balloon and pvpanic to output (RHBZ#1438794).

Richard W.M. Jones rjones at redhat.com
Wed Apr 5 14:40:33 UTC 2017


---
 v2v/output_qemu.ml | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml
index a6feeaab4..7246511dc 100644
--- a/v2v/output_qemu.ml
+++ b/v2v/output_qemu.ml
@@ -211,6 +211,18 @@ object
         )
     );
 
+    (* Add the miscellaneous KVM devices. *)
+    if guestcaps.gcaps_virtio_rng then (
+      arg "-object" "rng-random,filename=/dev/urandom,id=rng0";
+      arg "-device" "virtio-rng-pci,rng=rng0"
+    );
+    if guestcaps.gcaps_virtio_balloon then
+      arg "-balloon" "virtio"
+    else
+      arg "-balloon" "none";
+    if guestcaps.gcaps_isa_pvpanic then
+      arg "-device" "pvpanic,ioport=0x505";
+
     (* Add a serial console to Linux guests. *)
     if inspect.i_type = "linux" then
       arg "-serial" "stdio";
-- 
2.12.0




More information about the Libguestfs mailing list