<br><br><div><span class="gmail_quote">On 8/21/07, <b class="gmail_sendername">Richard W.M. Jones</b> &lt;<a href="mailto:rjones@redhat.com">rjones@redhat.com</a>&gt; 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>&gt; How can you free up memory when you shut a guest down?&nbsp;&nbsp;Give back to<br>&gt; Domain-0 so you can start another one up?
<br><br>Domain-0 doesn&#39;t recover the memory when a domain shuts down.&nbsp;&nbsp;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&#39;t just gone away, as your question implies.&nbsp;&nbsp;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>&nbsp;&nbsp; virsh setmem Domain-0 &lt;kb&gt;<br><br>where &lt;kb&gt; 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>&gt; Also, were are the profiles for xen stored?&nbsp;&nbsp;For example I create all of<br>&gt; them under /vm/xen/blah if I decide to delete blah1 and create a new one<br>&gt; 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.&nbsp;&nbsp;So there are no configuration files.<br>&nbsp;&nbsp;I agree that this is very annoying, but that&#39;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>&nbsp;&nbsp; virsh dumpxml domain &gt; domain.xml<br>&nbsp;&nbsp; edit domain.xml<br>&nbsp;&nbsp; virsh define domain.xml<br><br>(&#39;virsh define&#39; only works if the domain has been shutdown, so if it is
<br>still running then shut it down first using &#39;virsh shutdown&#39;).<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.&nbsp;&nbsp;The commands to use are:<br><br>&nbsp;&nbsp; virsh attach-device<br>&nbsp;&nbsp; virsh attach-disk<br>&nbsp;&nbsp; virsh attach-interface<br>&nbsp;&nbsp; virsh detach-device<br>&nbsp;&nbsp; virsh detach-disk<br>&nbsp;&nbsp; virsh detach-interface
<br>&nbsp;&nbsp; virsh setmem<br>&nbsp;&nbsp; virsh setmaxmem<br><br>(Just do &#39;virsh help command&#39; 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.&nbsp;&nbsp;Registered in<br>England and Wales under Company Registration No. 03798903
<br><br></blockquote></div><br><br>Very nice, thank you.<br>