<br><br><div><span class="gmail_quote">On 8/21/07, <b class="gmail_sendername">Richard W.M. Jones</b> <<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Justin Conover wrote:<br><br>[These are a couple of frequently asked questions ... do we have an FAQ?]<br><br>> How can you free up memory when you shut a guest down?  Give back to<br>> Domain-0 so you can start another one up?
<br><br>Domain-0 doesn't recover the memory when a domain shuts down.  The<br>assumption (within Xen) is that another domain will be starting up<br>shortly, so there is no point wasting time returning the memory to Domain-0.
<br><br>However the memory hasn't just gone away, as your question implies.  The<br>hypervisor is still managing that free memory, and will give it to the<br>next guest which starts up.<br><br>If you really want to give the free memory back to Domain-0, then I
<br>think you can do it by:<br><br>   virsh setmem Domain-0 <kb><br><br>where <kb> is the total number of kilobytes that you want Domain-0 to<br>have (ie. current size + size of freed guest -- you have to calculate
<br>this for yourself).<br><br>> Also, were are the profiles for xen stored?  For example I create all of<br>> them under /vm/xen/blah if I decide to delete blah1 and create a new one<br>> named blah1 it says it is already there, even though I removed it.
<br><br>Since Xen 3.0.3 or 3.0.4, I forget exactly which, Xen manages the<br>profiles in its own private place.  So there are no configuration files.<br>  I agree that this is very annoying, but that's the way Xen forces us
<br>to do it.<br><br>To view or edit a configuration file, you now have to do:<br><br>   virsh dumpxml domain > domain.xml<br>   edit domain.xml<br>   virsh define domain.xml<br><br>('virsh define' only works if the domain has been shutdown, so if it is
<br>still running then shut it down first using 'virsh shutdown').<br><br>If you want to make a change to a running domain, there are some changes<br>which you are allowed to do, basically adding and removing block and
<br>network devices, and adding and removing memory.  The commands to use are:<br><br>   virsh attach-device<br>   virsh attach-disk<br>   virsh attach-interface<br>   virsh detach-device<br>   virsh detach-disk<br>   virsh detach-interface
<br>   virsh setmem<br>   virsh setmaxmem<br><br>(Just do 'virsh help command' to get help on each of those commands).<br><br>Rich.<br><br>--<br>Emerging Technologies, Red Hat - <a href="http://et.redhat.com/~rjones/">
http://et.redhat.com/~rjones/</a><br>Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod<br>Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in<br>England and Wales under Company Registration No. 03798903
<br><br></blockquote></div><br><br>Very nice, thank you.<br>