details: Apply default VCPU pinning changes to running VM

This commit is contained in:
Cole Robinson 2011-01-13 14:23:34 -05:00
parent 0143378d5b
commit 6b95452212
2 changed files with 16 additions and 3 deletions

View File

@ -1591,8 +1591,9 @@ class vmmDetails(vmmGObjectUI):
(sockets, cores, threads)]
ret = self._change_config_helper(define_funcs, define_args,
self.vm.hotplug_vcpus,
(vcpus,))
[self.vm.hotplug_vcpus,
self.config_vcpu_pin_cpuset],
[(vcpus,), (cpuset,)])
if ret:
self._cpu_copy_host = False
@ -1619,6 +1620,18 @@ class vmmDetails(vmmGObjectUI):
self._refresh_runtime_pinning()
def config_vcpu_pin_cpuset(self, cpuset):
conn = self.vm.get_connection()
vcpu_list = self.window.get_widget("config-vcpu-list")
vcpu_model = vcpu_list.get_model()
if self.vm.vcpu_pinning() == cpuset:
return
pinlist = virtinst.Guest.cpuset_str_to_tuple(conn.vmm, cpuset)
for row in vcpu_model:
vcpu_num = row[0]
self.vm.pin_vcpu(int(vcpu_num), pinlist)
# Memory
def config_memory_apply(self):

View File

@ -2394,7 +2394,7 @@ I/O:</property>
<widget class="GtkLabel" id="label336">
<property name="visible">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Initial _pinning:</property>
<property name="label" translatable="yes">Default _pinning:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">config-vcpupin</property>
</widget>