Re: [libvirt] On shutdown Destroy/Delete

2008-08-20 Thread Richard W.M. Jones
On Tue, Aug 19, 2008 at 10:26:33PM +0200, Stefan de Konink wrote:
 I would really like to know how I can make a defined domain *gone* after  
 shutdown :) (instead of it still be defined, after shutdown)

virsh undefine?

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v

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


Re: [libvirt] On shutdown Destroy/Delete

2008-08-20 Thread Richard W.M. Jones
On Wed, Aug 20, 2008 at 02:31:52PM +0100, Richard W.M. Jones wrote:
 On Tue, Aug 19, 2008 at 10:26:33PM +0200, Stefan de Konink wrote:
  I would really like to know how I can make a defined domain *gone* after  
  shutdown :) (instead of it still be defined, after shutdown)

[...]

Oh right, so am I correct in thinking you want the domain to be
undefined after it has shutdown itself?  That's not possible
currently.  AIUI undefining a running domain is either an illegal
operation or shuts it down abruptly -- you'll need to look in the
source to see which.  So you'd need some sort of 'reaper' cronjob to
regularly undefine domains after they have gone into the shutdown
state.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 60 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora

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


Re: [libvirt] On shutdown Destroy/Delete

2008-08-20 Thread Daniel P. Berrange
On Wed, Aug 20, 2008 at 02:34:22PM +0100, Richard W.M. Jones wrote:
 On Wed, Aug 20, 2008 at 02:31:52PM +0100, Richard W.M. Jones wrote:
  On Tue, Aug 19, 2008 at 10:26:33PM +0200, Stefan de Konink wrote:
   I would really like to know how I can make a defined domain *gone* after  
   shutdown :) (instead of it still be defined, after shutdown)
 
 [...]
 
 Oh right, so am I correct in thinking you want the domain to be
 undefined after it has shutdown itself?  That's not possible
 currently.  AIUI undefining a running domain is either an illegal
 operation or shuts it down abruptly -- you'll need to look in the
 source to see which.  So you'd need some sort of 'reaper' cronjob to
 regularly undefine domains after they have gone into the shutdown
 state.

The easy answer is to simply *not* define it in the first place. If
you use  virDomainCreateLinux() instead of virDomainDefine+virDomainCreate
then you'll get a running VM without any persistent config file behind
it. Then all trace will disappear when it shuts down.

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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] On shutdown Destroy/Delete

2008-08-19 Thread Stefan de Konink

Hi,


I would really like to know how I can make a defined domain *gone* after 
shutdown :) (instead of it still be defined, after shutdown)




Stefan

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