This allows load_config to load also configs from LXC container
which arent't located on the same node.
This is needed to fix the bug that doesn't let view the noVNC
console from an CT located on another node, whereas viewing it on
the same node as the container is located works fine.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
my $remcmd = $remip ?
['/usr/bin/ssh', '-t', $remip] : [];
- my $conf = PVE::LXC::load_config($vmid);
+ my $conf = PVE::LXC::load_config($vmid, $node);
my $concmd = PVE::LXC::get_console_command($vmid, $conf);
my $shcmd = [ '/usr/bin/dtach', '-A',
}
sub load_config {
- my ($vmid) = @_;
+ my ($vmid, $node) = @_;
- my $cfspath = cfs_config_path($vmid);
+ $node = $nodename if !$node;
+ my $cfspath = cfs_config_path($vmid, $node);
my $conf = PVE::Cluster::cfs_read_file($cfspath);
die "container $vmid does not exists\n" if !defined($conf);