[pve-devel] [PATCH] generate spice devices cmd line after pci bridge

Alexandre Derumier aderumier at odiso.com
Wed Aug 13 01:04:31 CEST 2014


we should push to $devices array instead $cmd array,

because pci bridges need to be create before spice devices

Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index aee1c8d..cda0a03 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2694,11 +2694,11 @@ sub config_to_command {
 
 	$spice_port = PVE::Tools::next_spice_port();
 
-	push @$cmd, '-spice', "tls-port=${spice_port},addr=127.0.0.1,tls-ciphers=DES-CBC3-SHA,seamless-migration=on";
+	push @$devices, '-spice', "tls-port=${spice_port},addr=127.0.0.1,tls-ciphers=DES-CBC3-SHA,seamless-migration=on";
 
-	push @$cmd, '-device', "virtio-serial,id=spice$pciaddr";
-	push @$cmd, '-chardev', "spicevmc,id=vdagent,name=vdagent";
-	push @$cmd, '-device', "virtserialport,chardev=vdagent,name=com.redhat.spice.0";
+	push @$devices, '-device', "virtio-serial,id=spice$pciaddr";
+	push @$devices, '-chardev', "spicevmc,id=vdagent,name=vdagent";
+	push @$devices, '-device', "virtserialport,chardev=vdagent,name=com.redhat.spice.0";
     }
 
     # enable balloon by default, unless explicitly disabled
-- 
1.7.10.4



More information about the pve-devel mailing list