Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
d3864c37
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d3864c37
编写于
7月 22, 2010
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
esx: Support vSphere 4.1
Also accept version > 4.1, but output a warning.
上级
3827f7f0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
51 addition
and
11 deletion
+51
-11
docs/drvesx.html.in
docs/drvesx.html.in
+2
-2
src/esx/esx_driver.c
src/esx/esx_driver.c
+8
-4
src/esx/esx_vi.c
src/esx/esx_vi.c
+24
-3
src/esx/esx_vi.h
src/esx/esx_vi.h
+8
-2
src/esx/esx_vmx.c
src/esx/esx_vmx.c
+9
-0
未找到文件。
docs/drvesx.html.in
浏览文件 @
d3864c37
...
...
@@ -2,10 +2,10 @@
<h1>
VMware ESX hypervisor driver
</h1>
<ul
id=
"toc"
></ul>
<p>
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.
0
and
The libvirt VMware ESX driver can manage VMware ESX/ESXi 3.5/4.
x
and
VMware GSX 2.0, also called VMware Server 2.0, and possibly later
versions.
<span
class=
"since"
>
Since 0.8.3
</span>
the driver can also
connect to a VMware vCenter 2.5/4.
0
(VPX).
connect to a VMware vCenter 2.5/4.
x
(VPX).
</p>
...
...
src/esx/esx_driver.c
浏览文件 @
d3864c37
...
...
@@ -353,9 +353,11 @@ esxConnectToHost(esxPrivate *priv, virConnectAuthPtr auth,
if
(
expectedProductVersion
==
esxVI_ProductVersion_ESX
)
{
if
(
priv
->
host
->
productVersion
!=
esxVI_ProductVersion_ESX35
&&
priv
->
host
->
productVersion
!=
esxVI_ProductVersion_ESX40
)
{
priv
->
host
->
productVersion
!=
esxVI_ProductVersion_ESX40
&&
priv
->
host
->
productVersion
!=
esxVI_ProductVersion_ESX41
&&
priv
->
host
->
productVersion
!=
esxVI_ProductVersion_ESX4x
)
{
ESX_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"%s is neither an ESX 3.5 host nor an ESX 4.
0
host"
),
_
(
"%s is neither an ESX 3.5 host nor an ESX 4.
x
host"
),
hostname
);
goto
cleanup
;
}
...
...
@@ -462,10 +464,12 @@ esxConnectToVCenter(esxPrivate *priv, virConnectAuthPtr auth,
}
if
(
priv
->
vCenter
->
productVersion
!=
esxVI_ProductVersion_VPX25
&&
priv
->
vCenter
->
productVersion
!=
esxVI_ProductVersion_VPX40
)
{
priv
->
vCenter
->
productVersion
!=
esxVI_ProductVersion_VPX40
&&
priv
->
vCenter
->
productVersion
!=
esxVI_ProductVersion_VPX41
&&
priv
->
vCenter
->
productVersion
!=
esxVI_ProductVersion_VPX4x
)
{
ESX_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"%s is neither a vCenter 2.5 server nor a vCenter "
"4.
0
server"
),
hostname
);
"4.
x
server"
),
hostname
);
goto
cleanup
;
}
...
...
src/esx/esx_vi.c
浏览文件 @
d3864c37
...
...
@@ -378,9 +378,16 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
ctx
->
apiVersion
=
esxVI_APIVersion_25
;
}
else
if
(
STRPREFIX
(
ctx
->
service
->
about
->
apiVersion
,
"4.0"
))
{
ctx
->
apiVersion
=
esxVI_APIVersion_40
;
}
else
if
(
STRPREFIX
(
ctx
->
service
->
about
->
apiVersion
,
"4.1"
))
{
ctx
->
apiVersion
=
esxVI_APIVersion_41
;
}
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
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Expecting VI API major/minor version '2.5' or '4.
0
' "
_
(
"Expecting VI API major/minor version '2.5' or '4.
x
' "
"but found '%s'"
),
ctx
->
service
->
about
->
apiVersion
);
goto
cleanup
;
}
...
...
@@ -400,10 +407,17 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
ctx
->
productVersion
=
esxVI_ProductVersion_ESX35
;
}
else
if
(
STRPREFIX
(
ctx
->
service
->
about
->
version
,
"4.0"
))
{
ctx
->
productVersion
=
esxVI_ProductVersion_ESX40
;
}
else
if
(
STRPREFIX
(
ctx
->
service
->
about
->
version
,
"4.1"
))
{
ctx
->
productVersion
=
esxVI_ProductVersion_ESX41
;
}
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
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Expecting ESX major/minor version '3.5' or "
"'4.
0
' but found '%s'"
),
"'4.
x
' but found '%s'"
),
ctx
->
service
->
about
->
version
);
goto
cleanup
;
}
...
...
@@ -412,9 +426,16 @@ esxVI_Context_Connect(esxVI_Context *ctx, const char *url,
ctx
->
productVersion
=
esxVI_ProductVersion_VPX25
;
}
else
if
(
STRPREFIX
(
ctx
->
service
->
about
->
version
,
"4.0"
))
{
ctx
->
productVersion
=
esxVI_ProductVersion_VPX40
;
}
else
if
(
STRPREFIX
(
ctx
->
service
->
about
->
version
,
"4.1"
))
{
ctx
->
productVersion
=
esxVI_ProductVersion_VPX41
;
}
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
{
ESX_VI_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Expecting VPX major/minor version '2.5' or '4.
0
' "
_
(
"Expecting VPX major/minor version '2.5' or '4.
x
' "
"but found '%s'"
),
ctx
->
service
->
about
->
version
);
goto
cleanup
;
}
...
...
src/esx/esx_vi.h
浏览文件 @
d3864c37
...
...
@@ -94,7 +94,9 @@ enum _esxVI_APIVersion {
esxVI_APIVersion_Undefined
=
0
,
esxVI_APIVersion_Unknown
,
esxVI_APIVersion_25
,
esxVI_APIVersion_40
esxVI_APIVersion_40
,
esxVI_APIVersion_41
,
esxVI_APIVersion_4x
/* > 4.1 */
};
/*
...
...
@@ -110,10 +112,14 @@ enum _esxVI_ProductVersion {
esxVI_ProductVersion_ESX
=
(
1
<<
1
)
<<
16
,
esxVI_ProductVersion_ESX35
=
esxVI_ProductVersion_ESX
|
1
,
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_VPX
=
(
1
<<
2
)
<<
16
,
esxVI_ProductVersion_VPX25
=
esxVI_ProductVersion_VPX
|
1
,
esxVI_ProductVersion_VPX40
=
esxVI_ProductVersion_VPX
|
2
esxVI_ProductVersion_VPX40
=
esxVI_ProductVersion_VPX
|
2
,
esxVI_ProductVersion_VPX41
=
esxVI_ProductVersion_VPX
|
3
,
esxVI_ProductVersion_VPX4x
=
esxVI_ProductVersion_VPX
|
4
/* > 4.1 */
};
enum
_esxVI_Occurrence
{
...
...
src/esx/esx_vmx.c
浏览文件 @
d3864c37
...
...
@@ -1184,6 +1184,7 @@ esxVMX_ParseConfig(esxVI_Context *ctx, virCapsPtr caps, const char *vmx,
* 4 7 API
* ESX 3.5 + 2.5
* ESX 4.0 + + 4.0
* ESX 4.1 + + 4.1
* GSX 2.0 + + 2.5
*/
switch
(
productVersion
)
{
...
...
@@ -1201,7 +1202,9 @@ esxVMX_ParseConfig(esxVI_Context *ctx, virCapsPtr caps, const char *vmx,
case
esxVI_ProductVersion_GSX20
:
case
esxVI_ProductVersion_ESX40
:
case
esxVI_ProductVersion_ESX41
:
case
esxVI_ProductVersion_VPX40
:
case
esxVI_ProductVersion_VPX41
:
if
(
virtualHW_version
!=
4
&&
virtualHW_version
!=
7
)
{
ESX_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"Expecting VMX entry 'virtualHW.version' to be 4 or 7 "
...
...
@@ -1212,6 +1215,10 @@ esxVMX_ParseConfig(esxVI_Context *ctx, virCapsPtr caps, const char *vmx,
break
;
case
esxVI_ProductVersion_ESX4x
:
case
esxVI_ProductVersion_VPX4x
:
break
;
default:
ESX_ERROR
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unexpected product version"
));
...
...
@@ -2702,6 +2709,8 @@ esxVMX_FormatConfig(esxVI_Context *ctx, virCapsPtr caps, virDomainDefPtr def,
case
esxVI_ProductVersion_GSX20
:
case
esxVI_ProductVersion_ESX40
:
case
esxVI_ProductVersion_ESX41
:
case
esxVI_ProductVersion_ESX4x
:
virBufferAddLit
(
&
buffer
,
"virtualHW.version =
\"
7
\"\n
"
);
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录