my $hwaddress;
sub get_hwaddress {
-
+
return $hwaddress if defined ($hwaddress);
my $fn = '/etc/ssh/ssh_host_rsa_key.pub';
my $entry = {
id => "$data->{type}/$vmid",
- vmid => $vmid + 0,
+ vmid => $vmid + 0,
node => $data->{node},
type => $data->{type},
status => 'unknown',
$entry->{netout} = ($d->[10] || 0) + 0;
$entry->{diskread} = ($d->[11] || 0) + 0;
$entry->{diskwrite} = ($d->[12] || 0) + 0;
-
+
} elsif ($d = $rrd->{"pve2.3-vm/$vmid"}) {
$entry->{uptime} = ($d->[0] || 0) + 0;
my $entry = {
id => "storage/$node/$storeid",
- storage => $storeid,
- node => $node,
- type => 'storage',
+ storage => $storeid,
+ node => $node,
+ type => 'storage',
status => 'unknown',
shared => $scfg->{shared} || 0,
- };
+ };
if (my $d = $rrd->{"pve2-storage/$node/$storeid"}) {
$entry->{maxdisk} = ($d->[1] || 0) + 0;
my $nodename = PVE::INotify::nodename();
my $family = PVE::Tools::get_host_address_family($nodename);
my $port = PVE::Tools::next_spice_port($family);
-
- my ($ticket, undef, $remote_viewer_config) =
+
+ my ($ticket, undef, $remote_viewer_config) =
PVE::AccessControl::remote_viewer_config($authuser, $vmid, $node, $proxy, $title, $port);
- my $timeout = 40;
+ my $timeout = 40;
my $cmd = ['/usr/bin/spiceterm', '--port', $port, '--addr', 'localhost',
- '--timeout', $timeout, '--authpath', $authpath,
+ '--timeout', $timeout, '--authpath', $authpath,
'--permissions', $permissions];
my $dcconf = PVE::Cluster::cfs_read_file('datacenter.cfg');