Re: Virtual networking

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

 



On Tue, Jan 23, 2007 at 10:59:31AM +0000, Mark McLoughlin wrote:
> On Mon, 2007-01-22 at 16:02 +0000, Daniel P. Berrange wrote:
> > On Mon, Jan 22, 2007 at 02:46:11PM +0000, Mark McLoughlin wrote:
> 
> > > http://www.gnome.org/~markmc/code/libvirt-networking/libvirt-qemu-transient.patch
> > 
> > That should not be neccessary in my latest patches - I fixed up the transient
> > domain cleanup stuff in a slightly different way.
> 
> 	AFAICS, this is still needed ... i.e.
> 
>   $> virsh create foo.xml
>   $> virsh destroy Foo
>   $> virsh create foo.xml
>   libvir: QEMUD error : domain Foo exists already
>   error: Failed to create domain from foo.xml

I think one of your other patches must be breaking this, because the plain
QEMU patches I posted definitely work:

  virsh > create  /home/berrange/q.xml
  Domain demo created from /home/berrange/q.xml

  virsh > list --all
   Id Name                 State
  ----------------------------------
    3 demo                 running

  virsh > destroy demo
  Domain demo destroyed

  virsh > list --all
   Id Name                 State
  ----------------------------------

  virsh > create  /home/berrange/q.xml
  Domain demo created from /home/berrange/q.xml

  virsh > list --all
   Id Name                 State
  ----------------------------------
    4 demo                 running


The bit of code which cleans up transient domains is at the very end of the
method:

static int qemudDispatchPoll(struct qemud_server *server, struct pollfd *fds)

in qemud/qemud.c

It basically iterates over every guest in the inactive domains list, and any
which do not have a config file listed (ie, vm->configFile[0] == NULL) are
purged from the list.  The backend impl for 'create' command ensures this
is the case by passing 0 as the last arg to qemudLoadConfigXML() which tells
it not to write a persistent config file to disk.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 


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