Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
169 changes: 169 additions & 0 deletions libvirt/tests/cfg/storage/virsh_pool_vol.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
- virsh.pool_vol:
type = virsh_pool_vol
vms = ''
main_vm = ''
start_vm = no
vol_capacity = "10G"
status_error = "no"
test_attach = "no"
at_options = "--live"
dt_options = "--live"
test_attach_device = "no"
ad_options = ""
dd_options = ""
disk_bus = "virtio"
disk_slot = "0x09"

variants:
- dirpool:
pool_name = "dirpool"
pool_type = "dir"
pool_target = "/var/lib/libvirt/images/dirpool"
variants:
- vol_qcow2:
vol_name = "vol1.qcow2"
vol_format = "qcow2"
- vol_raw:
vol_name = "vol1.raw"
vol_format = "raw"
- attach_disk_qcow2:
vol_name = "vol1.qcow2"
vol_format = "qcow2"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"
- attach_disk_raw:
vol_name = "vol1.raw"
vol_format = "raw"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"

- attach_device_xml_qcow2:
vol_name = "dir-vol1.qcow2"
vol_format = "qcow2"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- attach_device_xml_raw:
vol_name = "dir-vol1.raw"
vol_format = "raw"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- fspool:
pool_name = "fspool"
pool_type = "fs"
pool_source_format = "ext4"
pool_target = "/mnt/fs-pool"
vol_capacity = "20G"
variants:
- vol_qcow2:
vol_name = "fsv1.qcow2"
vol_format = "qcow2"
- vol_raw:
vol_name = "fsv1.raw"
vol_format = "raw"

- attach_disk_qcow2:
vol_name = "fsv1.qcow2"
vol_format = "qcow2"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"
- attach_disk_raw:
vol_name = "fsv1.raw"
vol_format = "raw"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"

- attach_device_xml_qcow2:
vol_name = "fs-vol1.qcow2"
vol_format = "qcow2"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- attach_device_xml_raw:
vol_name = "fs-vol1.raw"
vol_format = "raw"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- defaultpool:
pool_name = "defaultpool"
pool_type = "dir"
pool_target = "/var/lib/libvirt/images/defaultpool"
variants:
- vol_qcow2:
vol_name = "def-vol1.qcow2"
vol_format = "qcow2"
- vol_raw:
vol_name = "def-vol1.raw"
vol_format = "raw"
- attach_disk_qcow2:
vol_name = "def-vol1.qcow2"
vol_format = "qcow2"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"
- attach_disk_raw:
vol_name = "def-vol1.raw"
vol_format = "raw"
test_attach = "yes"
start_vm = yes
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdh"

- attach_device_xml_qcow2:
vol_name = "def-vol1.qcow2"
vol_format = "qcow2"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"

- attach_device_xml_raw:
vol_name = "def-vol1.raw"
vol_format = "raw"
test_attach_device = "yes"
start_vm = no
vms = avocado-vt-vm1
main_vm = avocado-vt-vm1
disk_target = "vdb"
disk_bus = "virtio"
disk_slot = "0x09"
25 changes: 25 additions & 0 deletions libvirt/tests/cfg/virsh_cmd/domain/virsh_attach_detach_disk.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,37 @@
at_dt_disk_serial = "test"
at_dt_disk_at_options = "--driver qemu --config"
at_dt_disk_pre_vm_state = "shut off"
- vm_running_live:
at_dt_disk_at_options = "--driver qemu --subdriver raw --live"
at_dt_disk_dt_options = "--live"
at_dt_disk_detach_after_attach = "yes"
- vm_running_config:
at_dt_disk_at_options = "--driver qemu --subdriver raw --config"
at_dt_disk_dt_options = "--config"
at_dt_disk_detach_after_attach = "yes"
- vm_shutdown_persistent:
at_dt_disk_at_options = "--driver qemu --subdriver raw --persistent --cache writeback"
at_dt_disk_dt_options = "--persistent"
at_dt_disk_pre_vm_state = "shut off"
- vm_running_persistent:
at_dt_disk_at_options = "--driver qemu --subdriver raw --persistent --cache writethrough"
at_dt_disk_dt_options = "--persistent"
at_dt_disk_detach_after_attach = "yes"
- vm_running_live_qcow2:
at_dt_disk_at_options = "--driver qemu --subdriver qcow2 --live"
at_dt_disk_dt_options = "--live"
at_dt_disk_device_source_format = "qcow2"
at_dt_disk_detach_after_attach = "yes"
- vm_running_config_qcow2:
at_dt_disk_at_options = "--driver qemu --subdriver qcow2 --config"
at_dt_disk_dt_options = "--config"
at_dt_disk_device_source_format = "qcow2"
at_dt_disk_detach_after_attach = "yes"
- vm_running_persistent_qcow2:
at_dt_disk_at_options = "--driver qemu --subdriver qcow2 --persistent"
at_dt_disk_dt_options = "--persistent"
at_dt_disk_device_source_format = "qcow2"
at_dt_disk_detach_after_attach = "yes"
- twice_diff_target:
at_dt_disk_test_twice = 'yes'
at_dt_disk_device_target2 = vdx
Expand Down Expand Up @@ -224,6 +245,10 @@
- file_disk_type:
- block_disk_type:
at_dt_disk_iscsi_device = "yes"
- block_disk_type_by_id:
at_dt_disk_use_disk_by_id = "yes"
at_dt_disk_skip_iscsi_setup = "yes"
at_dt_disk_detach_after_attach = "yes"
- block_disk_type_lun:
at_dt_disk_at_options = "--driver qemu --rawio --type lun"
at_dt_disk_iscsi_device = "yes"
Expand Down
99 changes: 98 additions & 1 deletion libvirt/tests/cfg/virsh_cmd/domain/virsh_attach_device.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
variants:
- persistent:
vadu_extra = "--persistent"
- config:
# Test --config flag on running VM
vadu_config_option = "yes"
# Functional check should fail before rebooting
vadu_preboot_function_error = "yes"
- live_config:
# Avoid driver-dependant default behavior
vadu_extra = "--live"
Expand Down Expand Up @@ -250,6 +255,66 @@
vadu_dev_obj_alias_Controller = "ua-controller"
- block:
vadu_dev_objs = "VirtualDiskBasic"
variants:
- block_attach_detach_disk_qcow2:
only single_virtio_file
no cold_attach_hot_vm
no cold_attach_cold_vm
no with_alias
no id_ref
no uuid_ref
no error_test
no file_argument
no domain_argument
no hot_attach_hot_vm_current
#type = virsh_attach_device
#start_vm = "yes"
#status_error = "no"
vadu_preboot_function_error = "no"
vadu_pstboot_function_error = "no"
#vadu_dom_ref = "name"
#vadu_domain_positional = "yes"
#vadu_file_positional = "yes"
vadu_dev_objs = "VirtualDiskQcow2Raw"
vadu_dev_obj_testdetach_VirtualDiskQcow2Raw = "yes"
vadu_dev_obj_alias_VirtualDiskQcow2Raw = "ua-virtualdisk-fmt"
vadu_dev_obj_meg_VirtualDiskQcow2Raw = 100
vadu_dev_obj_devidx_VirtualDiskQcow2Raw = 1
vadu_dev_obj_targetbus_VirtualDiskQcow2Raw = "virtio"
vadu_dev_obj_count_VirtualDiskQcow2Raw = 1
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "qcow2"
config:
vadu_preboot_function_error = "yes"
- block_attach_detach_disk_raw:
only single_virtio_file
no cold_attach_hot_vm
no cold_attach_cold_vm
no with_alias
no id_ref
no uuid_ref
no error_test
no file_argument
no domain_argument
no hot_attach_hot_vm_current
#type = virsh_attach_device
#start_vm = "yes"
#status_error = "no"
vadu_preboot_function_error = "no"
vadu_pstboot_function_error = "no"
#vadu_config_option = "no"
#vadu_dom_ref = "name"
#vadu_domain_positional = "yes"
#vadu_file_positional = "yes"
vadu_dev_objs = "VirtualDiskQcow2Raw"
vadu_dev_obj_testdetach_VirtualDiskQcow2Raw = "yes"
vadu_dev_obj_alias_VirtualDiskQcow2Raw = "ua-virtualdisk-fmt"
vadu_dev_obj_meg_VirtualDiskQcow2Raw = 100
vadu_dev_obj_devidx_VirtualDiskQcow2Raw = 1
vadu_dev_obj_targetbus_VirtualDiskQcow2Raw = "virtio"
vadu_dev_obj_count_VirtualDiskQcow2Raw = 1
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "raw"
config:
vadu_preboot_function_error = "yes"
variants:
- without_alias:
- with_alias:
Expand Down Expand Up @@ -284,7 +349,39 @@
# Avoid running out of PCI slots on hot-attach
vadu_dev_obj_count_VirtualDiskBasic = 16
vadu_dev_obj_meg_VirtualDiskBasic = 10
vadu_dev_obj_targetbus_VirtualDiskBasic = "virtio"
- block_attach_detach_disk_formats:
# Test block device attach+detach with qcow2 and raw disk formats
# Uses join to bypass parent variant multiplication
join domain_positional file_positional normal_test name_ref
start_vm = "yes"
status_error = "no"
vadu_preboot_function_error = "no"
vadu_pstboot_function_error = "no"
vadu_config_option = "no"
vadu_dom_ref = "name"
vadu_domain_positional = "yes"
vadu_file_positional = "yes"
vadu_dev_objs = "VirtualDiskQcow2Raw"
vadu_dev_obj_testdetach_VirtualDiskQcow2Raw = "yes"
vadu_dev_obj_alias_VirtualDiskQcow2Raw = "ua-virtualdisk-fmt"
vadu_dev_obj_meg_VirtualDiskQcow2Raw = 100
vadu_dev_obj_devidx_VirtualDiskQcow2Raw = 1
vadu_dev_obj_targetbus_VirtualDiskQcow2Raw = "virtio"
vadu_dev_obj_count_VirtualDiskQcow2Raw = 1
variants disk_format:
- qcow2:
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "qcow2"
- raw:
vadu_dev_obj_diskformat_VirtualDiskQcow2Raw = "raw"
variants attach_flags:
- persistent:
vadu_extra = "--persistent"
- config:
vadu_config_option = "yes"
vadu_preboot_function_error = "yes"
- live_config:
vadu_extra = "--live"
vadu_config_option = "yes"
- multiple:
variants:
- VirtualDiskBasic_SerialFile_SerialPipe:
Expand Down
Loading