[virt-tools-list] [PATCH virt-manager] create: verify HYPER-V support after customization
Cole Robinson
crobinso at redhat.com
Wed May 20 17:37:11 UTC 2015
On 05/20/2015 12:37 PM, Giuseppe Scrivano wrote:
> commit 938060ae5340f6e28dc9669ba1ab79a1aa3d615e moved default devices
> setup to happen before UEFI is set invalidating what the commit
> 5acfccf6032abb9e8be89130d05b661e8b3f42c7 does.
>
> Add another check to happen before installing the guest to disable
> HYPER-V when not supported.
>
> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1185253
>
> Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
> ---
> virtManager/create.py | 1 +
> virtinst/guest.py | 10 ++++++++++
> 2 files changed, 11 insertions(+)
>
> diff --git a/virtManager/create.py b/virtManager/create.py
> index 2e8b12d..5b38c4f 100644
> --- a/virtManager/create.py
> +++ b/virtManager/create.py
> @@ -1787,6 +1787,7 @@ class vmmCreate(vmmGObjectUI):
> if not self.is_visible():
> return
> logging.debug("User finished customize dialog, starting install")
> + guest.check_defaults()
> self.start_install(guest)
>
> def config_canceled(ignore):
> diff --git a/virtinst/guest.py b/virtinst/guest.py
> index c0e261a..b1eb6bf 100644
> --- a/virtinst/guest.py
> +++ b/virtinst/guest.py
> @@ -814,6 +814,16 @@ class Guest(XMLBuilder):
> return False
> return True
>
> + def check_defaults(self):
> + if not self._hv_supported():
> + self.features.hyperv_relaxed = None
> + self.features.hyperv_vapic = None
> + self.features.hyperv_spinlocks = None
> + self.features.hyperv_spinlocks_retries = None
> + for i in self.clock.timers:
> + if i.name == "hypervclock":
> + self.clock.remove_timer(i)
> +
> def _set_feature_defaults(self):
> if self.os.is_container():
> self.features.acpi = None
>
ACK, but can you add a comment to check_defaults explaining how it's used:
virt-manager only, to reset any defaults that may have changed through manual
intervention via the customize wizard. I know I'll eventually forget...
Thanks,
Cole
More information about the virt-tools-list
mailing list