[virt-tools-list] [PATCH] virt-manager: disable HYPER-V on Windows 2008 R2 and Win7 SP1 with UEFI

Laszlo Ersek lersek at redhat.com
Mon Jan 26 16:11:45 UTC 2015


On 01/26/15 17:01, Giuseppe Scrivano wrote:
> Windows 2008 R2 or Win7 SP1 guests do not work when UEFI and HYPER-V,
> so just disable HYPER-V.
> 
> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1185253
> 
> Signed-off-by: Giuseppe Scrivano <gscrivan at redhat.com>
> ---
>  virtinst/guest.py | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/virtinst/guest.py b/virtinst/guest.py
> index 9015cb1..7e2438e 100644
> --- a/virtinst/guest.py
> +++ b/virtinst/guest.py
> @@ -728,7 +728,8 @@ class Guest(XMLBuilder):
>          hpet.present = False
>  
>          if (self._lookup_osdict_key("hyperv_features", False) and
> -            self.conn.check_support(self.conn.SUPPORT_CONN_HYPERV_CLOCK)):
> +            self.conn.check_support(self.conn.SUPPORT_CONN_HYPERV_CLOCK) and
> +            self._hv_supported()):
>              hyperv = self.clock.add_timer()
>              hyperv.name = "hypervclock"
>              hyperv.present = True
> @@ -775,6 +776,12 @@ class Guest(XMLBuilder):
>                  return
>              self.cpu.set_special_mode(self.x86_cpu_default)
>  
> +    def _hv_supported(self):
> +        if (self.os.loader_type == "pflash" and
> +            self.os_variant in ("win2k8r2", "win7")):
> +            return False
> +        return True
> +
>      def _set_feature_defaults(self):
>          if self.os.is_container():
>              self.features.acpi = None
> @@ -800,6 +807,7 @@ class Guest(XMLBuilder):
>              self.features.pae = self.conn.caps.support_pae()
>  
>          if (self._lookup_osdict_key("hyperv_features", False) and
> +            self._hv_supported() and
>              self.conn.check_support(self.conn.SUPPORT_CONN_HYPERV_VAPIC)):
>              if self.features.hyperv_relaxed is None:
>                  self.features.hyperv_relaxed = True
> 

The point is that such guests are not supported on hyper-v hosts at all,
so we shouldn't expose them to an hyper-v-like environment.

ACK

Laszlo




More information about the virt-tools-list mailing list