]>
Commit | Line | Data |
---|---|---|
990fc5e2 | 1 | #!/usr/bin/perl |
1e3baf05 DM |
2 | |
3 | use strict; | |
990fc5e2 | 4 | use warnings; |
1e3baf05 DM |
5 | use Getopt::Long; |
6 | use Fcntl ':flock'; | |
7 | use File::Path; | |
8 | use IO::Socket::UNIX; | |
9 | use IO::Select; | |
10 | ||
11 | use PVE::Tools qw(extract_param); | |
12 | use PVE::Cluster; | |
13 | use PVE::SafeSyslog; | |
14 | use PVE::INotify; | |
15 | use PVE::RPCEnvironment; | |
16 | use PVE::QemuServer; | |
17 | use PVE::API2::Qemu; | |
18 | use PVE::JSONSchema qw(get_standard_option); | |
19 | use Term::ReadLine; | |
20 | ||
21 | use PVE::CLIHandler; | |
22 | ||
23 | use base qw(PVE::CLIHandler); | |
24 | ||
25 | $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; | |
26 | ||
27 | initlog('qm'); | |
28 | ||
29 | die "please run as root\n" if $> != 0; | |
30 | ||
31 | PVE::INotify::inotify_init(); | |
32 | ||
33 | my $rpcenv = PVE::RPCEnvironment->init('cli'); | |
34 | ||
35 | $rpcenv->init_request(); | |
36 | $rpcenv->set_language($ENV{LANG}); | |
37 | $rpcenv->set_user('root@pam'); | |
38 | ||
2372d114 DM |
39 | my $upid_exit = sub { |
40 | my $upid = shift; | |
41 | my $status = PVE::Tools::upid_read_status($upid); | |
42 | exit($status eq 'OK' ? 0 : -1); | |
43 | }; | |
44 | ||
1e3baf05 DM |
45 | my $nodename = PVE::INotify::nodename(); |
46 | ||
1e3baf05 | 47 | sub run_vnc_proxy { |
983d4582 | 48 | my ($path) = @_; |
1e3baf05 | 49 | |
7aca7104 SP |
50 | my $c; |
51 | while ( ++$c < 10 && !-e $path ) { sleep(1); } | |
52 | ||
1e3baf05 DM |
53 | my $s = IO::Socket::UNIX->new(Peer => $path, Timeout => 120); |
54 | ||
55 | die "unable to connect to socket '$path' - $!" if !$s; | |
56 | ||
57 | my $select = new IO::Select; | |
58 | ||
59 | $select->add(\*STDIN); | |
60 | $select->add($s); | |
61 | ||
62 | my $timeout = 60*15; # 15 minutes | |
63 | ||
64 | my @handles; | |
65 | while ($select->count && | |
66 | scalar(@handles = $select->can_read ($timeout))) { | |
67 | foreach my $h (@handles) { | |
68 | my $buf; | |
69 | my $n = $h->sysread($buf, 4096); | |
70 | ||
71 | if ($h == \*STDIN) { | |
72 | if ($n) { | |
73 | syswrite($s, $buf); | |
74 | } else { | |
75 | exit(0); | |
76 | } | |
77 | } elsif ($h == $s) { | |
78 | if ($n) { | |
79 | syswrite(\*STDOUT, $buf); | |
80 | } else { | |
81 | exit(0); | |
82 | } | |
83 | } | |
84 | } | |
85 | } | |
86 | exit(0); | |
87 | } | |
88 | ||
89 | __PACKAGE__->register_method ({ | |
90 | name => 'showcmd', | |
91 | path => 'showcmd', | |
92 | method => 'GET', | |
93 | description => "Show command line which is used to start the VM (debug info).", | |
94 | parameters => { | |
95 | additionalProperties => 0, | |
96 | properties => { | |
97 | vmid => get_standard_option('pve-vmid'), | |
98 | }, | |
99 | }, | |
100 | returns => { type => 'null'}, | |
101 | code => sub { | |
102 | my ($param) = @_; | |
103 | ||
104 | my $storecfg = PVE::Storage::config(); | |
105 | print PVE::QemuServer::vm_commandline($storecfg, $param->{vmid}) . "\n"; | |
106 | ||
107 | return undef; | |
108 | }}); | |
109 | ||
110 | __PACKAGE__->register_method ({ | |
111 | name => 'status', | |
112 | path => 'status', | |
113 | method => 'GET', | |
114 | description => "Show VM status.", | |
115 | parameters => { | |
116 | additionalProperties => 0, | |
117 | properties => { | |
118 | vmid => get_standard_option('pve-vmid'), | |
119 | verbose => { | |
120 | description => "Verbose output format", | |
121 | type => 'boolean', | |
122 | optional => 1, | |
123 | } | |
124 | }, | |
125 | }, | |
126 | returns => { type => 'null'}, | |
127 | code => sub { | |
128 | my ($param) = @_; | |
129 | ||
130 | # test if VM exists | |
131 | my $conf = PVE::QemuServer::load_config ($param->{vmid}); | |
132 | ||
133 | my $vmstatus = PVE::QemuServer::vmstatus($param->{vmid}); | |
134 | my $stat = $vmstatus->{$param->{vmid}}; | |
135 | if ($param->{verbose}) { | |
136 | foreach my $k (sort (keys %$stat)) { | |
137 | next if $k eq 'cpu' || $k eq 'relcpu'; # always 0 | |
138 | my $v = $stat->{$k}; | |
139 | next if !defined($v); | |
140 | print "$k: $v\n"; | |
141 | } | |
142 | } else { | |
143 | my $status = $stat->{status} || 'unknown'; | |
144 | print "status: $status\n"; | |
145 | } | |
146 | ||
147 | return undef; | |
148 | }}); | |
149 | ||
150 | __PACKAGE__->register_method ({ | |
151 | name => 'vncproxy', | |
152 | path => 'vncproxy', | |
153 | method => 'PUT', | |
154 | description => "Proxy VM VNC traffic to stdin/stdout", | |
155 | parameters => { | |
156 | additionalProperties => 0, | |
157 | properties => { | |
158 | vmid => get_standard_option('pve-vmid'), | |
159 | }, | |
160 | }, | |
161 | returns => { type => 'null'}, | |
162 | code => sub { | |
163 | my ($param) = @_; | |
164 | ||
165 | my $vmid = $param->{vmid}; | |
983d4582 DM |
166 | my $vnc_socket = PVE::QemuServer::vnc_socket($vmid); |
167 | ||
168 | if (my $ticket = $ENV{LC_PVE_TICKET}) { # NOTE: ssh on debian only pass LC_* variables | |
169 | PVE::QemuServer::vm_mon_cmd($vmid, "change", device => 'vnc', target => "unix:$vnc_socket,password"); | |
170 | PVE::QemuServer::vm_mon_cmd($vmid, "set_password", protocol => 'vnc', password => $ticket); | |
171 | PVE::QemuServer::vm_mon_cmd($vmid, "expire_password", protocol => 'vnc', time => "+30"); | |
172 | } else { | |
173 | PVE::QemuServer::vm_mon_cmd($vmid, "change", device => 'vnc', target => "unix:$vnc_socket,x509,password"); | |
174 | } | |
1e3baf05 | 175 | |
983d4582 | 176 | run_vnc_proxy($vnc_socket); |
1e3baf05 DM |
177 | |
178 | return undef; | |
179 | }}); | |
180 | ||
181 | __PACKAGE__->register_method ({ | |
182 | name => 'unlock', | |
183 | path => 'unlock', | |
184 | method => 'PUT', | |
185 | description => "Unlock the VM.", | |
186 | parameters => { | |
187 | additionalProperties => 0, | |
188 | properties => { | |
189 | vmid => get_standard_option('pve-vmid'), | |
190 | }, | |
191 | }, | |
192 | returns => { type => 'null'}, | |
193 | code => sub { | |
194 | my ($param) = @_; | |
195 | ||
196 | my $vmid = $param->{vmid}; | |
197 | ||
198 | PVE::QemuServer::lock_config ($vmid, sub { | |
1858638f DM |
199 | my $conf = PVE::QemuServer::load_config($vmid); |
200 | delete $conf->{lock}; | |
201 | PVE::QemuServer::update_config_nolock($vmid, $conf, 1); | |
1e3baf05 DM |
202 | }); |
203 | ||
204 | return undef; | |
205 | }}); | |
206 | ||
207 | __PACKAGE__->register_method ({ | |
208 | name => 'mtunnel', | |
209 | path => 'mtunnel', | |
210 | method => 'POST', | |
32f9da68 | 211 | description => "Used by qmigrate - do not use manually.", |
1e3baf05 DM |
212 | parameters => { |
213 | additionalProperties => 0, | |
214 | properties => {}, | |
215 | }, | |
216 | returns => { type => 'null'}, | |
217 | code => sub { | |
218 | my ($param) = @_; | |
219 | ||
32f9da68 DM |
220 | if (!PVE::Cluster::check_cfs_quorum(1)) { |
221 | print "no quorum\n"; | |
222 | return undef; | |
223 | } | |
224 | ||
1e3baf05 DM |
225 | print "tunnel online\n"; |
226 | *STDOUT->flush(); | |
227 | ||
228 | while (my $line = <>) { | |
229 | chomp $line; | |
230 | last if $line =~ m/^quit$/; | |
231 | } | |
232 | ||
233 | return undef; | |
234 | }}); | |
235 | ||
1e3baf05 DM |
236 | __PACKAGE__->register_method ({ |
237 | name => 'wait', | |
238 | path => 'wait', | |
239 | method => 'GET', | |
240 | description => "Wait until the VM is stopped.", | |
241 | parameters => { | |
242 | additionalProperties => 0, | |
243 | properties => { | |
244 | vmid => get_standard_option('pve-vmid'), | |
245 | timeout => { | |
246 | description => "Timeout in seconds. Default is to wait forever.", | |
247 | type => 'integer', | |
248 | minimum => 1, | |
249 | optional => 1, | |
250 | } | |
251 | }, | |
252 | }, | |
253 | returns => { type => 'null'}, | |
254 | code => sub { | |
255 | my ($param) = @_; | |
256 | ||
257 | my $vmid = $param->{vmid}; | |
258 | my $timeout = $param->{timeout}; | |
259 | ||
260 | my $pid = PVE::QemuServer::check_running ($vmid); | |
261 | return if !$pid; | |
262 | ||
263 | print "waiting until VM $vmid stopps (PID $pid)\n"; | |
264 | ||
265 | my $count = 0; | |
266 | while ((!$timeout || ($count < $timeout)) && PVE::QemuServer::check_running ($vmid)) { | |
267 | $count++; | |
268 | sleep 1; | |
269 | } | |
270 | ||
271 | die "wait failed - got timeout\n" if PVE::QemuServer::check_running ($vmid); | |
272 | ||
273 | return undef; | |
274 | }}); | |
275 | ||
276 | __PACKAGE__->register_method ({ | |
277 | name => 'monitor', | |
278 | path => 'monitor', | |
279 | method => 'POST', | |
280 | description => "Enter Qemu Monitor interface.", | |
281 | parameters => { | |
282 | additionalProperties => 0, | |
283 | properties => { | |
284 | vmid => get_standard_option('pve-vmid'), | |
285 | }, | |
286 | }, | |
287 | returns => { type => 'null'}, | |
288 | code => sub { | |
289 | my ($param) = @_; | |
290 | ||
291 | my $vmid = $param->{vmid}; | |
292 | ||
293 | my $conf = PVE::QemuServer::load_config ($vmid); # check if VM exists | |
294 | ||
295 | print "Entering Qemu Monitor for VM $vmid - type 'help' for help\n"; | |
296 | ||
297 | my $term = new Term::ReadLine ('qm'); | |
298 | ||
299 | my $input; | |
300 | while (defined ($input = $term->readline('qm> '))) { | |
301 | chomp $input; | |
302 | ||
303 | next if $input =~ m/^\s*$/; | |
304 | ||
305 | last if $input =~ m/^\s*q(uit)?\s*$/; | |
306 | ||
307 | eval { | |
9df5cbcc | 308 | print PVE::QemuServer::vm_human_monitor_command ($vmid, $input); |
1e3baf05 DM |
309 | }; |
310 | print "ERROR: $@" if $@; | |
311 | } | |
312 | ||
313 | return undef; | |
314 | ||
315 | }}); | |
316 | ||
c21536ab DM |
317 | __PACKAGE__->register_method ({ |
318 | name => 'rescan', | |
319 | path => 'rescan', | |
320 | method => 'POST', | |
321 | description => "Rescan all storages and update disk sizes and unused disk images.", | |
322 | parameters => { | |
323 | additionalProperties => 0, | |
324 | properties => { | |
325 | vmid => get_standard_option('pve-vmid', {optional => 1}), | |
326 | }, | |
327 | }, | |
328 | returns => { type => 'null'}, | |
329 | code => sub { | |
330 | my ($param) = @_; | |
331 | ||
91bd6c90 | 332 | PVE::QemuServer::rescan($param->{vmid}); |
c21536ab DM |
333 | |
334 | return undef; | |
335 | }}); | |
336 | ||
c243fc8a DM |
337 | __PACKAGE__->register_method ({ |
338 | name => 'terminal', | |
339 | path => 'terminal', | |
340 | method => 'POST', | |
341 | description => "Open a terminal using a serial device (The VM need to have a serial device configured, for example 'serial0: socket')", | |
342 | parameters => { | |
343 | additionalProperties => 0, | |
344 | properties => { | |
345 | vmid => get_standard_option('pve-vmid'), | |
346 | iface => { | |
f409f8dc | 347 | description => "Select the serial device. By default we simply use the first suitable device.", |
c243fc8a DM |
348 | type => 'string', |
349 | optional => 1, | |
350 | enum => [qw(serial0 serial1 serial2 serial3)], | |
351 | } | |
352 | }, | |
353 | }, | |
354 | returns => { type => 'null'}, | |
355 | code => sub { | |
356 | my ($param) = @_; | |
357 | ||
358 | my $vmid = $param->{vmid}; | |
359 | ||
360 | my $conf = PVE::QemuServer::load_config ($vmid); # check if VM exists | |
361 | ||
362 | my $iface = $param->{iface}; | |
363 | ||
364 | if ($iface) { | |
365 | die "serial interface '$iface' is not configured\n" if !$conf->{$iface}; | |
366 | die "wrong serial type on interface '$iface'\n" if $conf->{$iface} ne 'socket'; | |
367 | } else { | |
368 | foreach my $opt (qw(serial0 serial1 serial2 serial3)) { | |
369 | if ($conf->{$opt} && ($conf->{$opt} eq 'socket')) { | |
370 | $iface = $opt; | |
371 | last; | |
372 | } | |
373 | } | |
374 | die "unable to find a serial interface\n" if !$iface; | |
375 | } | |
376 | ||
377 | die "VM $vmid not running\n" if !PVE::QemuServer::check_running($vmid); | |
378 | ||
379 | my $socket = "/var/run/qemu-server/${vmid}.$iface"; | |
380 | ||
381 | my $cmd = "socat UNIX-CONNECT:$socket STDIO,raw,echo=0,escape=0x0f"; | |
382 | ||
383 | print "starting serial terminal on interface $iface (press control-O to exit)\n"; | |
384 | ||
385 | system($cmd); | |
386 | ||
387 | return undef; | |
388 | }}); | |
389 | ||
1e3baf05 DM |
390 | my $cmddef = { |
391 | list => [ "PVE::API2::Qemu", 'vmlist', [], | |
392 | { node => $nodename }, sub { | |
393 | my $vmlist = shift; | |
394 | ||
395 | exit 0 if (!scalar(@$vmlist)); | |
396 | ||
397 | printf "%10s %-20s %-10s %-10s %12s %-10s\n", | |
398 | qw(VMID NAME STATUS MEM(MB) BOOTDISK(GB) PID); | |
399 | ||
400 | foreach my $rec (sort { $a->{vmid} <=> $b->{vmid} } @$vmlist) { | |
401 | printf "%10s %-20s %-10s %-10s %12.2f %-10s\n", $rec->{vmid}, $rec->{name}, | |
402 | $rec->{status}, | |
403 | ($rec->{maxmem} || 0)/(1024*1024), | |
404 | ($rec->{maxdisk} || 0)/(1024*1024*1024), | |
405 | $rec->{pid}||0; | |
406 | } | |
407 | ||
408 | ||
409 | } ], | |
410 | ||
2372d114 | 411 | create => [ "PVE::API2::Qemu", 'create_vm', ['vmid'], { node => $nodename }, $upid_exit ], |
1e3baf05 | 412 | |
2372d114 | 413 | destroy => [ "PVE::API2::Qemu", 'destroy_vm', ['vmid'], { node => $nodename }, $upid_exit ], |
1e3baf05 | 414 | |
9418baad | 415 | clone => [ "PVE::API2::Qemu", 'clone_vm', ['vmid', 'newid'], { node => $nodename }, $upid_exit ], |
6116f729 | 416 | |
ac021d2e | 417 | migrate => [ "PVE::API2::Qemu", 'migrate_vm', ['vmid', 'target'], { node => $nodename }, $upid_exit ], |
3ea94c60 | 418 | |
1e3baf05 DM |
419 | set => [ "PVE::API2::Qemu", 'update_vm', ['vmid'], { node => $nodename } ], |
420 | ||
2f48a4f5 | 421 | resize => [ "PVE::API2::Qemu", 'resize_vm', ['vmid', 'disk', 'size'], { node => $nodename } ], |
0d02881c | 422 | |
43bc02a9 | 423 | move_disk => [ "PVE::API2::Qemu", 'move_vm_disk', ['vmid', 'disk', 'storage'], { node => $nodename }, $upid_exit ], |
586bfa78 | 424 | |
213ef632 | 425 | unlink => [ "PVE::API2::Qemu", 'unlink', ['vmid'], { node => $nodename } ], |
1e3baf05 DM |
426 | |
427 | config => [ "PVE::API2::Qemu", 'vm_config', ['vmid'], | |
428 | { node => $nodename }, sub { | |
429 | my $config = shift; | |
430 | foreach my $k (sort (keys %$config)) { | |
554ac7e7 | 431 | next if $k eq 'digest'; |
1e3baf05 DM |
432 | my $v = $config->{$k}; |
433 | if ($k eq 'description') { | |
434 | $v = PVE::Tools::encode_text($v); | |
435 | } | |
436 | print "$k: $v\n"; | |
437 | } | |
438 | }], | |
439 | ||
1e7f2726 DM |
440 | pending => [ "PVE::API2::Qemu", 'vm_pending', ['vmid'], |
441 | { node => $nodename }, sub { | |
442 | my $data = shift; | |
443 | foreach my $item (sort { $a->{key} cmp $b->{key}} @$data) { | |
444 | my $k = $item->{key}; | |
445 | next if $k eq 'digest'; | |
446 | my $v = $item->{value}; | |
447 | my $p = $item->{pending}; | |
448 | if ($k eq 'description') { | |
449 | $v = PVE::Tools::encode_text($v) if defined($v); | |
450 | $p = PVE::Tools::encode_text($p) if defined($p); | |
451 | } | |
452 | if (defined($v)) { | |
453 | if ($item->{delete}) { | |
454 | print "del $k: $v\n"; | |
455 | } elsif (defined($p)) { | |
456 | print "cur $k: $v\n"; | |
457 | print "new $k: $p\n"; | |
458 | } else { | |
459 | print "cur $k: $v\n"; | |
460 | } | |
461 | } elsif (defined($p)) { | |
462 | print "new $k: $p\n"; | |
463 | } | |
464 | } | |
465 | }], | |
466 | ||
1e3baf05 DM |
467 | showcmd => [ __PACKAGE__, 'showcmd', ['vmid']], |
468 | ||
469 | status => [ __PACKAGE__, 'status', ['vmid']], | |
470 | ||
7e7d7b61 DM |
471 | snapshot => [ "PVE::API2::Qemu", 'snapshot', ['vmid', 'snapname'], { node => $nodename } , $upid_exit ], |
472 | ||
473 | delsnapshot => [ "PVE::API2::Qemu", 'delsnapshot', ['vmid', 'snapname'], { node => $nodename } , $upid_exit ], | |
474 | ||
475 | rollback => [ "PVE::API2::Qemu", 'rollback', ['vmid', 'snapname'], { node => $nodename } , $upid_exit ], | |
476 | ||
04a69bb4 AD |
477 | template => [ "PVE::API2::Qemu", 'template', ['vmid'], { node => $nodename }], |
478 | ||
2372d114 | 479 | start => [ "PVE::API2::Qemu", 'vm_start', ['vmid'], { node => $nodename } , $upid_exit ], |
5fdbe4f0 | 480 | |
2372d114 | 481 | stop => [ "PVE::API2::Qemu", 'vm_stop', ['vmid'], { node => $nodename }, $upid_exit ], |
5fdbe4f0 | 482 | |
2372d114 | 483 | reset => [ "PVE::API2::Qemu", 'vm_reset', ['vmid'], { node => $nodename }, $upid_exit ], |
5fdbe4f0 | 484 | |
2372d114 | 485 | shutdown => [ "PVE::API2::Qemu", 'vm_shutdown', ['vmid'], { node => $nodename }, $upid_exit ], |
5fdbe4f0 | 486 | |
2372d114 | 487 | suspend => [ "PVE::API2::Qemu", 'vm_suspend', ['vmid'], { node => $nodename }, $upid_exit ], |
5fdbe4f0 | 488 | |
2372d114 | 489 | resume => [ "PVE::API2::Qemu", 'vm_resume', ['vmid'], { node => $nodename }, $upid_exit ], |
5fdbe4f0 DM |
490 | |
491 | sendkey => [ "PVE::API2::Qemu", 'vm_sendkey', ['vmid', 'key'], { node => $nodename } ], | |
492 | ||
1e3baf05 DM |
493 | vncproxy => [ __PACKAGE__, 'vncproxy', ['vmid']], |
494 | ||
495 | wait => [ __PACKAGE__, 'wait', ['vmid']], | |
496 | ||
497 | unlock => [ __PACKAGE__, 'unlock', ['vmid']], | |
498 | ||
c21536ab DM |
499 | rescan => [ __PACKAGE__, 'rescan', []], |
500 | ||
1e3baf05 DM |
501 | monitor => [ __PACKAGE__, 'monitor', ['vmid']], |
502 | ||
1e3baf05 | 503 | mtunnel => [ __PACKAGE__, 'mtunnel', []], |
c243fc8a DM |
504 | |
505 | terminal => [ __PACKAGE__, 'terminal', ['vmid']], | |
1e3baf05 DM |
506 | }; |
507 | ||
1e3baf05 DM |
508 | my $cmd = shift; |
509 | ||
f91b2e45 DM |
510 | # Note: disable '+' prefix for Getopt::Long (for resize command) |
511 | use Getopt::Long qw(:config no_getopt_compat); | |
512 | ||
1e3baf05 DM |
513 | PVE::CLIHandler::handle_cmd($cmddef, "qm", $cmd, \@ARGV, undef, $0); |
514 | ||
515 | exit 0; | |
516 | ||
517 | __END__ | |
518 | ||
519 | =head1 NAME | |
520 | ||
521 | qm - qemu/kvm virtual machine manager | |
522 | ||
523 | =head1 SYNOPSIS | |
524 | ||
525 | =include synopsis | |
526 | ||
527 | =head1 DESCRIPTION | |
528 | ||
529 | qm is a script to manage virtual machines with qemu/kvm. You can | |
530 | create and destroy virtual machines, and control execution | |
531 | (start/stop/suspend/resume). Besides that, you can use qm to set | |
532 | parameters in the associated config file. It is also possible to | |
533 | create and delete virtual disks. | |
534 | ||
f661e766 DM |
535 | =head1 CONFIGURATION |
536 | ||
537 | All configuration files consists of lines in the form | |
538 | ||
539 | PARAMETER: value | |
540 | ||
541 | See L<vm.conf|vm.conf> for a complete list of options. | |
542 | ||
543 | Configuration files are stored inside the Proxmox configuration file system, and can be access at F</etc/pve/qemu-server/C<VMID>.conf>. | |
544 | ||
545 | The default for option 'keyboard' is read from | |
546 | F</etc/pve/datacenter.conf>. | |
547 | ||
548 | =head1 Locks | |
549 | ||
550 | Online migration and backups (vzdump) set a lock to prevent | |
551 | unintentional action on such VMs. Sometimes you need remove such lock | |
552 | manually (power failure). | |
553 | ||
554 | qm unlock <vmid> | |
555 | ||
556 | =head1 EXAMPLES | |
557 | ||
558 | # create a new VM with 4 GB ide disk | |
559 | qm create 300 -ide0 4 -net0 e1000 -cdrom proxmox-mailgateway_2.1.iso | |
560 | ||
561 | # start the new VM | |
562 | qm start 300 | |
563 | ||
564 | # send shutdown, then wait until VM is stopped | |
565 | qm shutdown 300 && qm wait 300 | |
566 | ||
567 | # same as above, but only wait for 40 seconds | |
568 | qm shutdown 300 && qm wait 300 -timeout 40 | |
569 | ||
570 | ||
1e3baf05 | 571 | =include pve_copyright |