[pve-devel] [PATCH] vmstatus : use vcpus if defined

Alexandre Derumier aderumier at odiso.com
Sun Mar 8 14:07:41 CET 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 2509a0a..4587906 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2402,6 +2402,7 @@ sub vmstatus {
 
 	$d->{cpus} = ($conf->{sockets} || 1) * ($conf->{cores} || 1);
 	$d->{cpus} = $cpucount if $d->{cpus} > $cpucount;
+	$d->{cpus} = $conf->{vcpus} if $conf->{vcpus};
 
 	$d->{name} = $conf->{name} || "VM $vmid";
 	$d->{maxmem} = $conf->{memory} ? $conf->{memory}*(1024*1024) : 0;
-- 
1.7.10.4




More information about the pve-devel mailing list