mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
Disabled memory/cpu hotplug for active HVM guests (bz 214432)
This commit is contained in:
parent
64cc1fdee6
commit
f64479ac10
@ -83,14 +83,24 @@ class vmmDomain(gobject.GObject):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def is_vcpu_hotplug_capable(self):
|
def is_vcpu_hotplug_capable(self):
|
||||||
|
# Read only connections aren't allowed to change it
|
||||||
if self.connection.is_read_only():
|
if self.connection.is_read_only():
|
||||||
return False
|
return False
|
||||||
return True
|
# Running paravirt guests can change it, or any inactive guest
|
||||||
|
if self.vm.OSType() == "linux" or self.get_id() < 0:
|
||||||
|
return True
|
||||||
|
# Everyone else is out of luck
|
||||||
|
return False
|
||||||
|
|
||||||
def is_memory_hotplug_capable(self):
|
def is_memory_hotplug_capable(self):
|
||||||
|
# Read only connections aren't allowed to change it
|
||||||
if self.connection.is_read_only():
|
if self.connection.is_read_only():
|
||||||
return False
|
return False
|
||||||
return True
|
# Running paravirt guests can change it, or any inactive guest
|
||||||
|
if self.vm.OSType() == "linux" or self.get_id() < 0:
|
||||||
|
return True
|
||||||
|
# Everyone else is out of luck
|
||||||
|
return False
|
||||||
|
|
||||||
def _normalize_status(self, status):
|
def _normalize_status(self, status):
|
||||||
if status == libvirt.VIR_DOMAIN_NOSTATE:
|
if status == libvirt.VIR_DOMAIN_NOSTATE:
|
||||||
|
Loading…
Reference in New Issue
Block a user