Chandrashekhar Jamadarkhani (cjamadar)
2013-Jul-03 05:02 UTC
[libvirt-users] VM destroy faiing in 1.0.1
Hi, Virsh destroy is always failing with below error. [host:~]$ virsh destroy XYZ--2 error: Failed to destroy domain XYZ--2 error: Requested operation is not valid: domain is not running [host:~]$ virsh list --all Id Name State ---------------------------------------------------- - XYZ--2 shut off [host:~]$ host:~]$ libvirtd --version libvirtd (libvirt) 1.0.1 [host:~]$ host:~]$ virsh version Compiled against library: libvirt 1.0.1 Using library: libvirt 1.0.1 Using API: QEMU 1.0.1 Running hypervisor: QEMU 0.13.0 [host:~]$ same VM was working with older libvirt vrsion: [host:~]$ virsh version Compiled against library: libvir 0.8.7 Using library: libvir 0.8.7 Using API: QEMU 0.8.7 Running hypervisor: QEMU 0.13.0 [host:~]$ when we upgrade to latest libvirt version:1.0.1, VM destroy is failing. Appreciate your help on this. Thanks, Chandrashekhar
Hi Chandrashekhar, If you are looking to totally wipe out a domain (virtual machine) from your host you are looking for the undefined which is the opposite of defining a domain. The destroy command is like a hard power off of the domain. [root@bv13-07 ~]# virsh help undefine NAME undefine - undefine a domain SYNOPSIS undefine <domain> [--managed-save] [<storage>] [--remove-all-storage] [--wipe-storage] [--snapshots-metadata] DESCRIPTION Undefine an inactive domain, or convert persistent to transient. From: libvirt-users-bounces@redhat.com [mailto:libvirt-users-bounces@redhat.com] On Behalf Of Chandrashekhar Jamadarkhani (cjamadar) Sent: Tuesday, July 02, 2013 10:02 PM To: libvirt-users@redhat.com Subject: [libvirt-users] VM destroy faiing in 1.0.1 Hi, Virsh destroy is always failing with below error. [host:~]$ virsh destroy XYZ--2 error: Failed to destroy domain XYZ--2 error: Requested operation is not valid: domain is not running [host:~]$ virsh list --all Id Name State ---------------------------------------------------- - XYZ--2 shut off [host:~]$ host:~]$ libvirtd --version libvirtd (libvirt) 1.0.1 [host:~]$ host:~]$ virsh version Compiled against library: libvirt 1.0.1 Using library: libvirt 1.0.1 Using API: QEMU 1.0.1 Running hypervisor: QEMU 0.13.0 [host:~]$ same VM was working with older libvirt vrsion: [host:~]$ virsh version Compiled against library: libvir 0.8.7 Using library: libvir 0.8.7 Using API: QEMU 0.8.7 Running hypervisor: QEMU 0.13.0 [host:~]$ when we upgrade to latest libvirt version:1.0.1, VM destroy is failing. Appreciate your help on this. Thanks, Chandrashekhar
On 07/02/2013 11:02 PM, Chandrashekhar Jamadarkhani (cjamadar) wrote:> Hi, > > Virsh destroy is always failing with below error. > > [host:~]$ virsh destroy XYZ--2 > error: Failed to destroy domain XYZ--2 > error: Requested operation is not valid: domain is not runningYou must ALWAYS be prepared for commands to fail because the guest has changed states on its own. Any guest can turn itself off before your destroy request; this does not mean that destroy is broken.> when we upgrade to latest libvirt version:1.0.1, VM destroy is failing.Latest libvirt is 1.1.0, not 1.0.1. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Chandrashekhar Jamadarkhani (cjamadar)
2013-Jul-03 16:40 UTC
Re: [libvirt-users] VM destroy faiing in 1.0.1
Hi Eric, Thanks Eric for looking in to this.>>You must ALWAYS be prepared for commands to fail because the guest has changed states on its own. Any guest can turn itself off before your destroy request; this does not mean that destroy is broken.I'm not saying vm_destroy is broken. I'm handling the failure of vm_destroy. For the same VM, vm destroy is going through in the older libvirt version(0.8.7) and why it is always failing in the latest version of libvirt ? anything wrong in my environment ? host:~]$ virsh version Compiled against library: libvir 0.8.7 Using library: libvir 0.8.7 Using API: QEMU 0.8.7 Running hypervisor: QEMU 0.13.0 [host:~]$ Thanks, CJ -----Original Message----- From: Eric Blake [mailto:eblake@redhat.com] Sent: Wednesday, July 03, 2013 7:34 PM To: Chandrashekhar Jamadarkhani (cjamadar) Cc: libvirt-users@redhat.com Subject: Re: [libvirt-users] VM destroy faiing in 1.0.1 On 07/02/2013 11:02 PM, Chandrashekhar Jamadarkhani (cjamadar) wrote:> Hi, > > Virsh destroy is always failing with below error. > > [host:~]$ virsh destroy XYZ--2 > error: Failed to destroy domain XYZ--2 > error: Requested operation is not valid: domain is not runningYou must ALWAYS be prepared for commands to fail because the guest has changed states on its own. Any guest can turn itself off before your destroy request; this does not mean that destroy is broken.> when we upgrade to latest libvirt version:1.0.1, VM destroy is failing.Latest libvirt is 1.1.0, not 1.0.1. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org