Add suspend info to Xen, LXC and UML hypervisor capabilities

* src/lxc/lxc_conf.c, src/uml/uml_conf.c,
  src/xen/xen_hypervisor.c: Initialize suspend capabilities
* tests/xencapsdata/*xml: Add empty powermgmt capabilities
This commit is contained in:
Daniel P. Berrange 2011-11-29 15:28:26 +00:00
parent 8c60bc169f
commit 9ae0b8349c
13 changed files with 24 additions and 0 deletions

View File

@ -37,6 +37,8 @@
#include "uuid.h"
#include "configmake.h"
#include "lxc_container.h"
#include "virnodesuspend.h"
#define VIR_FROM_THIS VIR_FROM_LXC
@ -71,6 +73,9 @@ virCapsPtr lxcCapsInit(void)
VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
VIR_WARN("Failed to get host power management capabilities");
if (virGetHostUUID(caps->host.host_uuid)) {
lxcError(VIR_ERR_INTERNAL_ERROR,
"%s", _("cannot get the host uuid"));

View File

@ -47,6 +47,8 @@
#include "virfile.h"
#include "command.h"
#include "virnetdevtap.h"
#include "virnodesuspend.h"
#define VIR_FROM_THIS VIR_FROM_UML
@ -81,6 +83,9 @@ virCapsPtr umlCapsInit(void) {
VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
}
if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
VIR_WARN("Failed to get host power management capabilities");
if (virGetHostUUID(caps->host.host_uuid)) {
umlReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("cannot get the host uuid"));

View File

@ -66,6 +66,7 @@
#include "capabilities.h"
#include "memory.h"
#include "virfile.h"
#include "virnodesuspend.h"
#define VIR_FROM_THIS VIR_FROM_XEN
@ -2743,6 +2744,9 @@ xenHypervisorMakeCapabilities(virConnectPtr conn)
cpuinfo,
capabilities);
if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
VIR_WARN("Failed to get host power management capabilities");
VIR_FORCE_FCLOSE(cpuinfo);
VIR_FORCE_FCLOSE(capabilities);

View File

@ -7,6 +7,7 @@
<vmx/>
</features>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -7,6 +7,7 @@
<vmx/>
</features>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -4,6 +4,7 @@
<cpu>
<arch>i686</arch>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -4,6 +4,7 @@
<cpu>
<arch>ia64</arch>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -4,6 +4,7 @@
<cpu>
<arch>ia64</arch>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -4,6 +4,7 @@
<cpu>
<arch>ia64</arch>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -4,6 +4,7 @@
<cpu>
<arch>ia64</arch>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -4,6 +4,7 @@
<cpu>
<arch>ppc64</arch>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -7,6 +7,7 @@
<svm/>
</features>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>

View File

@ -7,6 +7,7 @@
<svm/>
</features>
</cpu>
<power_management/>
<migration_features>
<live/>
<uri_transports>