Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
tp-qemu
提交
25c3f93c
T
tp-qemu
项目概览
openeuler
/
tp-qemu
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tp-qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
25c3f93c
编写于
4月 30, 2020
作者:
Y
YongxueHong
提交者:
GitHub
4月 30, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2215 from aliang123/1828140
blockdev_commit_install:commit during guest installation
上级
0a9851fc
8b964b2b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
97 addition
and
0 deletion
+97
-0
qemu/tests/blockdev_commit_install.py
qemu/tests/blockdev_commit_install.py
+57
-0
qemu/tests/cfg/blockdev_commit_install.cfg
qemu/tests/cfg/blockdev_commit_install.cfg
+40
-0
未找到文件。
qemu/tests/blockdev_commit_install.py
0 → 100644
浏览文件 @
25c3f93c
import
time
import
logging
import
random
from
virttest
import
utils_test
from
virttest
import
utils_misc
from
virttest.tests
import
unattended_install
from
provider.blockdev_commit_base
import
BlockDevCommitTest
class
BlockdevCommitInstall
(
BlockDevCommitTest
):
def
configure_system_disk
(
self
,
tag
):
pass
def
run
(
test
,
params
,
env
):
"""
Block commit base Test
1. Install guest
2. create 4 snapshots during guest installation
3. commit snapshot 3 to base
4. installation can be finished after commit
"""
def
tag_for_install
(
vm
,
tag
):
if
vm
.
serial_console
:
serial_output
=
vm
.
serial_console
.
get_output
()
if
tag
in
serial_output
:
return
True
logging
.
info
(
"vm has not started yet"
)
return
False
block_test
=
BlockdevCommitInstall
(
test
,
params
,
env
)
args
=
(
test
,
params
,
env
)
bg
=
utils_test
.
BackgroundTest
(
unattended_install
.
run
,
args
)
bg
.
start
()
if
bg
.
is_alive
():
tag
=
params
.
get
(
"tag_for_install_start"
,
"Starting Login Service"
)
if
utils_misc
.
wait_for
(
lambda
:
tag_for_install
(
block_test
.
main_vm
,
tag
),
240
,
10
,
5
):
logging
.
info
(
"sleep random time before do snapshots"
)
time
.
sleep
(
random
.
randint
(
10
,
120
))
block_test
.
pre_test
()
try
:
block_test
.
commit_snapshots
()
try
:
bg
.
join
(
timeout
=
1200
)
except
Exception
:
raise
reboot_method
=
params
.
get
(
"reboot_method"
,
"system_reset"
)
block_test
.
main_vm
.
reboot
(
method
=
reboot_method
)
finally
:
block_test
.
post_test
()
else
:
test
.
fail
(
"Failed to install guest"
)
else
:
test
.
fail
(
"Installation failed to start"
)
qemu/tests/cfg/blockdev_commit_install.cfg
0 → 100644
浏览文件 @
25c3f93c
- blockdev_commit_install:
type = blockdev_commit_install
virt_test_type = qemu
only Linux
need_install = yes
start_vm = no
image_name_image1 = "images/base_install"
boot_drive_stg = yes
medium = cdrom
installation = cdrom
kernel = vmlinuz
initrd = initrd.img
force_create_image_image1 = yes
image_aio = threads
unattended_delivery_method = cdrom
cdroms += " unattended"
index_enable = no
kill_vm = yes
shutdown_cleanly = no
storage_pools = default
storage_type_default = "directory"
storage_pool = default
snapshot_tags = sn1 sn2 sn3 sn4
image_name_sn1 = sn1
image_format_sn1 = qcow2
image_name_sn2 = sn2
image_format_sn2 = qcow2
image_name_sn3 = sn3
image_format_sn3 = qcow2
image_name_sn4 = sn4
image_format_sn4 = qcow2
device_tag = "image1"
rebase_mode = unsafe
qemu_force_use_drive_expression = no
no RHEL.5 RHEL.6 RHEL.7 RHEL.8.1
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录