Re: >>: [libvirt] OpenVZ capabilites in LibVIRT

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

 



On Tue, Nov 11, 2008 at 04:15:35PM +0300, Anton Protopopov wrote:
> >
> > virsh # undefine 3005
> > libvir: OpenVZ error : Domain not found
> > Domain 3005 has been undefined
> >
> > It really removes domain from file system, but why does it throw that error
> > message?
> >
> I think, that it is a virsh error

The problem is related to fact that OpenVZ driver uses integers as its
domain name. If it looks like an integer, virsh will first do a LookupByID,
and then fallback to LookupByName. Inactive domains however, do not have
any meaningful ID number. virsh should not be trying to doa lookupByID
for the undefine command - it should only do a lookup by name. This would
remove the error message.

> >  6) Where does libvirt store info about already created domains? I can't
> >>> create a new domain with ID 3005 after I completely destroy previous one via
> >>> 'vzctl destroy 3005'.
> >>>
> >>  And what does it saying?
> >>
> >
> > - if i simply destroy domain via vzctl (without undefining it via virsh):
> > [root@alt-03 ~]# vzctl destroy 3005
> > Destroying container private area: /var/lib/vz/private/3005
> > Container private area was destroyed
> >
> > - and then try to create another one (this time via virsh)
> > virsh # create ovz.xml
> > libvir: OpenVZ error : operation failed: Already an OPENVZ VM defined with
> > the id '3005'
> > error: Failed to create domain from ovz.xml
> >

This is a bug in the OpenVZ driver. It is caching information about domains
in the driver, when it should really be asking OpenVZ about them directly
every time, so it always has updated info & plays correctly with vzctl. 

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
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]