mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
guest: Remove disable_default_memballoon
The Guest code isn't triggerable because of the way the cli code was invoking it, as a <memballoon> device would always be added. Because libvirt accepts model=none, and that's what '--memballoon none' will translate to anyways, we don't need any special handling here Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
fd71d7fea5
commit
860dba6923
@ -3778,12 +3778,6 @@ class ParserMemballoon(VirtCLIParser):
|
||||
cls.add_arg("autodeflate", "autodeflate", is_onoff=True)
|
||||
cls.add_arg("stats.period", "stats_period")
|
||||
|
||||
def _parse(self, inst):
|
||||
if self.optstr == "none":
|
||||
self.guest.disable_default_memballoon = True
|
||||
|
||||
return super()._parse(inst)
|
||||
|
||||
|
||||
###################
|
||||
# --panic parsing #
|
||||
|
@ -227,7 +227,6 @@ class Guest(XMLBuilder):
|
||||
self.skip_default_usbredir = False
|
||||
self.skip_default_graphics = False
|
||||
self.skip_default_rng = False
|
||||
self.disable_default_memballoon = False
|
||||
self.x86_cpu_default = self.cpu.SPECIAL_MODE_APP_DEFAULT
|
||||
|
||||
self.skip_default_osinfo = False
|
||||
@ -964,16 +963,6 @@ class Guest(XMLBuilder):
|
||||
if not self.conn.is_qemu():
|
||||
return
|
||||
|
||||
# For most QEMU guests, libvirt will automatically add a memballoon
|
||||
# device, which means that if the user has explicitly asked for it
|
||||
# *not* to be present then we still need to create the device and
|
||||
# set the model to "none" to let libvirt know
|
||||
if self.disable_default_memballoon:
|
||||
dev = DeviceMemballoon(self.conn)
|
||||
dev.model = "none"
|
||||
self.add_device(dev)
|
||||
return
|
||||
|
||||
# We know for certain that a memballoon is good to have with these
|
||||
# machine types; for other machine types, we leave the decision up
|
||||
# to libvirt
|
||||
|
Loading…
Reference in New Issue
Block a user