X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PVE%2FAPI2%2FQemu.pm;h=ad8713fee3ab86a0c3857912f44d3f760299ffcf;hb=8610701ae6eae4b586b3cd80153dcd27ad2cc93d;hp=15c4ea3a3f3fbef6dd4d6384406eb398d8fac637;hpb=31a9616c0b9ca3be502ad2385225e587fe00dc10;p=qemu-server.git diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 15c4ea3a..ad8713fe 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -812,8 +812,16 @@ __PACKAGE__->register_method({ my $conf = PVE::QemuServer::load_config($param->{vmid}); my $vmstatus = PVE::QemuServer::vmstatus($param->{vmid}); + my $status = $vmstatus->{$param->{vmid}}; - return $vmstatus->{$param->{vmid}}; + my $cc = PVE::Cluster::cfs_read_file('cluster.conf'); + if (PVE::Cluster::cluster_conf_lookup_pvevm($cc, 0, $param->{vmid}, 1)) { + $status->{ha} = 1; + } else { + $status->{ha} = 0; + } + + return $status; }}); __PACKAGE__->register_method({