When a domain shuts down, Domain 0 doesn't actually reclaim the memory since it is expecting to start another guest domain in that memory. However you can free that memory too using virsh or xm command.
The xm program is the main interface for managing Xen guest domains. The program can be used to create, pause, and shutdown domains. It can also be used to list current domains, enable or pin VCPUs, and attach or detach virtual block devices.
The virsh program is the main interface for managing virsh guest domains. The program can be used to create, suspend, resume, save, and shutdown domains.
So if guest is using 128M use following command to reclaim memory:
Code:
xm mem-set 0 <memory-size>
For 128M, enter command:
Above command force domain 0 to reclaim all of memory. Above will set the domain's used memory using the balloon driver. Because this operation requires cooperation from the domain operating system, there is no guarantee that it will succeed. Warning: there is no good way to know in advance how small of a mem-set will make a domain unstable and cause it to crash. Be very careful when using this command on running domains.