[pve-devel] [PATCH 2/3] allow to pass spiceticket to vm_start
Alexandre Derumier
aderumier at odiso.com
Tue Jul 23 12:40:03 CEST 2013
we need it add spiceticket to target vm for migration
Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 9 ++++++++-
PVE/QemuServer.pm | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 29e7647..0ec548a 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1505,6 +1505,11 @@ __PACKAGE__->register_method({
skiplock => get_standard_option('skiplock'),
stateuri => get_standard_option('pve-qm-stateuri'),
migratedfrom => get_standard_option('pve-node',{ optional => 1 }),
+ spiceticket => {
+ description => "spiceticket from migration",
+ type => 'string',
+ optional => 1
+ },
machine => get_standard_option('pve-qm-machine'),
},
},
@@ -1524,6 +1529,8 @@ __PACKAGE__->register_method({
my $machine = extract_param($param, 'machine');
+ my $spiceticket = extract_param($param, 'spiceticket');
+
my $stateuri = extract_param($param, 'stateuri');
raise_param_exc({ stateuri => "Only root may use this option." })
if $stateuri && $authuser ne 'root at pam';
@@ -1564,7 +1571,7 @@ __PACKAGE__->register_method({
syslog('info', "start VM $vmid: $upid\n");
- PVE::QemuServer::vm_start($storecfg, $vmid, $stateuri, $skiplock, $migratedfrom, undef, $machine);
+ PVE::QemuServer::vm_start($storecfg, $vmid, $stateuri, $skiplock, $migratedfrom, undef, $machine, $spiceticket);
return;
};
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 0f2d245..4053efe 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3027,7 +3027,7 @@ sub qga_unfreezefs {
}
sub vm_start {
- my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom, $paused, $forcemachine) = @_;
+ my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom, $paused, $forcemachine, $spiceticket) = @_;
lock_config($vmid, sub {
my $conf = load_config($vmid, $migratedfrom);
--
1.7.10.4
More information about the pve-devel
mailing list