[pve-devel] [PATCH qemu-server 2/4] add timeout parameter to vm start sub

Tim Marx t.marx at proxmox.com
Tue Jan 14 12:53:31 CET 2020


Signed-off-by: Tim Marx <t.marx at proxmox.com>
---
 PVE/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 2b68d81..a7aff07 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5196,7 +5196,7 @@ sub vmconfig_update_disk {
 
 sub vm_start {
     my ($storecfg, $vmid, $statefile, $skiplock, $migratedfrom, $paused,
-	$forcemachine, $spice_ticket, $migration_network, $migration_type, $targetstorage) = @_;
+	$forcemachine, $spice_ticket, $migration_network, $migration_type, $targetstorage, $timeout) = @_;
 
     PVE::QemuConfig->lock_config($vmid, sub {
 	my $conf = PVE::QemuConfig->load_config($vmid, $migratedfrom);
@@ -5399,7 +5399,7 @@ sub vm_start {
 	my $cpuunits = defined($conf->{cpuunits}) ? $conf->{cpuunits}
 	                                          : $defaults->{cpuunits};
 
-	my $start_timeout = ($conf->{hugepages} || $is_suspended) ? 300 : 30;
+	my $start_timeout = $timeout // ($conf->{hugepages} || $is_suspended) ? 300 : 30;
 	my %run_params = (
 	    timeout => $statefile ? undef : $start_timeout,
 	    umask => 0077,
-- 
2.20.1




More information about the pve-devel mailing list