So, my previous set of patches for inactive domain management deal with the
problem for Xen 3.0.3 or earlier. In 3.0.4 we now have lifecycle management
support, which means we no longer need to scan /etc/xen config files if
running against a new XenD. We choose between Xend & scanning /etc/xen
files based on the condition 'xendConfigVersion >= 3'.
The attached patch adds 5 new entry points to xend_internal.c
xenDaemonListDefinedDomains
xenDaemonNumOfDefinedDomains
xenDaemonDomainCreate
xenDaemonDomainDefineXML
xenDaemonDomainUndefine
These let you enumerate inactive domains, define new ones, delete old ones.
Secondly, the patch modifies a number of existing methods to work against
inactive domains too. Previously they'd unconditionally pass if the
domain id was < 0. Now, if xendConfigVersion is >= 3, then they will
know that XenD supports inactive domains & thus work for inactive guests
too.
xenDaemonDomainGetMaxMemory
xenDaemonDomainSetMaxMemory
xenDaemonDomainSetMemory
xenDaemonDomainGetInfo
xenDaemonDomainSetVcpus
xenDaemonDomainDumpXML
The methods for setting mem,max memory & vcpu count all required further
bug fixes to Xend which have been sent upstream & hopefully merged soon.
Finally, the patch changes the xendConfigVersion to be lookedup just once
when initially connecting to XenD. Since we need this version info very
frequently now, it was causing too much unnneccessary overload calling
it every time.
internal.h | 1
xend_internal.c | 270 +++++++++++++++++++++++++++++++++++++++++++++-----------
xend_internal.h | 8 +
xm_internal.c | 9 -
4 files changed, 227 insertions(+), 61 deletions(-)
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 -=|