mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
cli: Add special treatment for --memballoon none
We want to start adding a memory balloon automatically to guests, but we also need to make sure that it can be explicitly disabled at the user's request. Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
72fc6781c8
commit
fb81adea7e
@ -3576,6 +3576,12 @@ 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,6 +227,7 @@ 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
|
||||
|
Loading…
Reference in New Issue
Block a user