- qemu_guest_agent: install setup image_copy unattended_install.cdrom single_driver_install.with_vioserial only Fedora, RHEL, Windows no Fedora.8, Fedora.9, Fedora.10, Fedora.11, Fedora.12, Fedora.13, Fedora.14, Fedora.15 type = qemu_guest_agent gagent_name = "org.qemu.guest_agent.0" gagent_install_cmd = "yum install -y qemu-guest-agent" gagent_start_cmd = "systemctl start qemu-guest-agent.service" gagent_restart_cmd = "systemctl restart qemu-guest-agent.service" gagent_stop_cmd = "systemctl stop qemu-guest-agent.service" gagent_status_cmd = "systemctl status qemu-guest-agent.service" gagent_pkg_check_cmd = "rpm -q qemu-guest-agent" black_list_change_cmd = "sed -i 's/%s//g' /etc/sysconfig/qemu-ga" black_list_check_cmd = "grep -nr 'BLACKLIST_RPC=.*%s' /etc/sysconfig/qemu-ga" #only for rhel8,virt module stream is rhel or 8.1,8.2,8.3 and so on virt_module_stream = rhel # Please update your file share web server url before test download_root_url = Windows: gagent_src_type = url cdroms += " virtio" cdrom_virtio = isos/windows/virtio-win.iso ga_username = "Administrator" i386: qemu_ga_pkg = qemu-ga-x86.msi x86_64: qemu_ga_pkg = qemu-ga-x64.msi gagent_host_path = "/tmp/${qemu_ga_pkg}" gagent_download_cmd = "wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-qemu-ga/${qemu_ga_pkg} -O ${gagent_host_path}" gagent_guest_dir = "C:\qemu-ga" gagent_install_cmd = "start /wait %s /quiet" gagent_uninstall_cmd = wmic product where name='Qemu guest agent' call uninstall gagent_start_cmd = "net start qemu-ga" gagent_restart_cmd = "service qemu-ga restart" gagent_stop_cmd = "net stop qemu-ga" gagent_status_cmd = sc query qemu-ga |findstr "RUNNING" gagent_pkg_check_cmd = wmic product get name |findstr "QEMU guest agent" gagent_remove_service_cmd = "net stop qemu-ga & del /f C:\qemu-ga\${qemu_ga_pkg} & echo done" RHEL.6: gagent_start_cmd = "service qemu-ga start" gagent_stop_cmd = "service qemu-ga stop" gagent_status_cmd = "service qemu-ga status" gagent_restart_cmd = "service qemu-ga restart" variants: - gagent_install: gagent_check_type = install - gagent_install_uninstall: only Windows gagent_check_type = install_uninstall repeat_times = 50 - gagent_stop_start: no isa_serial gagent_check_type = stop_start repeat_times = 100 - gagent_pkg_update: only Windows type = qemu_guest_agent_update gagent_check_type = pkg_update monitor_type = qmp start_vm = no image_snapshot = yes cdrom_virtio_downgrade = isos/windows/virtio-win-downgrade.iso qga_url = "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-qemu-ga" qga_pattern = "qemu-ga-win-\d\.\d\.\d-\d.el\dev" variants: - @default: - without_driver: driver_uninstall = yes driver_name = vioser device_name = "VirtIO Serial Driver" - check_sync: gagent_check_type = sync - check_powerdown: gagent_check_type = powerdown - check_reboot: gagent_check_type = reboot # This config would be overriden in guest-os.cfg. gagent_guest_reboot_pattern = "Restarting system" Windows: gagent_guest_reboot_pattern = "" - check_halt: gagent_check_type = halt # This config would be overriden in guest-os.cfg. gagent_guest_shutdown_pattern = "System halted" Windows: gagent_guest_shutdown_pattern = "" - check_sync_delimited: gagent_check_type = sync_delimited - check_set_user_password: gagent_check_type = set_user_password image_snapshot = yes variants: - no_crypto: new_password = "Abc_123" - crypto: no Windows new_password = "123456" crypted = "yes" - check_get_vcpus: gagent_check_type = get_vcpus get_cpu_cmd = "lscpu |awk -F: '/^CPU\(s\)/{print $2}'" Windows: get_cpu_cmd = 'wmic cpu get NumberOfCores|findstr /r "[0-9]"' - check_set_vcpus: no Windows gagent_check_type = set_vcpus - check_set_mem_blocks: no Windows gagent_check_type = set_mem_blocks - check_get_time: gagent_check_type = get_time get_guest_time_cmd = `command -v python python3 | head -1` -c "import time; print(int(time.time()))" Windows: get_guest_time_cmd = python2.7 -c "import time; print(int(time.time()))" - check_memory_leak: only Windows gagent_check_type = memory_leak repeats = 1000000 test_command = guest-info memory_usage_cmd = "tasklist | findstr /I qemu-ga.exe" - check_set_time: image_snapshot = yes gagent_check_type = set_time get_guest_time_cmd = `command -v python python3 | head -1` -c "import time; print(int(time.time()))" Windows: get_guest_time_cmd = python2.7 -c "import time; print(int(time.time()))" move_time_cmd = "date --rfc-3339=seconds --utc; date --set='now - 1 week' > /dev/null; date --rfc-3339=seconds --utc" - check_time_sync: only Windows gagent_check_type = time_sync image_snapshot = yes rtc_drift = none get_guest_time_cmd = python2.7 -c "import time; print(int(time.time()))" time_service_config = w32tm /config /manualpeerlist:"clock.redhat.com" /syncfromflags:manual /reliable:yes /update time_service_status_cmd = sc query w32time |findstr "RUNNING" time_service_stop_cmd = net stop w32time time_service_start_cmd = net start w32time pause_time = 180 - check_fstrim: gagent_check_type = fstrim start_vm = no disk_size = 1024 pre_command = "set -e; modprobe -r scsi_debug; modprobe scsi_debug dev_size_mb=${disk_size} lbpws=1; set +e" post_command = "modprobe -r scsi_debug" mount_point = "/var/test" mount_disk_cmd = "mkdir -p ${mount_point} && mount -o discard DISK ${mount_point}" format_disk_cmd = "yes|mkfs.ext4 DISK" write_disk_cmd = "dd if=/dev/zero of=${mount_point}/file bs=1M count=800 oflag=direct" delete_file_cmd = "rm ${mount_point}/file -f; sync" Windows: # for windows guest, only support win8+ no Win7,Win2008 start_vm = yes driver_name = vioscsi images += " stg" image_name_stg = "images/storage" image_format_stg = "qcow2" image_size_stg = 5G drv_extra_params = "discard=on" force_create_image_stg = yes remove_image_stg = yes delete_file_cmd = "del /f /q" - check_get_interfaces: gagent_check_type = get_interfaces image_snapshot = yes - check_fsfreeze: gagent_fs_test_cmd = "rm -f /tmp/foo; echo foo > /tmp/foo" Windows: gagent_fs_test_cmd = "echo 'fsfreeze test' > C:\test_file.txt" write_cmd_timeout = 8 variants: - @default: gagent_check_type = fsfreeze - vss_test: only Windows gagent_check_type = fsfreeze_vss_test gagent_fs_test_cmd = "start /b WIN_UTILS:\fsfreeze-write.py" freeze_timeout = 10 - check_reboot_shutdown_fsfreeze: gagent_check_type = reboot_shutdown - check_snapshot: type = qemu_guest_agent_snapshot gagent_check_type = fsfreeze - check_suspend: type = qemu_guest_agent_suspend services_up_timeout = 30 extra_params += " -global PIIX4_PM.disable_s3=0" extra_params += " -global PIIX4_PM.disable_s4=0" # params: s3_support_chk_cmd, s3_bg_program_setup_cmd, # s3_bg_program_chk_cmd, s3_bg_program_kill_cmd, s3_log_chk_cmd, # s3_start_cmd, s4_support_chk_cmd, s4_bg_program_setup_cmd, # s4_bg_program_chk_cmd, s4_bg_program_kill_cmd, s4_log_chk_cmd, # s4_start_cmd and services_up_timeout are set in guest-os.cfg Windows: # Windows guest only works with qxl driver. vga = "qxl" - check_guest_file: file_path = "/tmp/" cmd_read = "cat" black_list = "guest-file-[a-zA-Z]*" cmd_del = "rm -rf" Windows: file_path = "C:\" cmd_read = "type" cmd_del = "del /f /q" variants: - seek: gagent_check_type = file_seek - write: gagent_check_type = file_write - read: gagent_check_type = file_read - with_fsfreeze: gagent_check_type = with_fsfreeze - with_selinux: no Windows gagent_check_type = with_selinux - check_guest_exec: gagent_check_type = guest_exec black_list = "guest-exec guest-exec-status" guest_cmd = "echo" guest_cmd_args = "This is a test." guest_cmd_timeout = 60 Windows: guest_cmd = "ping" guest_cmd_args = "www.redhat.com -n 2" - check_thaw_unfrozen: gagent_check_type = thaw_unfrozen - check_freeze_frozen: gagent_check_type = freeze_frozen - check_hotplug_frozen: gagent_check_type = hotplug_frozen images += " stg0" boot_drive_stg0 = no image_name_stg0 = images/storage0 image_size_stg0 = 1G force_create_image_stg0 = yes disk_write_cmd = "dd if=/dev/zero of=%s/file bs=1M count=4" Windows: disk_write_cmd = "cd %s:\ && echo test > a.txt" - check_path_fsfreeze_hook: no Windows no RHEL.6, RHEL.7 gagent_check_type = path_fsfreeze_hook cmd_get_help_info = "qemu-ga --help | grep 'fsfreeze-hook' | tail -1" cmd_get_man_page = "export LC_ALL="en_US.UTF-8"; man qemu-ga |col -b > %s" virtio_serial: gagent_start_cmd = "qemu-ga -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 -F -d" isa_serial: gagent_start_cmd = "pgrep qemu-ga || qemu-ga -d -m isa-serial -p /dev/ttyS1 -F" - check_fsfreeze_hook_script: no isa_serial no Windows gagent_check_type = fsfreeze_hook_script image_snapshot = yes - check_fsinfo: gagent_check_type = fsinfo blk_extra_params = "serial=GAGENT_TEST" cmd_get_disk = cat /proc/mounts |grep -v rootfs |awk '$2~/^\%s$/{print $1,$3}' Windows: cmd_get_disk = wmic volume where "DriveLetter='%s'" get FileSystem,DeviceID |findstr /v /i FileSystem - check_nonexistent_cmd: gagent_check_type = nonexistent_cmd wrong_cmd = "system_reset" - check_umount_frozen: gagent_check_type = umount_frozen images += " stg0" image_name_stg0 = images/storage0 image_size_stg0 = 1G force_create_image_stg0 = yes - gagent_check_blacklist: only Linux gagent_check_type = blacklist black_list_change_cmd = "sed -i 's/BLACKLIST_RPC=.*/BLACKLIST_RPC=guest-info/g' /etc/sysconfig/qemu-ga" - gagent_check_log: only isa_serial gagent_check_type = log black_list = "guest-file-[a-zA-Z]*" get_log_cmd = cat /var/log/qemu-ga/qemu-ga.log |grep "read data" tmp_file = "/tmp/qga_test" Windows: get_log_cmd = type c:\qga.log |findstr /c:"read data" tmp_file = "C:\qga_test.txt" - gagent_query_chardev: no isa_serial gagent_check_type = query_chardev - gagent_check_after_init: no Windows gagent_check_type = after_init - gagent_frozen_io: only Windows gagent_check_type = frozen_io iozone_cmd = "start /b for /l %i in (1,1,1000) do " iozone_cmd += "WIN_UTILS:\Iozone\iozone.exe -azR -r 64k -s 1G -M -i 0 -i 1 -b iozone.xls" iozone_cmd += " -f C:\testfile > C:\frozen_io_log.txt" - gagent_vss_status: only Windows gagent_check_type = vss_status - gagent_with_migrate: only virtio_serial gagent_check_type = with_migrate mig_speed = 512M - gagent_user_logoff: only Windows gagent_check_type = user_logoff variants: - virtio_serial: gagent_serial_type = virtio serials += " org.qemu.guest_agent.0" serial_type_org.qemu.guest_agent.0 = "virtserialport" - isa_serial: # isa-serial is only supported on x86 only i386, x86_64 gagent_serial_type = isa serials += " org.qemu.guest_agent.0" gagent_start_cmd = "pgrep qemu-ga || qemu-ga -d -m isa-serial -p /dev/ttyS1 -l /var/log/qemu-ga/qemu-ga.log -v" gagent_status_cmd = "pgrep qemu-ga" gagent_restart_cmd = "pgrep qemu-ga |xargs kill -s 9 && ${gagent_start_cmd}" Windows: gagent_start_cmd = "cd C:\Program Files\Qemu-ga & start /b qemu-ga.exe -m isa-serial -p COM2 -l c:\qga.log -v" gagent_status_cmd = "tasklist |findstr /i /r qemu-ga.exe.*Console" gagent_restart_cmd = "taskkill /f /t /im qemu-ga.exe & ${gagent_start_cmd}"