提交 24270158 编写于 作者: Z Zhengtong

update qga cmd: set-time, get-time, network-interface, fstrim

上级 be38f2ab
- qemu_guest_agent: install setup image_copy unattended_install.cdrom
- 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 = "rpm -q qemu-guest-agent || yum install -y qemu-guest-agent"
Windows:
gagent_host_dep_install_cmd = "yum install -y mingw32-glib2"
gagent_host_install_cmd = "rpm -q qemu-guest-agent-win32 || rpm --ignorearch -ivh ftp://rpmfind.net/linux/centos/6.4/updates/x86_64/Packages/qemu-guest-agent-win32-0.12.1.2-2.355.el6_4_4.1.x86_64.rpm"
gagent_install_cmd = "net stop qemu-ga & C:\qemu-ga\qemu-ga.exe -s uninstall & C:\qemu-ga\qemu-ga.exe -s install"
gagent_dep_dlls = "/usr/i686-w64-mingw32/sys-root/mingw/bin/libglib-2.0-0.dll"
gagent_dep_dlls += " /usr/i686-w64-mingw32/sys-root/mingw/bin/iconv.dll"
gagent_dep_dlls += " /usr/i686-w64-mingw32/sys-root/mingw/bin/libintl-8.dll"
gagent_dep_dlls += " /usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll"
gagent_host_path = "/usr/share/qemu-kvm/qemu-ga-win32/qemu-ga.exe"
i386:
qemu_ga_pkg = qemu-ga-x86.msi
x86_64:
qemu_ga_pkg = qemu-ga-x64.msi
gagent_download_cmd = "wget https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-qemu-ga/${qemu_ga_pkg} -P /tmp/"
gagent_install_cmd = "C:\qemu-ga\${qemu_ga_pkg} /quiet"
gagent_host_path = "/tmp/${qemu_ga_pkg}"
gagent_guest_dir = "C:\qemu-ga"
gagent_remove_service_cmd = "net stop qemu-ga & del /f C:\qemu-ga\qemu-ga.exe & echo done"
gagent_remove_service_cmd = "net stop qemu-ga & del /f C:\qemu-ga\${qemu_ga_pkg} & echo done"
variants:
- gagent_install:
gagent_check_type = install
......@@ -52,6 +51,29 @@
- check_set_vcpus:
no Windows
gagent_check_type = set_vcpus
- check_get_time:
gagent_check_type = get_time
get_guest_time_cmd = python -c "import time; print int(time.time())"
- check_set_time:
image_snapshot = yes
gagent_check_type = set_time
get_guest_time_cmd = python -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_fstrim:
no Windows
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"
- check_get_interfaces:
no Windows
gagent_check_type = get_interfaces
- check_fsfreeze:
# fsfreeze series commands can't run on windows guest.
no Windows
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册