Re: [libvirt] trying to 'destroy' a domain with Python bindings...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 07, 2008 at 02:21:49AM -0700, Michael March wrote:
> When I do this:
> 
>    conn.lookupByName('myDomU').destroy()
> 
> ... I get this:
> 
> Traceback (most recent call last):
>  File "test.py", line 30, in ?
>    print conn.lookupByName('myDomU').destroy()
>  File "/usr/lib64/python2.4/site-packages/libvirt.py", line 238, in destroy
>    if ret == -1: raise libvirtError ('virDomainDestroy() failed', dom=self)
> libvirt.libvirtError: virDomainDestroy() failed
> 
> 
> What am I missing here? Destroy should do the equivalent of 'Delete' on 
> virt-manager, correct?

  No Destroy means kill a running domain, it's probably not running, hence
the error. Delete means undefining a domain see
  http://libvirt.org/html/libvirt-libvirt.html#virDomainUndefine

  domain.undefine() 
    """undefine a domain but does not stop it if it is running """

I think it's available in RHEL 5 update 2.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]