mirror of https://gitee.com/openkylin/libvirt.git
parent
8bec4ff2f1
commit
5759a5ccb5
1
AUTHORS
1
AUTHORS
|
@ -202,6 +202,7 @@ Patches have also been contributed by:
|
|||
Tyler Coumbes <coumbes@gmail.com>
|
||||
Josh Durgin <josh.durgin@dreamhost.com>
|
||||
Wen Ruo Lv <lvroyce@linux.vnet.ibm.com>
|
||||
Patrice LACHANCE <patlachance@gmail.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
|
|
@ -730,9 +730,11 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
|
|||
if (priv->host->productVersion != esxVI_ProductVersion_ESX35 &&
|
||||
priv->host->productVersion != esxVI_ProductVersion_ESX40 &&
|
||||
priv->host->productVersion != esxVI_ProductVersion_ESX41 &&
|
||||
priv->host->productVersion != esxVI_ProductVersion_ESX4x) {
|
||||
priv->host->productVersion != esxVI_ProductVersion_ESX4x &&
|
||||
priv->host->productVersion != esxVI_ProductVersion_ESX50 &&
|
||||
priv->host->productVersion != esxVI_ProductVersion_ESX5x) {
|
||||
ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("%s is neither an ESX 3.5 host nor an ESX 4.x host"),
|
||||
_("%s is neither an ESX 3.5, 4.x nor 5.x host"),
|
||||
hostname);
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -857,10 +859,12 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
|
|||
if (priv->vCenter->productVersion != esxVI_ProductVersion_VPX25 &&
|
||||
priv->vCenter->productVersion != esxVI_ProductVersion_VPX40 &&
|
||||
priv->vCenter->productVersion != esxVI_ProductVersion_VPX41 &&
|
||||
priv->vCenter->productVersion != esxVI_ProductVersion_VPX4x) {
|
||||
priv->vCenter->productVersion != esxVI_ProductVersion_VPX4x &&
|
||||
priv->vCenter->productVersion != esxVI_ProductVersion_VPX50 &&
|
||||
priv->vCenter->productVersion != esxVI_ProductVersion_VPX5x) {
|
||||
ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("%s is neither a vCenter 2.5 server nor a vCenter "
|
||||
"4.x server"), hostname);
|
||||
_("%s is neither a vCenter 2.5, 4.x nor 5.x server"),
|
||||
hostname);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
|
@ -673,12 +673,19 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
|
|||
} else if (STRPREFIX(ctx->service->about->apiVersion, "4.")) {
|
||||
ctx->apiVersion = esxVI_APIVersion_4x;
|
||||
|
||||
VIR_WARN("Found untested VI API major/minor version '%s'",
|
||||
ctx->service->about->apiVersion);
|
||||
} else if (STRPREFIX(ctx->service->about->apiVersion, "5.0")) {
|
||||
ctx->apiVersion = esxVI_APIVersion_50;
|
||||
} else if (STRPREFIX(ctx->service->about->apiVersion, "5.")) {
|
||||
ctx->apiVersion = esxVI_APIVersion_5x;
|
||||
|
||||
VIR_WARN("Found untested VI API major/minor version '%s'",
|
||||
ctx->service->about->apiVersion);
|
||||
} else {
|
||||
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting VI API major/minor version '2.5' or '4.x' "
|
||||
"but found '%s'"), ctx->service->about->apiVersion);
|
||||
_("Expecting VI API major/minor version '2.5', '4.x' or "
|
||||
"'5.x' but found '%s'"), ctx->service->about->apiVersion);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -702,12 +709,19 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
|
|||
} else if (STRPREFIX(ctx->service->about->version, "4.")) {
|
||||
ctx->productVersion = esxVI_ProductVersion_ESX4x;
|
||||
|
||||
VIR_WARN("Found untested ESX major/minor version '%s'",
|
||||
ctx->service->about->version);
|
||||
} else if (STRPREFIX(ctx->service->about->version, "5.0")) {
|
||||
ctx->productVersion = esxVI_ProductVersion_ESX50;
|
||||
} else if (STRPREFIX(ctx->service->about->version, "5.")) {
|
||||
ctx->productVersion = esxVI_ProductVersion_ESX5x;
|
||||
|
||||
VIR_WARN("Found untested ESX major/minor version '%s'",
|
||||
ctx->service->about->version);
|
||||
} else {
|
||||
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting ESX major/minor version '3.5' or "
|
||||
"'4.x' but found '%s'"),
|
||||
_("Expecting ESX major/minor version '3.5', "
|
||||
"'4.x' or '5.x' but found '%s'"),
|
||||
ctx->service->about->version);
|
||||
return -1;
|
||||
}
|
||||
|
@ -721,12 +735,20 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
|
|||
} else if (STRPREFIX(ctx->service->about->version, "4.")) {
|
||||
ctx->productVersion = esxVI_ProductVersion_VPX4x;
|
||||
|
||||
VIR_WARN("Found untested VPX major/minor version '%s'",
|
||||
ctx->service->about->version);
|
||||
} else if (STRPREFIX(ctx->service->about->version, "5.0")) {
|
||||
ctx->productVersion = esxVI_ProductVersion_VPX50;
|
||||
} else if (STRPREFIX(ctx->service->about->version, "5.")) {
|
||||
ctx->productVersion = esxVI_ProductVersion_VPX5x;
|
||||
|
||||
VIR_WARN("Found untested VPX major/minor version '%s'",
|
||||
ctx->service->about->version);
|
||||
} else {
|
||||
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting VPX major/minor version '2.5' or '4.x' "
|
||||
"but found '%s'"), ctx->service->about->version);
|
||||
_("Expecting VPX major/minor version '2.5', '4.x' "
|
||||
"or '5.x' but found '%s'"),
|
||||
ctx->service->about->version);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
|
@ -3897,11 +3919,12 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductVersion productVersio
|
|||
/*
|
||||
* virtualHW.version compatibility matrix:
|
||||
*
|
||||
* 4 7 API
|
||||
* ESX 3.5 + 2.5
|
||||
* ESX 4.0 + + 4.0
|
||||
* ESX 4.1 + + 4.1
|
||||
* GSX 2.0 + + 2.5
|
||||
* 4 7 8 API
|
||||
* ESX 3.5 + 2.5
|
||||
* ESX 4.0 + + 4.0
|
||||
* ESX 4.1 + + 4.1
|
||||
* ESX 5.0 + + + 5.0
|
||||
* GSX 2.0 + + 2.5
|
||||
*/
|
||||
switch (productVersion) {
|
||||
case esxVI_ProductVersion_ESX35:
|
||||
|
@ -3919,6 +3942,14 @@ esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductVersion productVersio
|
|||
case esxVI_ProductVersion_VPX4x:
|
||||
return 7;
|
||||
|
||||
case esxVI_ProductVersion_ESX50:
|
||||
case esxVI_ProductVersion_VPX50:
|
||||
return 8;
|
||||
|
||||
case esxVI_ProductVersion_ESX5x:
|
||||
case esxVI_ProductVersion_VPX5x:
|
||||
return 8;
|
||||
|
||||
default:
|
||||
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("Unexpected product version"));
|
||||
|
|
|
@ -99,7 +99,9 @@ enum _esxVI_APIVersion {
|
|||
esxVI_APIVersion_25,
|
||||
esxVI_APIVersion_40,
|
||||
esxVI_APIVersion_41,
|
||||
esxVI_APIVersion_4x /* > 4.1 */
|
||||
esxVI_APIVersion_4x, /* > 4.1 */
|
||||
esxVI_APIVersion_50,
|
||||
esxVI_APIVersion_5x /* > 5.0 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -117,12 +119,16 @@ enum _esxVI_ProductVersion {
|
|||
esxVI_ProductVersion_ESX40 = esxVI_ProductVersion_ESX | 2,
|
||||
esxVI_ProductVersion_ESX41 = esxVI_ProductVersion_ESX | 3,
|
||||
esxVI_ProductVersion_ESX4x = esxVI_ProductVersion_ESX | 4, /* > 4.1 */
|
||||
esxVI_ProductVersion_ESX50 = esxVI_ProductVersion_ESX | 5,
|
||||
esxVI_ProductVersion_ESX5x = esxVI_ProductVersion_ESX | 6, /* > 5.0 */
|
||||
|
||||
esxVI_ProductVersion_VPX = (1 << 2) << 16,
|
||||
esxVI_ProductVersion_VPX25 = esxVI_ProductVersion_VPX | 1,
|
||||
esxVI_ProductVersion_VPX40 = esxVI_ProductVersion_VPX | 2,
|
||||
esxVI_ProductVersion_VPX41 = esxVI_ProductVersion_VPX | 3,
|
||||
esxVI_ProductVersion_VPX4x = esxVI_ProductVersion_VPX | 4 /* > 4.1 */
|
||||
esxVI_ProductVersion_VPX4x = esxVI_ProductVersion_VPX | 4, /* > 4.1 */
|
||||
esxVI_ProductVersion_VPX50 = esxVI_ProductVersion_VPX | 5,
|
||||
esxVI_ProductVersion_VPX5x = esxVI_ProductVersion_VPX | 6 /* > 5.0 */
|
||||
};
|
||||
|
||||
enum _esxVI_Occurrence {
|
||||
|
|
|
@ -44,6 +44,7 @@ domain-xml <=> vmx
|
|||
config.version = "8" # essential
|
||||
virtualHW.version = "4" # essential for ESX 3.5
|
||||
virtualHW.version = "7" # essential for ESX 4.0
|
||||
virtualHW.version = "8" # essential for ESX 5.0
|
||||
|
||||
|
||||
??? <=> guestOS = "<value>" # essential, FIXME: not representable
|
||||
|
@ -1278,9 +1279,10 @@ virVMXParseConfig(virVMXContext *ctx, virCapsPtr caps, const char *vmx)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virtualHW_version != 4 && virtualHW_version != 7) {
|
||||
if (virtualHW_version != 4 && virtualHW_version != 7 &&
|
||||
virtualHW_version != 8) {
|
||||
VMX_ERROR(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Expecting VMX entry 'virtualHW.version' to be 4 or 7 "
|
||||
_("Expecting VMX entry 'virtualHW.version' to be 4, 7 or 8 "
|
||||
"but found %lld"),
|
||||
virtualHW_version);
|
||||
goto cleanup;
|
||||
|
|
Loading…
Reference in New Issue