mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
8c60bc169f
commit
9ae0b8349c
|
@ -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"));
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<vmx/>
|
||||
</features>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<vmx/>
|
||||
</features>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<cpu>
|
||||
<arch>i686</arch>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<cpu>
|
||||
<arch>ia64</arch>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<cpu>
|
||||
<arch>ia64</arch>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<cpu>
|
||||
<arch>ia64</arch>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<cpu>
|
||||
<arch>ia64</arch>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<cpu>
|
||||
<arch>ppc64</arch>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<svm/>
|
||||
</features>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<svm/>
|
||||
</features>
|
||||
</cpu>
|
||||
<power_management/>
|
||||
<migration_features>
|
||||
<live/>
|
||||
<uri_transports>
|
||||
|
|
Loading…
Reference in New Issue