[libvirt-users] So why does "destroy" not actually destroy?

Kashyap Chamarthy kchamart at redhat.com
Tue Jul 14 11:22:08 UTC 2015


On Tue, Jul 14, 2015 at 12:51:31AM +0000, KARR, DAVID wrote:
> I thought it odd that if I have a running VM and I do "virsh destroy"
> it results in a VM that is "shut off".  To ACTUALLY destroy a VM, you
> have to follow that with "undefine".  Could someone elaborate on how
> we ended up with these slightly confusing semantics?

I asked this question in 2011[1]. Quoting the two responses from that
thread.

Michal Privoznik:

    "Libvirt has this philosophy to be backward compatible and therefore
    not to change old API including virsh commands. But as time flies,
    some APIs are consumed by new ones (virDomainCreateLinux is now just
    alias for virDomainCreateXML). So changing this is not feasible way.
    What might be, is to create less invasive aliases. But we can't make
    'destroy' command to go away."


Also see response from Eric Blake[2] (and others on that thread) on that
thread:


[1] https://www.redhat.com/archives/libvir-list/2011-June/msg00620.html
    -- "Request to rename 'destroy' to something milder"
[2] https://www.redhat.com/archives/libvir-list/2011-June/msg00656.html

-- 
/kashyap




More information about the libvirt-users mailing list