未验证 提交 d6aa1775 编写于 作者: X Xu Tian 提交者: GitHub

Merge pull request #2085 from aliang123/1800428

Snapshot during guest stop_cont
import logging
from virttest import error_context
from provider.blockdev_snapshot_base import BlockDevSnapshotTest
class BlockdevSnapshotStopContTest(BlockDevSnapshotTest):
@error_context.context_aware
def create_snapshot(self):
error_context.context("do snaoshot during running guest stop_cont",
logging.info)
self.main_vm.pause()
super(BlockdevSnapshotStopContTest, self).create_snapshot()
self.main_vm.resume()
def run(test, params, env):
"""
Backup VM disk test when VM reboot
1) start VM with system disk
2) create target disk with qmp command
3) load stress in guest
4) do snapshot to target disk
5) shutdown VM
6) boot VM with target disk
:param test: test object
:param params: Dictionary with the test parameters
:param env: Dictionary with test environment.
"""
base_image = params.get("images", "image1").split()[0]
params.update(
{"image_name_%s" % base_image: params["image_name"],
"image_format_%s" % base_image: params["image_format"]})
snapshot_stop_cont = BlockdevSnapshotStopContTest(test, params, env)
snapshot_stop_cont.run_test()
- blockdev_snapshot_stop_cont:
type = blockdev_snapshot_stop_cont
virt_test_type = qemu
start_vm = yes
storage_type_default = "directory"
storage_pool = default
snapshot_tag = sn1
image_format_sn1 = qcow2
image_name_sn1 = images/sn1
device = "drive_image1"
base_tag = "image1"
rebase_mode = unsafe
Host_RHEL.m8:
node = "drive_image1"
overlay = "drive_sn1"
qemu_force_use_drive_expression = no
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册