[virt-tools-list] [virt-manager PATCH] Don't use ram parameter for any other graphics than qxl

Cole Robinson crobinso at redhat.com
Tue Jun 4 16:36:24 UTC 2013


On 06/01/2013 03:50 AM, Martin Kletzander wrote:
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=920549
> ---
>  virtinst/VirtualVideoDevice.py | 15 ++++++++++++++-
>  1 file changed, 14 insertions(+), 1 deletion(-)
> 

Actually upstream should has this fixed already, see
14578fc2c30b4e694db66443e0dca22ba9727c84

- Cole

> diff --git a/virtinst/VirtualVideoDevice.py b/virtinst/VirtualVideoDevice.py
> index e92ca31..3463337 100644
> --- a/virtinst/VirtualVideoDevice.py
> +++ b/virtinst/VirtualVideoDevice.py
> @@ -1,5 +1,5 @@
>  #
> -# Copyright 2009  Red Hat, Inc.
> +# Copyright 2009, 2013  Red Hat, Inc.
>  # Cole Robinson <crobinso at redhat.com>
>  #
>  # This program is free software; you can redistribute it and/or modify
> @@ -41,6 +41,7 @@ class VirtualVideoDevice(VirtualDevice):
> 
>          self._model_type    = None
>          self._vram          = None
> +        self._ram           = None
>          self._heads         = None
> 
>          if self._is_parse():
> @@ -56,6 +57,11 @@ class VirtualVideoDevice(VirtualDevice):
>          return self._model_type
>      def set_model_type(self, val):
>          self._model_type = val
> +        # 'ram' attribute is only supported for qxl devices and
> +        # libvirt reports error when the attribute appears in the xml
> +        # for some other model
> +        if val != "qxl":
> +            self.ram = None
>      model_type = _xml_property(get_model_type, set_model_type,
>                                 xpath="./model/@type")
> 
> @@ -69,6 +75,13 @@ class VirtualVideoDevice(VirtualDevice):
>                          xpath="./model/@ram")
> 
> 
> +    def get_ram(self):
> +        return self._ram
> +    def set_ram(self, val):
> +        self._ram = val
> +    ram = _xml_property(get_ram, set_ram,
> +                        xpath="./model/@ram")
> +
>      def get_heads(self):
>          return self._heads
>      def set_heads(self, val):
> 




More information about the virt-tools-list mailing list