virt-manager/virtman-init-vm-processor-topology.patch

34 lines
1.3 KiB
Diff
Raw Normal View History

Index: virt-manager-1.0.1/virtManager/details.py
===================================================================
--- virt-manager-1.0.1.orig/virtManager/details.py
+++ virt-manager-1.0.1/virtManager/details.py
@@ -2564,13 +2564,6 @@ class vmmDetails(vmmGObjectUI):
def refresh_config_cpu(self):
conn = self.vm.conn
host_active_count = conn.host_active_processor_count()
- maxvcpus = self.vm.vcpu_max_count()
- curvcpus = self.vm.vcpu_count()
-
- curadj = self.widget("config-vcpus")
- maxadj = self.widget("config-maxvcpus")
- curadj.set_value(int(curvcpus))
- maxadj.set_value(int(maxvcpus))
self.widget("state-host-cpus").set_text(str(host_active_count))
@@ -2592,6 +2585,14 @@ class vmmDetails(vmmGObjectUI):
if show_top:
self.widget("cpu-topology-expander").set_expanded(True)
+ maxvcpus = self.vm.vcpu_max_count()
+ curvcpus = self.vm.vcpu_count()
+
+ curadj = self.widget("config-vcpus")
+ maxadj = self.widget("config-maxvcpus")
+ curadj.set_value(int(curvcpus))
+ maxadj.set_value(int(maxvcpus))
+
model = cpu.model or None
if not model:
if cpu.mode == "host-model" or cpu.mode == "host-passthrough":