This was copied from the 'qm' CLI tool as it uses no functionality
from qemu server itself and will be used in the abstract migrate
class.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+__PACKAGE__->register_method ({
+ name => 'mtunnel',
+ path => 'mtunnel',
+ method => 'POST',
+ description => "Used by VM/CT migration - do not use manually.",
+ parameters => {
+ additionalProperties => 0,
+ properties => {},
+ },
+ returns => { type => 'null'},
+ code => sub {
+ my ($param) = @_;
+
+ if (!PVE::Cluster::check_cfs_quorum(1)) {
+ print "no quorum\n";
+ return undef;
+ }
+
+ print "tunnel online\n";
+ *STDOUT->flush();
+
+ while (my $line = <>) {
+ chomp $line;
+ last if $line =~ m/^quit$/;
+ }
+
+ return undef;
+ }});
+
our $cmddef = {
keygen => [ __PACKAGE__, 'keygen', ['filename']],
our $cmddef = {
keygen => [ __PACKAGE__, 'keygen', ['filename']],
nodes => [ __PACKAGE__, 'nodes' ],
expected => [ __PACKAGE__, 'expected', ['expected']],
updatecerts => [ __PACKAGE__, 'updatecerts', []],
nodes => [ __PACKAGE__, 'nodes' ],
expected => [ __PACKAGE__, 'expected', ['expected']],
updatecerts => [ __PACKAGE__, 'updatecerts', []],
+ mtunnel => [ __PACKAGE__, 'mtunnel', []],