]>
git.proxmox.com Git - qemu-server.git/blob - PVE/CLI/qm.pm
6 # Note: disable '+' prefix for Getopt::Long (for resize command)
7 use Getopt
::Long
qw(:config no_getopt_compat);
15 use PVE
::Tools
qw(extract_param);
19 use PVE
::RPCEnvironment
;
20 use PVE
::Exception
qw(raise_param_exc);
22 use PVE
::QemuServer
::ImportDisk
;
23 use PVE
::QemuServer
::OVF
;
24 use PVE
::QemuServer
::Agent
qw(agent_available);
26 use PVE
::API2
::Qemu
::Agent
;
28 use PVE
::JSONSchema
qw(get_standard_option);
33 use base
qw(PVE::CLIHandler);
37 my $status = PVE
::Tools
::upid_read_status
($upid);
38 exit($status eq 'OK' ?
0 : -1);
41 my $nodename = PVE
::INotify
::nodename
();
43 sub setup_environment
{
44 PVE
::RPCEnvironment-
>setup_default_cli_env();
51 while ( ++$c < 10 && !-e
$path ) { sleep(1); }
53 my $s = IO
::Socket
::UNIX-
>new(Peer
=> $path, Timeout
=> 120);
55 die "unable to connect to socket '$path' - $!" if !$s;
57 my $select = new IO
::Select
;
59 $select->add(\
*STDIN
);
62 my $timeout = 60*15; # 15 minutes
65 while ($select->count &&
66 scalar(@handles = $select->can_read ($timeout))) {
67 foreach my $h (@handles) {
69 my $n = $h->sysread($buf, 4096);
79 syswrite(\
*STDOUT
, $buf);
89 sub print_recursive_hash
{
90 my ($prefix, $hash, $key) = @_;
92 if (ref($hash) eq 'HASH') {
94 print "$prefix$key:\n";
96 foreach my $itemkey (keys %$hash) {
97 print_recursive_hash
("\t$prefix", $hash->{$itemkey}, $itemkey);
99 } elsif (ref($hash) eq 'ARRAY') {
101 print "$prefix$key:\n";
103 foreach my $item (@$hash) {
104 print_recursive_hash
("\t$prefix", $item);
106 } elsif (!ref($hash) && defined($hash)) {
108 print "$prefix$key: $hash\n";
110 print "$prefix$hash\n";
115 __PACKAGE__-
>register_method ({
119 description
=> "Show command line which is used to start the VM (debug info).",
121 additionalProperties
=> 0,
123 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid
}),
125 description
=> "Puts each option on a new line to enhance human readability",
132 returns
=> { type
=> 'null'},
136 my $storecfg = PVE
::Storage
::config
();
137 my $cmdline = PVE
::QemuServer
::vm_commandline
($storecfg, $param->{vmid
});
139 $cmdline =~ s/ -/ \\\n -/g if $param->{pretty
};
146 __PACKAGE__-
>register_method ({
150 description
=> "Show VM status.",
152 additionalProperties
=> 0,
154 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid
}),
156 description
=> "Verbose output format",
162 returns
=> { type
=> 'null'},
167 my $conf = PVE
::QemuConfig-
>load_config ($param->{vmid
});
169 my $vmstatus = PVE
::QemuServer
::vmstatus
($param->{vmid
}, 1);
170 my $stat = $vmstatus->{$param->{vmid
}};
171 if ($param->{verbose
}) {
172 foreach my $k (sort (keys %$stat)) {
173 next if $k eq 'cpu' || $k eq 'relcpu'; # always 0
175 print_recursive_hash
("", $v, $k);
178 my $status = $stat->{qmpstatus
} || 'unknown';
179 print "status: $status\n";
185 __PACKAGE__-
>register_method ({
189 description
=> "Proxy VM VNC traffic to stdin/stdout",
191 additionalProperties
=> 0,
193 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid_running
}),
196 returns
=> { type
=> 'null'},
200 my $vmid = $param->{vmid
};
201 my $vnc_socket = PVE
::QemuServer
::vnc_socket
($vmid);
203 if (my $ticket = $ENV{LC_PVE_TICKET
}) { # NOTE: ssh on debian only pass LC_* variables
204 PVE
::QemuServer
::vm_mon_cmd
($vmid, "change", device
=> 'vnc', target
=> "unix:$vnc_socket,password");
205 PVE
::QemuServer
::vm_mon_cmd
($vmid, "set_password", protocol
=> 'vnc', password
=> $ticket);
206 PVE
::QemuServer
::vm_mon_cmd
($vmid, "expire_password", protocol
=> 'vnc', time => "+30");
208 PVE
::QemuServer
::vm_mon_cmd
($vmid, "change", device
=> 'vnc', target
=> "unix:$vnc_socket,x509,password");
211 run_vnc_proxy
($vnc_socket);
216 __PACKAGE__-
>register_method ({
220 description
=> "Unlock the VM.",
222 additionalProperties
=> 0,
224 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid
}),
227 returns
=> { type
=> 'null'},
231 my $vmid = $param->{vmid
};
233 PVE
::QemuConfig-
>lock_config ($vmid, sub {
234 my $conf = PVE
::QemuConfig-
>load_config($vmid);
235 delete $conf->{lock};
236 delete $conf->{pending
}->{lock} if $conf->{pending
}; # just to be sure
237 PVE
::QemuConfig-
>write_config($vmid, $conf);
243 __PACKAGE__-
>register_method ({
247 description
=> "Stop embedded nbd server.",
249 additionalProperties
=> 0,
251 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid
}),
254 returns
=> { type
=> 'null'},
258 my $vmid = $param->{vmid
};
260 PVE
::QemuServer
::nbd_stop
($vmid);
265 __PACKAGE__-
>register_method ({
269 description
=> "Used by qmigrate - do not use manually.",
271 additionalProperties
=> 0,
274 returns
=> { type
=> 'null'},
278 if (!PVE
::Cluster
::check_cfs_quorum
(1)) {
283 my $tunnel_write = sub {
290 $tunnel_write->("tunnel online");
291 $tunnel_write->("ver 1");
293 while (my $line = <STDIN
>) {
295 if ($line =~ /^quit$/) {
296 $tunnel_write->("OK");
298 } elsif ($line =~ /^resume (\d+)$/) {
300 if (PVE
::QemuServer
::check_running
($vmid, 1)) {
301 eval { PVE
::QemuServer
::vm_resume
($vmid, 1, 1); };
303 $tunnel_write->("ERR: resume failed - $@");
305 $tunnel_write->("OK");
308 $tunnel_write->("ERR: resume failed - VM $vmid not running");
316 __PACKAGE__-
>register_method ({
320 description
=> "Wait until the VM is stopped.",
322 additionalProperties
=> 0,
324 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid_running
}),
326 description
=> "Timeout in seconds. Default is to wait forever.",
333 returns
=> { type
=> 'null'},
337 my $vmid = $param->{vmid
};
338 my $timeout = $param->{timeout
};
340 my $pid = PVE
::QemuServer
::check_running
($vmid);
343 print "waiting until VM $vmid stopps (PID $pid)\n";
346 while ((!$timeout || ($count < $timeout)) && PVE
::QemuServer
::check_running
($vmid)) {
351 die "wait failed - got timeout\n" if PVE
::QemuServer
::check_running
($vmid);
356 __PACKAGE__-
>register_method ({
360 description
=> "Enter Qemu Monitor interface.",
362 additionalProperties
=> 0,
364 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid_running
}),
367 returns
=> { type
=> 'null'},
371 my $vmid = $param->{vmid
};
373 my $conf = PVE
::QemuConfig-
>load_config ($vmid); # check if VM exists
375 print "Entering Qemu Monitor for VM $vmid - type 'help' for help\n";
377 my $term = new Term
::ReadLine
('qm');
380 while (defined ($input = $term->readline('qm> '))) {
383 next if $input =~ m/^\s*$/;
385 last if $input =~ m/^\s*q(uit)?\s*$/;
388 print PVE
::QemuServer
::vm_human_monitor_command
($vmid, $input);
390 print "ERROR: $@" if $@;
397 __PACKAGE__-
>register_method ({
401 description
=> "Rescan all storages and update disk sizes and unused disk images.",
403 additionalProperties
=> 0,
405 vmid
=> get_standard_option
('pve-vmid', {
407 completion
=> \
&PVE
::QemuServer
::complete_vmid
,
413 description
=> 'Do not actually write changes out to conifg.',
417 returns
=> { type
=> 'null'},
421 my $dryrun = $param->{dryrun
};
423 print "NOTE: running in dry-run mode, won't write changes out!\n" if $dryrun;
425 PVE
::QemuServer
::rescan
($param->{vmid
}, 0, $dryrun);
430 __PACKAGE__-
>register_method ({
431 name
=> 'importdisk',
432 path
=> 'importdisk',
434 description
=> "Import an external disk image as an unused disk in a VM. The
435 image format has to be supported by qemu-img(1).",
437 additionalProperties
=> 0,
439 vmid
=> get_standard_option
('pve-vmid', {completion
=> \
&PVE
::QemuServer
::complete_vmid
}),
441 description
=> 'Path to the disk image to import',
445 storage
=> get_standard_option
('pve-storage-id', {
446 description
=> 'Target storage ID',
447 completion
=> \
&PVE
::QemuServer
::complete_storage
,
452 description
=> 'Target format',
453 enum
=> [ 'raw', 'qcow2', 'vmdk' ],
458 returns
=> { type
=> 'null'},
462 my $vmid = extract_param
($param, 'vmid');
463 my $source = extract_param
($param, 'source');
464 my $storeid = extract_param
($param, 'storage');
465 my $format = extract_param
($param, 'format');
467 my $vm_conf = PVE
::QemuConfig-
>load_config($vmid);
468 PVE
::QemuConfig-
>check_lock($vm_conf);
469 die "$source: non-existent or non-regular file\n" if (! -f
$source);
471 my $storecfg = PVE
::Storage
::config
();
472 PVE
::Storage
::storage_check_enabled
($storecfg, $storeid);
474 my $target_storage_config =
475 PVE
::Storage
::storage_config
($storecfg, $storeid);
476 die "storage $storeid does not support vm images\n"
477 if !$target_storage_config->{content
}->{images
};
479 PVE
::QemuServer
::ImportDisk
::do_import
($source, $vmid, $storeid, { format
=> $format });
484 __PACKAGE__-
>register_method ({
488 description
=> "Open a terminal using a serial device (The VM need to have a serial device configured, for example 'serial0: socket')",
490 additionalProperties
=> 0,
492 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::QemuServer
::complete_vmid_running
}),
494 description
=> "Select the serial device. By default we simply use the first suitable device.",
497 enum
=> [qw(serial0 serial1 serial2 serial3)],
500 description
=> "Escape character.",
507 returns
=> { type
=> 'null'},
511 my $vmid = $param->{vmid
};
513 my $escape = $param->{escape
} // '^O';
514 if ($escape =~ /^\^([\x40-\x7a])$/) {
515 $escape = ord($1) & 0x1F;
516 } elsif ($escape =~ /^0x[0-9a-f]+$/i) {
517 $escape = hex($escape);
518 } elsif ($escape =~ /^[0-9]+$/) {
519 $escape = int($escape);
521 die "invalid escape character definition: $escape\n";
525 $escapemsg = sprintf(' (press Ctrl+%c to exit)', $escape+0x40);
526 $escape = sprintf(',escape=0x%x', $escape);
531 my $conf = PVE
::QemuConfig-
>load_config ($vmid); # check if VM exists
533 my $iface = $param->{iface
};
536 die "serial interface '$iface' is not configured\n" if !$conf->{$iface};
537 die "wrong serial type on interface '$iface'\n" if $conf->{$iface} ne 'socket';
539 foreach my $opt (qw(serial0 serial1 serial2 serial3)) {
540 if ($conf->{$opt} && ($conf->{$opt} eq 'socket')) {
545 die "unable to find a serial interface\n" if !$iface;
548 die "VM $vmid not running\n" if !PVE
::QemuServer
::check_running
($vmid);
550 my $socket = "/var/run/qemu-server/${vmid}.$iface";
552 my $cmd = "socat UNIX-CONNECT:$socket STDIO,raw,echo=0$escape";
554 print "starting serial terminal on interface ${iface}${escapemsg}\n";
561 __PACKAGE__-
>register_method ({
564 description
=> "Create a new VM using parameters read from an OVF manifest",
566 additionalProperties
=> 0,
568 vmid
=> get_standard_option
('pve-vmid', { completion
=> \
&PVE
::Cluster
::complete_next_vmid
}),
571 description
=> 'path to the ovf file',
573 storage
=> get_standard_option
('pve-storage-id', {
574 description
=> 'Target storage ID',
575 completion
=> \
&PVE
::QemuServer
::complete_storage
,
580 description
=> 'Target format',
581 enum
=> [ 'raw', 'qcow2', 'vmdk' ],
586 description
=> 'Print a parsed representation of the extracted OVF parameters, but do not create a VM',
591 returns
=> { type
=> 'null' },
595 my $vmid = PVE
::Tools
::extract_param
($param, 'vmid');
596 my $ovf_file = PVE
::Tools
::extract_param
($param, 'manifest');
597 my $storeid = PVE
::Tools
::extract_param
($param, 'storage');
598 my $format = PVE
::Tools
::extract_param
($param, 'format');
599 my $dryrun = PVE
::Tools
::extract_param
($param, 'dryrun');
601 die "$ovf_file: non-existent or non-regular file\n" if (! -f
$ovf_file);
602 my $storecfg = PVE
::Storage
::config
();
603 PVE
::Storage
::storage_check_enabled
($storecfg, $storeid);
605 my $parsed = PVE
::QemuServer
::OVF
::parse_ovf
($ovf_file);
608 print to_json
($parsed, { pretty
=> 1, canonical
=> 1});
612 $param->{name
} = $parsed->{qm
}->{name
} if defined($parsed->{qm
}->{name
});
613 $param->{memory
} = $parsed->{qm
}->{memory
} if defined($parsed->{qm
}->{memory
});
614 $param->{cores
} = $parsed->{qm
}->{cores
} if defined($parsed->{qm
}->{cores
});
618 PVE
::Cluster
::check_vmid_unused
($vmid);
623 # order matters, as do_import() will load_config() internally
624 $conf->{smbios1
} = PVE
::QemuServer
::generate_smbios1_uuid
();
625 PVE
::QemuConfig-
>write_config($vmid, $conf);
627 foreach my $disk (@{ $parsed->{disks
} }) {
628 my ($file, $drive) = ($disk->{backing_file
}, $disk->{disk_address
});
629 PVE
::QemuServer
::ImportDisk
::do_import
($file, $vmid, $storeid,
630 { drive_name
=> $drive, format
=> $format });
633 # reload after disks entries have been created
634 $conf = PVE
::QemuConfig-
>load_config($vmid);
635 PVE
::QemuConfig-
>check_lock($conf);
636 my $firstdisk = PVE
::QemuServer
::resolve_first_disk
($conf);
637 $conf->{bootdisk
} = $firstdisk if $firstdisk;
638 PVE
::QemuConfig-
>write_config($vmid, $conf);
644 eval { PVE
::QemuServer
::vm_destroy
($storecfg, $vmid, $skiplock); };
645 die "import failed - $err";
649 my $wait_for_lock = 1;
650 PVE
::QemuConfig-
>lock_config_full($vmid, $wait_for_lock, $importfn);
657 __PACKAGE__-
>register_method({
662 description
=> "Executes the given command via the guest agent",
664 additionalProperties
=> 0,
666 node
=> get_standard_option
('pve-node'),
667 vmid
=> get_standard_option
('pve-vmid', {
668 completion
=> \
&PVE
::QemuServer
::complete_vmid_running
}),
673 description
=> "If set to off, returns the pid immediately instead of waiting for the commmand to finish or the timeout.",
677 description
=> "The maximum time to wait synchronously for the command to finish. If reached, the pid gets returned. Set to 0 to deactivate",
682 'extra-args' => get_standard_option
('extra-args'),
691 my $vmid = $param->{vmid
};
692 my $sync = $param->{synchronous
} // 1;
693 if (!$param->{'extra-args'} || !@{$param->{'extra-args'}}) {
694 raise_param_exc
( { 'extra-args' => "No command given" });
696 if (defined($param->{timeout
}) && !$sync) {
697 raise_param_exc
({ synchronous
=> "needs to be set for 'timeout'"});
700 my $res = PVE
::QemuServer
::Agent
::qemu_exec
($vmid, $param->{'extra-args'});
703 my $pid = $res->{pid
};
704 my $timeout = $param->{timeout
} // 30;
705 my $starttime = time();
707 while ($timeout == 0 || (time() - $starttime) < $timeout) {
708 my $out = PVE
::QemuServer
::Agent
::qemu_exec_status
($vmid, $pid);
709 if ($out->{exited
}) {
716 if (!$res->{exited
}) {
717 warn "timeout reached, returning pid\n";
721 return { result
=> $res };
724 my $print_agent_result = sub {
727 my $result = $data->{result
} // $data;
728 return if !defined($result);
730 my $class = ref($result);
734 return if $result =~ m/^\s*$/;
739 if (($class eq 'HASH') && !scalar(keys %$result)) { # empty hash
743 print to_json
($result, { pretty
=> 1, canonical
=> 1});
749 my $ssh_key_map = ['sshkeys', sub {
750 return URI
::Escape
::uri_escape
(PVE
::Tools
::file_get_contents
($_[0]));
752 my $cipassword_map = PVE
::CLIHandler
::get_standard_mapping
('pve-password', { name
=> 'cipassword' });
753 my $password_map = PVE
::CLIHandler
::get_standard_mapping
('pve-password');
755 'update_vm' => [$ssh_key_map, $cipassword_map],
756 'create_vm' => [$ssh_key_map, $cipassword_map],
757 'set-user-password' => [$password_map],
760 return $mapping->{$name};
764 list
=> [ "PVE::API2::Qemu", 'vmlist', [],
765 { node
=> $nodename }, sub {
768 exit 0 if (!scalar(@$vmlist));
770 printf "%10s %-20s %-10s %-10s %12s %-10s\n",
771 qw(VMID NAME STATUS MEM(MB) BOOTDISK
(GB
) PID
);
773 foreach my $rec (sort { $a->{vmid
} <=> $b->{vmid
} } @$vmlist) {
774 printf "%10s %-20s %-10s %-10s %12.2f %-10s\n", $rec->{vmid
}, $rec->{name
},
775 $rec->{qmpstatus
} || $rec->{status
},
776 ($rec->{maxmem
} || 0)/(1024*1024),
777 ($rec->{maxdisk
} || 0)/(1024*1024*1024),
784 create
=> [ "PVE::API2::Qemu", 'create_vm', ['vmid'], { node
=> $nodename }, $upid_exit ],
786 destroy
=> [ "PVE::API2::Qemu", 'destroy_vm', ['vmid'], { node
=> $nodename }, $upid_exit ],
788 clone
=> [ "PVE::API2::Qemu", 'clone_vm', ['vmid', 'newid'], { node
=> $nodename }, $upid_exit ],
790 migrate
=> [ "PVE::API2::Qemu", 'migrate_vm', ['vmid', 'target'], { node
=> $nodename }, $upid_exit ],
792 set
=> [ "PVE::API2::Qemu", 'update_vm', ['vmid'], { node
=> $nodename } ],
794 resize
=> [ "PVE::API2::Qemu", 'resize_vm', ['vmid', 'disk', 'size'], { node
=> $nodename } ],
796 move_disk
=> [ "PVE::API2::Qemu", 'move_vm_disk', ['vmid', 'disk', 'storage'], { node
=> $nodename }, $upid_exit ],
798 unlink => [ "PVE::API2::Qemu", 'unlink', ['vmid'], { node
=> $nodename } ],
800 config
=> [ "PVE::API2::Qemu", 'vm_config', ['vmid'],
801 { node
=> $nodename }, sub {
803 foreach my $k (sort (keys %$config)) {
804 next if $k eq 'digest';
805 my $v = $config->{$k};
806 if ($k eq 'description') {
807 $v = PVE
::Tools
::encode_text
($v);
813 pending
=> [ "PVE::API2::Qemu", 'vm_pending', ['vmid'],
814 { node
=> $nodename }, sub {
816 foreach my $item (sort { $a->{key
} cmp $b->{key
}} @$data) {
817 my $k = $item->{key
};
818 next if $k eq 'digest';
819 my $v = $item->{value
};
820 my $p = $item->{pending
};
821 if ($k eq 'description') {
822 $v = PVE
::Tools
::encode_text
($v) if defined($v);
823 $p = PVE
::Tools
::encode_text
($p) if defined($p);
826 if ($item->{delete}) {
827 print "del $k: $v\n";
828 } elsif (defined($p)) {
829 print "cur $k: $v\n";
830 print "new $k: $p\n";
832 print "cur $k: $v\n";
834 } elsif (defined($p)) {
835 print "new $k: $p\n";
840 showcmd
=> [ __PACKAGE__
, 'showcmd', ['vmid']],
842 status
=> [ __PACKAGE__
, 'status', ['vmid']],
844 snapshot
=> [ "PVE::API2::Qemu", 'snapshot', ['vmid', 'snapname'], { node
=> $nodename } , $upid_exit ],
846 delsnapshot
=> [ "PVE::API2::Qemu", 'delsnapshot', ['vmid', 'snapname'], { node
=> $nodename } , $upid_exit ],
848 listsnapshot
=> [ "PVE::API2::Qemu", 'snapshot_list', ['vmid'], { node
=> $nodename },
851 foreach my $e (@$res) {
852 my $headline = $e->{description
} || 'no-description';
853 $headline =~ s/\n.*//sg;
854 my $parent = $e->{parent
} // 'no-parent';
855 printf("%-20s %-20s %s\n", $e->{name
}, $parent, $headline);
859 rollback
=> [ "PVE::API2::Qemu", 'rollback', ['vmid', 'snapname'], { node
=> $nodename } , $upid_exit ],
861 template
=> [ "PVE::API2::Qemu", 'template', ['vmid'], { node
=> $nodename }],
863 start
=> [ "PVE::API2::Qemu", 'vm_start', ['vmid'], { node
=> $nodename } , $upid_exit ],
865 stop
=> [ "PVE::API2::Qemu", 'vm_stop', ['vmid'], { node
=> $nodename }, $upid_exit ],
867 reset => [ "PVE::API2::Qemu", 'vm_reset', ['vmid'], { node
=> $nodename }, $upid_exit ],
869 shutdown => [ "PVE::API2::Qemu", 'vm_shutdown', ['vmid'], { node
=> $nodename }, $upid_exit ],
871 suspend
=> [ "PVE::API2::Qemu", 'vm_suspend', ['vmid'], { node
=> $nodename }, $upid_exit ],
873 resume
=> [ "PVE::API2::Qemu", 'vm_resume', ['vmid'], { node
=> $nodename }, $upid_exit ],
875 sendkey
=> [ "PVE::API2::Qemu", 'vm_sendkey', ['vmid', 'key'], { node
=> $nodename } ],
877 vncproxy
=> [ __PACKAGE__
, 'vncproxy', ['vmid']],
879 wait => [ __PACKAGE__
, 'wait', ['vmid']],
881 unlock
=> [ __PACKAGE__
, 'unlock', ['vmid']],
883 rescan
=> [ __PACKAGE__
, 'rescan', []],
885 monitor
=> [ __PACKAGE__
, 'monitor', ['vmid']],
887 agent
=> [ "PVE::API2::Qemu::Agent", 'agent', ['vmid', 'command'],
888 { node
=> $nodename }, $print_agent_result ],
891 passwd
=> [ "PVE::API2::Qemu::Agent", 'set-user-password', [ 'vmid', 'username' ], { node
=> $nodename }],
892 exec => [ __PACKAGE__
, 'exec', [ 'vmid', 'extra-args' ], { node
=> $nodename }, $print_agent_result],
893 'exec-status' => [ "PVE::API2::Qemu::Agent", 'exec-status', [ 'vmid', 'pid' ], { node
=> $nodename }, $print_agent_result],
896 mtunnel
=> [ __PACKAGE__
, 'mtunnel', []],
898 nbdstop
=> [ __PACKAGE__
, 'nbdstop', ['vmid']],
900 terminal
=> [ __PACKAGE__
, 'terminal', ['vmid']],
902 importdisk
=> [ __PACKAGE__
, 'importdisk', ['vmid', 'source', 'storage']],
904 importovf
=> [ __PACKAGE__
, 'importovf', ['vmid', 'manifest', 'storage']],