[virt-tools-list] [PATCH virt-manager] Allow empty cpu model

Cole Robinson crobinso at redhat.com
Mon Mar 25 17:27:28 UTC 2013


On 03/19/2013 12:53 AM, Ken ICHIKAWA wrote:
> If we specify cpu model and apply once, we could not specify empty
> cpu model again with following error.
> "Error changing VM configuration: internal error Non-empty feature
> list specified without CPU model"
> That is not useful to restore default cpu model.
> This patch fixes above issue.
> 
> Signed-off-by: Ken ICHIKAWA <ichikawa.ken at jp.fujitsu.com>
> ---
>  src/virtManager/domain.py |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/virtManager/domain.py b/src/virtManager/domain.py
> index 947cdf8..246cb27 100644
> --- a/src/virtManager/domain.py
> +++ b/src/virtManager/domain.py
> @@ -460,6 +460,11 @@ class vmmDomain(vmmLibvirtObject):
>  
>              guest.cpu.model = model or None
>  
> +            if guest.cpu.model == None:
> +                for f in guest.cpu.features:
> +                    guest.cpu.remove_feature(f)
> +                return
> +
>              origfeatures = guest.cpu.features
>              def set_feature(fname, fpol):
>                  for f in origfeatures:
> 

Thanks Ken, pushed to master and gtk3.2 branches.

- Cole




More information about the virt-tools-list mailing list