Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio_fs_nfs_migration: Virtiofs migration testing over NFS #4190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
5 changes: 3 additions & 2 deletions provider/storage_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,9 @@ def __kill_procs(self, session):
:param session: vm session
:type session: aexpect.client.ShellSession
"""
LOG_JOB.info("Killing all %s processes by force.", self.name)
session.cmd_output(self._kill_pid % self.name, timeout=120)
proc_name = self.name if self.os_type == "linux" else f"{self.name}.exe"
LOG_JOB.info("Killing all %s processes by force.", proc_name)
session.cmd_output(self._kill_pid % proc_name, timeout=120)

def __remove_env_files(self, session, timeout=300):
"""
Expand Down
120 changes: 120 additions & 0 deletions qemu/tests/cfg/virtio_fs_nfs_migration.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
- virtio_fs_nfs_migration:
no RHEL.6 RHEL.7 RHEL.8.0 RHEL.8.1
no Win2008 Win7 Win2012 Win2012..r2 Win8 Win8.1

type = virtio_fs_nfs_migration
virt_test_type = qemu
required_qemu = [9.0.0,)
kill_vm = yes
start_vm = yes
not_preprocess = yes

# local nfs config
setup_local_nfs = yes
export_options = 'rw,insecure,no_root_squash,async'
export_dir = /var/tmp/virtio_fs_test_nfs
nfs_mount_options = rw
nfs_mount_dir = /var/mnt/fs
nfs_mount_dir_targetfs = /var/mnt/targetfs

filesystems = fs
filesystems_migration = targetfs
fs_driver = virtio-fs
fs_source_type = mount
fs_source_dir_fs = ${nfs_mount_dir}
fs_source_dir_targetfs = ${nfs_mount_dir_targetfs}
fs_target = myfs
fs_dest = /mnt/${fs_target}
force_create_fs_source = no
remove_fs_source = no
fs_driver_props = {"queue-size": 1024}
fs_binary_extra_options = ""
fs_binary_extra_options_targetfs = " --modcaps=+dac_read_search"
driver_name = viofs

test_file = test_file
guest_file = "%s/${test_file}"
pre_command = "mkdir -p ${nfs_mount_dir_targetfs} ${nfs_mount_dir} ${export_dir}"
post_command = "rm -rf ${nfs_mount_dir_targetfs} ${nfs_mount_dir} ${export_dir}"
cmd_md5 = 'md5sum %s/${test_file}'
cmd_dd = 'dd if=/dev/urandom of=%s bs=1M count=200 oflag=direct'
fio_name = fiotest_fs
fio_options = '--name=${fio_name} --filename=%s/${test_file}.fio --ioengine=libaio --rw=rw '
fio_options += '--bs=4k --size=1G --runtime=1800 --time_based'
cmd_chk_fio = "ps aux | grep fio | grep ${fio_name} | grep -v grep"

share_mem = yes
vm_mem_share = yes
vm_mem_backend = memory-backend-memfd
Win10.i386:
mem = 4096
!s390, s390x:
mem_devs = mem1
backend_mem_mem1 = memory-backend-memfd
size_mem1 = ${mem}M
use_mem_mem1 = no
guest_numa_nodes = shm0
numa_memdev_shm0 = mem-mem1
numa_nodeid_shm0 = 0
Windows:
# install winfsp tool
i386, i686:
install_winfsp_path = 'C:\Program Files'
devcon_dirname = 'x86'
x86_64:
install_winfsp_path = 'C:\Program Files (x86)'
devcon_dirname = 'amd64'
install_winfsp_cmd = 'msiexec /i WIN_UTILS:\winfsp.msi /qn'
check_installed_cmd = 'dir "%s" |findstr /I winfsp'
viofs_log_file = C:\viofs_log.txt
viofs_svc_name = VirtioFsSvc
viofs_exe_path = C:\virtiofs.exe
viofs_exe_copy_cmd = xcopy %s C:\ /Y
viofs_sc_create_cmd = 'sc create ${viofs_svc_name} binpath=${viofs_exe_path} start=auto'
viofs_sc_create_cmd += ' depend="WinFsp.Launcher/VirtioFsDrv" DisplayName="Virtio FS Service"'
viofs_sc_start_cmd = 'sc start ${viofs_svc_name}'
viofs_sc_query_cmd = 'sc query ${viofs_svc_name}'
viofs_sc_delete_cmd = 'sc delete ${viofs_svc_name}'
debug_log_operation = 'enable'
viofs_debug_enable_cmd = 'reg add HKLM\Software\VirtIO-FS /v DebugFlags /d 0xFFFFFFFF /t REG_DWORD'
viofs_log_enable_cmd = 'reg add HKLM\Software\VirtIO-FS /v DebugLogFile /d ${viofs_log_file} /t REG_SZ'
viofs_debug_delete_cmd = 'reg delete HKLM\Software\VirtIO-FS /v DebugFlags /f'
viofs_log_delete_cmd = 'reg delete HKLM\Software\VirtIO-FS /v DebugLogFile /f'
viofs_reg_query_cmd = 'reg query HKLM\Software\VirtIO-FS'
virtio_win_media_type = iso
cdroms += " virtio"
cmd_md5 = "%s && md5sum.exe ${test_file}"
cmd_dd = 'dd if=/dev/random of=%s bs=1M count=200'
guest_file = "%s\${test_file}"
fio_options = '--name=fiotest --filename=%s\${test_file}.fio --ioengine=windowsaio --rw=rw '
fio_options += '--bs=4k --size=1G --runtime=1800 --time_based --thread'
fio_name = fio.exe
cmd_chk_fio = 'TASKLIST /FI "IMAGENAME eq FIO.EXE'
variants:
- cache_mode_auto:
fs_binary_extra_options += " --cache auto"
fs_binary_extra_options_targetfs += " --cache auto"
- cache_mode_always:
fs_binary_extra_options += " --cache always"
fs_binary_extra_options_targetfs += " --cache always"
- cache_mode_never:
fs_binary_extra_options += " --cache never"
fs_binary_extra_options_targetfs += " --cache never"
- cache_mode_metadata:
fs_binary_extra_options += " --cache metadata"
fs_binary_extra_options_targetfs += " --cache metadata"
variants:
- @default:
- writeback:
only cache_mode_auto cache_mode_always
fs_binary_extra_options += " --writeback"
fs_binary_extra_options_targetfs += " --writeback"
- dio:
only cache_mode_never
fs_binary_extra_options += " --allow-direct-io"
fs_binary_extra_options_targetfs += " --allow-direct-io"
variants:
- file_handles_never:
fs_binary_extra_options += " --inode-file-handles=never --migration-mode=file-handles --modcaps=+dac_read_search"
- file_handles_mandatory:
fs_binary_extra_options += " --inode-file-handles=mandatory --migration-mode=file-handles --modcaps=+dac_read_search"
Loading
Loading