Skip to content

Commit c65a4d3

Browse files
committed
Virtual_disk: add two nvme disk related blockcopy scenarios
Automate case: RHEL-203952 - Blockcopy disk to nvme destination with luks(with usage) RHEL-241215 - Blockcopy disk to nvme destination without luks Signed-off-by: Meina Li <meili@redhat.com>
1 parent d043d25 commit c65a4d3

File tree

2 files changed

+319
-109
lines changed

2 files changed

+319
-109
lines changed

libvirt/tests/cfg/virtual_disks/virtual_disks_nvme.cfg

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
type = virtual_disks_nvme
33
take_regular_screendumps = "no"
44
start_vm = "no"
5-
target_format = "raw"
65
type_name = "nvme"
7-
driver_type = 'raw'
6+
driver_type = "raw"
87
device_type = "disk"
98
target_dev = "vdb"
109
target_bus = "virtio"
@@ -13,7 +12,32 @@
1312
pkgs_host = "pciutils"
1413
variants:
1514
- attach_nvme:
15+
with_attach_detach = "yes"
1616
source_attrs = "{'type':'pci', 'managed':'yes', 'namespace':'1', 'index':'1'}"
17+
- blockcopy_nvme:
18+
only coldplug
19+
disk_type = "file"
20+
nvme_disk_type = "block"
21+
with_blockcopy = "yes"
22+
driver_type = "qcow2"
23+
func_supported_since_libvirt_ver = (6, 3, 0)
24+
disk_dict = {"type_name":"%s", "device": "disk", "target":{"dev": "${target_dev}", "bus": "virtio"}, "driver": {"name": "qemu", "type": "${driver_type}"}}
25+
source_attrs = "{'type':'pci', 'managed':'yes', 'namespace':'1', 'index':'1'}"
26+
blockcopy_common_options = "--transient-job --verbose --wait"
27+
variants:
28+
- finish:
29+
blockcopy_option = "--finish"
30+
- pivot:
31+
blockcopy_option = "--pivot"
32+
variants:
33+
- without_luks:
34+
luks_sec_dict = {"source": {"attrs": {"dev": "%s"}}}
35+
- with_luks:
36+
with_luks = "yes"
37+
sec_volume = "luks"
38+
luks_secret_passwd = "redhat"
39+
luks_extra_parameter = "--object secret,data=${luks_secret_passwd},id=sec0 -o encrypt.format=luks,encrypt.key-secret=sec0"
40+
luks_sec_dict = {"source": {"attrs": {"dev": "%s"}, "encryption": {"attrs": {"format": "luks"}, "encryption": "luks", "secret": {"type": "passphrase", "usage": "${sec_volume}"}}}}
1741
variants:
1842
- coldplug:
1943
virt_device_hotplug = "no"

0 commit comments

Comments
 (0)