Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
126d3ebe
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看板
提交
126d3ebe
编写于
9月 05, 2008
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix starting of xen domains without a PVFB console by removing default emulator
上级
f193e195
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
79 addition
and
48 deletion
+79
-48
ChangeLog
ChangeLog
+17
-1
src/domain_conf.c
src/domain_conf.c
+29
-18
src/domain_conf.h
src/domain_conf.h
+5
-0
src/lxc_driver.c
src/lxc_driver.c
+9
-1
src/qemu_conf.c
src/qemu_conf.c
+6
-0
src/qemu_driver.c
src/qemu_driver.c
+11
-4
src/xm_internal.c
src/xm_internal.c
+0
-20
tests/xmconfigdata/test-paravirt-net-e1000.xml
tests/xmconfigdata/test-paravirt-net-e1000.xml
+0
-1
tests/xmconfigdata/test-paravirt-new-pvfb.xml
tests/xmconfigdata/test-paravirt-new-pvfb.xml
+0
-1
tests/xmconfigdata/test-paravirt-old-pvfb.xml
tests/xmconfigdata/test-paravirt-old-pvfb.xml
+0
-1
tests/xml2sexprdata/xml2sexpr-fv-kernel.xml
tests/xml2sexprdata/xml2sexpr-fv-kernel.xml
+1
-0
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
+1
-1
未找到文件。
ChangeLog
浏览文件 @
126d3ebe
Thu Sep 5 12:33:26 BST 2008 Daniel P. Berrange <berrange@redhat.com>
Fri Sep 5 12:50:26 BST 2008 Daniel P. Berrange <berrange@redhat.com>
Fix starting of Xen domains without PVFB console, by not
setting emulator path in SEXPR unless asked for
* src/domain_conf.c, src/domain_conf.h, src/xm_internal.c: Don't
set emulator path with a default value
* src/lxc_driver.c, src/qemu_conf.c, src/qemu_driver.c: Find a
default emulator path if no explicit path is provided in config
* tests/xmconfigdata/test-paravirt-net-e1000.xml,
tests/xmconfigdata/test-paravirt-new-pvfb.xml,
tests/xmconfigdata/test-paravirt-old-pvfb.xml,
tests/xml2sexprdata/xml2sexpr-fv-kernel.xml: Remove default
emulator path
* tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr: Remove
emulator path
Fri Sep 5 12:33:26 BST 2008 Daniel P. Berrange <berrange@redhat.com>
* src/xen_unified.c, src/xen_internal.c, src/xen_internal.h,
tests/xencapstest.c: Pass connection object into capabilities
...
...
src/domain_conf.c
浏览文件 @
126d3ebe
...
...
@@ -1917,24 +1917,6 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
}
def
->
emulator
=
virXPathString
(
conn
,
"string(./devices/emulator[1])"
,
ctxt
);
if
(
!
def
->
emulator
)
{
const
char
*
type
=
virDomainVirtTypeToString
(
def
->
virtType
);
if
(
!
type
)
{
virDomainReportError
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"unknown virt type"
));
goto
error
;
}
const
char
*
emulator
=
virCapabilitiesDefaultGuestEmulator
(
caps
,
def
->
os
.
type
,
def
->
os
.
arch
,
type
);
if
(
emulator
&&
!
(
def
->
emulator
=
strdup
(
emulator
)))
{
virDomainReportError
(
conn
,
VIR_ERR_NO_MEMORY
,
NULL
);
goto
error
;
}
}
/* analysis of the disk devices */
if
((
n
=
virXPathNodeSet
(
conn
,
"./devices/disk"
,
ctxt
,
&
nodes
))
<
0
)
{
...
...
@@ -3449,4 +3431,33 @@ int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk,
return
0
;
}
const
char
*
virDomainDefDefaultEmulator
(
virConnectPtr
conn
,
virDomainDefPtr
def
,
virCapsPtr
caps
)
{
const
char
*
type
;
const
char
*
emulator
;
type
=
virDomainVirtTypeToString
(
def
->
virtType
);
if
(
!
type
)
{
virDomainReportError
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"unknown virt type"
));
return
NULL
;
}
emulator
=
virCapabilitiesDefaultGuestEmulator
(
caps
,
def
->
os
.
type
,
def
->
os
.
arch
,
type
);
if
(
!
emulator
)
{
virDomainReportError
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"no emulator for domain %s os type %s on architecture %s"
),
type
,
def
->
os
.
type
,
def
->
os
.
arch
);
return
NULL
;
}
return
emulator
;
}
#endif
/* ! PROXY */
src/domain_conf.h
浏览文件 @
126d3ebe
...
...
@@ -562,6 +562,11 @@ int virDiskNameToBusDeviceIndex(virDomainDiskDefPtr disk,
virDomainNetDefPtr
virDomainNetDefParseXML
(
virConnectPtr
conn
,
xmlNodePtr
node
);
const
char
*
virDomainDefDefaultEmulator
(
virConnectPtr
conn
,
virDomainDefPtr
def
,
virCapsPtr
caps
);
VIR_ENUM_DECL
(
virDomainVirt
)
VIR_ENUM_DECL
(
virDomainBoot
)
VIR_ENUM_DECL
(
virDomainFeature
)
...
...
src/lxc_driver.c
浏览文件 @
126d3ebe
...
...
@@ -623,6 +623,8 @@ static int lxcControllerStart(virConnectPtr conn,
int
status
;
fd_set
keepfd
;
char
appPtyStr
[
30
];
const
char
*
emulator
;
lxc_driver_t
*
driver
=
conn
->
privateData
;
FD_ZERO
(
&
keepfd
);
...
...
@@ -650,7 +652,13 @@ static int lxcControllerStart(virConnectPtr conn,
snprintf
(
appPtyStr
,
sizeof
(
appPtyStr
),
"%d"
,
appPty
);
ADD_ARG_LIT
(
vm
->
def
->
emulator
);
emulator
=
vm
->
def
->
emulator
;
if
(
!
emulator
)
emulator
=
virDomainDefDefaultEmulator
(
conn
,
vm
->
def
,
driver
->
caps
);
if
(
!
emulator
)
return
-
1
;
ADD_ARG_LIT
(
emulator
);
ADD_ARG_LIT
(
"--name"
);
ADD_ARG_LIT
(
vm
->
def
->
name
);
ADD_ARG_LIT
(
"--console"
);
...
...
src/qemu_conf.c
浏览文件 @
126d3ebe
...
...
@@ -728,6 +728,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
int
disableKQEMU
=
0
;
int
qargc
=
0
,
qarga
=
0
;
const
char
**
qargv
=
NULL
;
const
char
*
emulator
;
uname
(
&
ut
);
...
...
@@ -783,6 +784,11 @@ int qemudBuildCommandLine(virConnectPtr conn,
snprintf
(
memory
,
sizeof
(
memory
),
"%lu"
,
vm
->
def
->
memory
/
1024
);
snprintf
(
vcpus
,
sizeof
(
vcpus
),
"%lu"
,
vm
->
def
->
vcpus
);
emulator
=
vm
->
def
->
emulator
;
if
(
!
emulator
)
emulator
=
virDomainDefDefaultEmulator
(
conn
,
vm
->
def
,
driver
->
caps
);
if
(
!
emulator
)
return
-
1
;
ADD_ARG_LIT
(
vm
->
def
->
emulator
);
ADD_ARG_LIT
(
"-S"
);
...
...
src/qemu_driver.c
浏览文件 @
126d3ebe
...
...
@@ -850,6 +850,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
int
ntapfds
=
0
;
unsigned
int
qemuCmdFlags
;
fd_set
keepfd
;
const
char
*
emulator
;
FD_ZERO
(
&
keepfd
);
...
...
@@ -909,24 +910,30 @@ static int qemudStartVMDaemon(virConnectPtr conn,
return
-
1
;
}
emulator
=
vm
->
def
->
emulator
;
if
(
!
emulator
)
emulator
=
virDomainDefDefaultEmulator
(
conn
,
vm
->
def
,
driver
->
caps
);
if
(
!
emulator
)
return
-
1
;
/* Make sure the binary we are about to try exec'ing exists.
* Technically we could catch the exec() failure, but that's
* in a sub-process so its hard to feed back a useful error
*/
if
(
stat
(
vm
->
def
->
emulator
,
&
sb
)
<
0
)
{
if
(
stat
(
emulator
,
&
sb
)
<
0
)
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"Cannot find QEMU binary %s: %s"
),
vm
->
def
->
emulator
,
emulator
,
strerror
(
errno
));
return
-
1
;
}
if
(
qemudExtractVersionInfo
(
vm
->
def
->
emulator
,
if
(
qemudExtractVersionInfo
(
emulator
,
NULL
,
&
qemuCmdFlags
)
<
0
)
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_INTERNAL_ERROR
,
_
(
"Cannot determine QEMU argv syntax %s"
),
vm
->
def
->
emulator
);
emulator
);
return
-
1
;
}
...
...
src/xm_internal.c
浏览文件 @
126d3ebe
...
...
@@ -785,26 +785,6 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
if
(
xenXMConfigCopyStringOpt
(
conn
,
conf
,
"device_model"
,
&
def
->
emulator
)
<
0
)
goto
cleanup
;
if
(
def
->
emulator
==
NULL
)
{
const
char
*
type
=
virDomainVirtTypeToString
(
def
->
virtType
);
if
(
!
type
)
{
xenXMError
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"unknown virt type"
));
goto
cleanup
;
}
const
char
*
emulator
=
virCapabilitiesDefaultGuestEmulator
(
priv
->
caps
,
def
->
os
.
type
,
def
->
os
.
arch
,
type
);
if
(
!
emulator
)
{
xenXMError
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"unsupported guest type"
));
goto
cleanup
;
}
if
(
!
(
def
->
emulator
=
strdup
(
emulator
)))
goto
no_memory
;
}
list
=
virConfGetValue
(
conf
,
"disk"
);
if
(
list
&&
list
->
type
==
VIR_CONF_LIST
)
{
list
=
list
->
list
;
...
...
tests/xmconfigdata/test-paravirt-net-e1000.xml
浏览文件 @
126d3ebe
...
...
@@ -13,7 +13,6 @@
<on_reboot>
restart
</on_reboot>
<on_crash>
restart
</on_crash>
<devices>
<emulator>
/usr/lib/xen/bin/qemu-dm
</emulator>
<disk
type=
'block'
device=
'disk'
>
<driver
name=
'phy'
/>
<source
dev=
'/dev/HostVG/XenGuest1'
/>
...
...
tests/xmconfigdata/test-paravirt-new-pvfb.xml
浏览文件 @
126d3ebe
...
...
@@ -13,7 +13,6 @@
<on_reboot>
restart
</on_reboot>
<on_crash>
restart
</on_crash>
<devices>
<emulator>
/usr/lib/xen/bin/qemu-dm
</emulator>
<disk
type=
'block'
device=
'disk'
>
<driver
name=
'phy'
/>
<source
dev=
'/dev/HostVG/XenGuest1'
/>
...
...
tests/xmconfigdata/test-paravirt-old-pvfb.xml
浏览文件 @
126d3ebe
...
...
@@ -13,7 +13,6 @@
<on_reboot>
restart
</on_reboot>
<on_crash>
restart
</on_crash>
<devices>
<emulator>
/usr/lib/xen/bin/qemu-dm
</emulator>
<disk
type=
'block'
device=
'disk'
>
<driver
name=
'phy'
/>
<source
dev=
'/dev/HostVG/XenGuest1'
/>
...
...
tests/xml2sexprdata/xml2sexpr-fv-kernel.xml
浏览文件 @
126d3ebe
...
...
@@ -14,6 +14,7 @@
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<emulator>
/usr/lib/xen/bin/qemu-dm
</emulator>
<disk
type=
'file'
device=
'disk'
>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
/>
...
...
tests/xml2sexprdata/xml2sexpr-pv-vfb-new.sexpr
浏览文件 @
126d3ebe
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')(device_model '/usr/lib/xen/bin/qemu-dm')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))(device (vfb (type vnc)(vncunused 0)(vncdisplay 6)(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja'))))
\ No newline at end of file
(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w')))(device (vkbd))(device (vfb (type vnc)(vncunused 0)(vncdisplay 6)(vnclisten '127.0.0.1')(vncpasswd '123456')(keymap 'ja'))))
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录