[Pkg-libvirt-commits] [libguestfs] 13/17: v2v: -o qemu: Add a display to the shell script.
Hilko Bengen
bengen at moszumanska.debian.org
Fri Oct 3 14:48:31 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag debian/1%1.27.55-1
in repository libguestfs.
commit dc6bba83387c460145aa3ea87f1b8f00b59a8334
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Fri Sep 26 14:06:48 2014 +0100
v2v: -o qemu: Add a display to the shell script.
---
v2v/output_qemu.ml | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/v2v/output_qemu.ml b/v2v/output_qemu.ml
index 2ffe300..75644c2 100644
--- a/v2v/output_qemu.ml
+++ b/v2v/output_qemu.ml
@@ -38,7 +38,7 @@ object
{ t with target_file = target_file }
) targets
- method create_metadata source targets guestcaps _ =
+ method create_metadata source targets guestcaps inspect =
let name = source.s_name in
let file = dir // name ^ ".sh" in
@@ -69,6 +69,10 @@ object
fpf "%s-drive %s" nl (quote drive_param)
) targets;
+ (* XXX Missing:
+ * - removable devices
+ *)
+
let net_bus =
match guestcaps.gcaps_net_bus with
| Virtio_net -> "virtio-net-pci"
@@ -81,15 +85,26 @@ object
net_bus i (match nic.s_mac with None -> "" | Some mac -> ",mac=" ^ mac)
) source.s_nics;
+ (* Add a display. *)
+ (match source.s_display with
+ | None -> ()
+ | Some display ->
+ (match display.s_display_type with
+ | `Window ->
+ fpf "%s-display gtk" nl
+ | `VNC ->
+ fpf "%s-display vnc=:0" nl
+ | `Spice ->
+ fpf "%s-spice port=5900,addr=127.0.0.1" nl
+ );
+ fpf "%s-vga %s" nl
+ (match guestcaps.gcaps_video with Cirrus -> "cirrus" | QXL -> "qxl")
+ );
+
(* Add a serial console to Linux guests. *)
if inspect.i_type = "linux" then
fpf "%s-serial stdio" nl;
- (* XXX Missing:
- * - removable devices
- * - display
- *)
-
fpf "\n";
close_out chan;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list