Hi team,

When I edit ‘CPUs’ and ‘Memory’ of a guest which has a snapshot, an error occurred:

“Requested operation is not valid: cannot delete inactive domain with 1 snapshots.”

I found the reason is in src/kimchi/model/vms.py line 678: “dom.undefine()”, the ‘name’ is in update ‘params’ although I didn’t modify the name, thinking about the complete form in the UI, I modify in the background like this:

 

        if 'name' in params:

            new_name = params['name']

            name = dom.name()

            if new_name != name:

                if state == 'running':

                    raise InvalidParameter("KCHVM0003E", {'name': name, 'new_name': new_name})

 

                # Undefine old vm, only if name is going to change

                dom.undefine()

 

In this case, just edit ‘CPUs’ and ‘Memory’, every things is ok, no error occurred. Once edit ‘name’, the system prompt ‘Requested operation is not valid: cannot delete inactive domain with 1 snapshots.’ I advise just modify this prompt, do not undefined guest in force because that will cause the snapshot disappeared with no any warning.

Some people get a better idea about this? Thanks.  

 

                                                                             Regards,
                                                                             Zongmei Gou