When outputting libvirt XML, create virtio-rng, a memory balloon
device, and a pvpanic device, if the guest supports it.
---
v2v/create_libvirt_xml.ml | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/v2v/create_libvirt_xml.ml b/v2v/create_libvirt_xml.ml
index fc7196595..58f720ac3 100644
--- a/v2v/create_libvirt_xml.ml
+++ b/v2v/create_libvirt_xml.ml
@@ -338,6 +338,25 @@ let create_libvirt_xml ?pool source target_buses guestcaps
[] in
append devices sound;
+ (* Miscellaneous KVM devices. *)
+ if guestcaps.gcaps_virtio_rng then
+ push_back devices (
+ e "rng" ["model", "virtio"] [
+ (* XXX Using /dev/urandom requires libvirt >= 1.3.4. Libvirt
+ * was broken before that.
+ *)
+ e "backend" ["model", "random"] [PCData
"/dev/urandom"]
+ ]
+ );
+ if guestcaps.gcaps_virtio_balloon then
+ push_back devices (e "memballoon" ["model", "virtio"]
[]);
+ if guestcaps.gcaps_isa_pvpanic then
+ push_back devices (
+ e "panic" ["model", "isa"] [
+ e "address" ["type", "isa"; "iobase",
"0x505"] []
+ ]
+ );
+
(* Standard devices added to every guest. *)
append devices [
e "input" ["type", "tablet"; "bus",
"usb"] [];
--
2.12.0