Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
b02c0455
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看板
提交
b02c0455
编写于
4月 01, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix localtime handling for newer XenD
上级
e4c65831
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
87 addition
and
4 deletion
+87
-4
ChangeLog
ChangeLog
+16
-0
src/xend_internal.c
src/xend_internal.c
+10
-0
src/xm_internal.c
src/xm_internal.c
+3
-3
tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
+2
-0
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
+27
-0
tests/sexpr2xmltest.c
tests/sexpr2xmltest.c
+1
-0
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
+1
-1
tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
+1
-0
tests/xml2sexprdata/xml2sexpr-pv-localtime.xml
tests/xml2sexprdata/xml2sexpr-pv-localtime.xml
+25
-0
tests/xml2sexprtest.c
tests/xml2sexprtest.c
+1
-0
未找到文件。
ChangeLog
浏览文件 @
b02c0455
Wed Apr 1 11:36:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Fix localtime handling for new XenD
* src/xend_internal.c: Update SEXPR for new location of
(localtime 1) field.
* src/xm_internal.c: Read localtime=1 param for PV guests
too
* tests/xml2sexprtest.c, tests/sexpr2xmltest.c: Add testing
of new (localtime 1) handling
* tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr,
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml,
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr,
tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr,
tests/xml2sexprdata/xml2sexpr-pv-localtime.xml: Data files
for extended tests
Wed Apr 1 11:27:22 BST 2009 Daniel P. Berrange <berrange@redhat.com>
Misc fixes uncovered from OOM testing
...
...
src/xend_internal.c
浏览文件 @
b02c0455
...
...
@@ -2293,10 +2293,15 @@ xenDaemonParseSxpr(virConnectPtr conn,
if
(
sexpr_int
(
root
,
"domain/image/hvm/pae"
))
def
->
features
|=
(
1
<<
VIR_DOMAIN_FEATURE_PAE
);
/* Old XenD only allows localtime here for HVM */
if
(
sexpr_int
(
root
,
"domain/image/hvm/localtime"
))
def
->
localtime
=
1
;
}
/* Current XenD allows localtime here, for PV and HVM */
if
(
sexpr_int
(
root
,
"domain/localtime"
))
def
->
localtime
=
1
;
if
(
sexpr_node_copy
(
root
,
hvm
?
"domain/image/hvm/device_model"
:
"domain/image/linux/device_model"
,
...
...
@@ -5375,6 +5380,10 @@ xenDaemonFormatSxpr(virConnectPtr conn,
}
virBufferVSprintf
(
&
buf
,
"(on_crash '%s')"
,
tmp
);
/* Set localtime here for current XenD (both PV & HVM) */
if
(
def
->
localtime
)
virBufferAddLit
(
&
buf
,
"(localtime 1)"
);
if
(
!
def
->
os
.
bootloader
)
{
if
(
STREQ
(
def
->
os
.
type
,
"hvm"
))
hvm
=
1
;
...
...
@@ -5490,6 +5499,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferAddLit
(
&
buf
,
"(serial none)"
);
}
/* Set localtime here to keep old XenD happy for HVM */
if
(
def
->
localtime
)
virBufferAddLit
(
&
buf
,
"(localtime 1)"
);
...
...
src/xm_internal.c
浏览文件 @
b02c0455
...
...
@@ -817,10 +817,10 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
goto
cleanup
;
else
if
(
val
)
def
->
features
|=
(
1
<<
VIR_DOMAIN_FEATURE_APIC
);
if
(
xenXMConfigGetBool
(
conn
,
conf
,
"localtime"
,
&
def
->
localtime
,
0
)
<
0
)
goto
cleanup
;
}
if
(
xenXMConfigGetBool
(
conn
,
conf
,
"localtime"
,
&
def
->
localtime
,
0
)
<
0
)
goto
cleanup
;
if
(
xenXMConfigCopyStringOpt
(
conn
,
conf
,
"device_model"
,
&
def
->
emulator
)
<
0
)
goto
cleanup
;
...
...
tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
0 → 100644
浏览文件 @
b02c0455
(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(localtime 1)(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'))))
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
0 → 100644
浏览文件 @
b02c0455
<domain
type=
'xen'
id=
'6'
>
<name>
pvtest
</name>
<uuid>
596a5d21-71f4-8fb2-e068-e2386a5c413e
</uuid>
<memory>
430080
</memory>
<currentMemory>
430080
</currentMemory>
<vcpu>
2
</vcpu>
<os>
<type>
linux
</type>
<kernel>
/var/lib/xen/vmlinuz.2Dn2YT
</kernel>
<initrd>
/var/lib/xen/initrd.img.0u-Vhq
</initrd>
<cmdline>
method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os
</cmdline>
</os>
<clock
offset=
'localtime'
/>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
destroy
</on_reboot>
<on_crash>
destroy
</on_crash>
<devices>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'file'
/>
<source
file=
'/root/some.img'
/>
<target
dev=
'xvda'
bus=
'xen'
/>
</disk>
<console
type=
'pty'
>
<target
port=
'0'
/>
</console>
</devices>
</domain>
tests/sexpr2xmltest.c
浏览文件 @
b02c0455
...
...
@@ -144,6 +144,7 @@ mymain(int argc, char **argv)
DO_TEST
(
"net-e1000"
,
"net-e1000"
,
2
);
DO_TEST
(
"bridge-ipaddr"
,
"bridge-ipaddr"
,
3
);
DO_TEST
(
"no-source-cdrom"
,
"no-source-cdrom"
,
2
);
DO_TEST
(
"pv-localtime"
,
"pv-localtime"
,
2
);
DO_TEST
(
"fv-utc"
,
"fv-utc"
,
1
);
DO_TEST
(
"fv-localtime"
,
"fv-localtime"
,
1
);
...
...
tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
浏览文件 @
b02c0455
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(localtime 1)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(localtime 1)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
0 → 100644
浏览文件 @
b02c0455
(vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)(uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(device (tap (dev 'xvda:disk')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))(device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')(script 'vif-bridge'))))
\ No newline at end of file
tests/xml2sexprdata/xml2sexpr-pv-localtime.xml
0 → 100644
浏览文件 @
b02c0455
<domain
type=
'xen'
id=
'5'
>
<name>
rhel5
</name>
<uuid>
4f77abd2301958e83bab6fbf2118f880
</uuid>
<bootloader>
/usr/bin/pygrub
</bootloader>
<memory>
394240
</memory>
<currentMemory>
179200
</currentMemory>
<vcpu>
1
</vcpu>
<on_poweroff>
destroy
</on_poweroff>
<on_reboot>
restart
</on_reboot>
<on_crash>
restart
</on_crash>
<clock
offset=
'localtime'
/>
<devices>
<interface
type=
'bridge'
>
<source
bridge=
'xenbr0'
/>
<mac
address=
'00:16:3e:1d:06:15'
/>
<script
path=
'vif-bridge'
/>
</interface>
<disk
type=
'file'
device=
'disk'
>
<driver
name=
'tap'
type=
'aio'
/>
<source
file=
'/xen/rhel5.img'
/>
<target
dev=
'xvda:disk'
/>
</disk>
<graphics
type=
'vnc'
port=
'5905'
/>
</devices>
</domain>
tests/xml2sexprtest.c
浏览文件 @
b02c0455
...
...
@@ -129,6 +129,7 @@ mymain(int argc, char **argv)
DO_TEST
(
"net-e1000"
,
"net-e1000"
,
"pvtest"
,
2
);
DO_TEST
(
"bridge-ipaddr"
,
"bridge-ipaddr"
,
"pvtest"
,
2
);
DO_TEST
(
"no-source-cdrom"
,
"no-source-cdrom"
,
"test"
,
2
);
DO_TEST
(
"pv-localtime"
,
"pv-localtime"
,
"pvtest"
,
1
);
DO_TEST
(
"fv-utc"
,
"fv-utc"
,
"fvtest"
,
1
);
DO_TEST
(
"fv-localtime"
,
"fv-localtime"
,
"fvtest"
,
1
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录