qemu_guest_agent.cfg 6.1 KB
Newer Older
1
- qemu_guest_agent: install setup image_copy unattended_install.cdrom single_driver_install.with_vioserial
2
    only Fedora, RHEL, Windows
3
    no Fedora.8, Fedora.9, Fedora.10, Fedora.11, Fedora.12, Fedora.13, Fedora.14, Fedora.15
4 5
    type = qemu_guest_agent
    gagent_name = "org.qemu.guest_agent.0"
6 7 8 9
    gagent_install_cmd = "yum install -y qemu-guest-agent"
    gagent_start_cmd = "service qemu-guest-agent start"
    gagent_status_cmd = "service qemu-guest-agent status"
    gagent_pkg_check_cmd = "rpm -q qemu-guest-agent"
10
    Windows:
11
        ga_username = "Administrator"
12
        deps = no
13 14 15 16 17
        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/"
18
        gagent_install_cmd = "start /wait C:\qemu-ga\${qemu_ga_pkg}  /quiet"
19
        gagent_uninstall_cmd = "start /wait msiexec /uninstall C:\qemu-ga\${qemu_ga_pkg} /quiet"
20 21 22
        gagent_start_cmd = "net start qemu-ga"
        gagent_status_cmd = sc query qemu-ga |findstr "RUNNING"
        gagent_pkg_check_cmd = wmic product get name |findstr "QEMU guest agent"
23
        gagent_host_path = "/tmp/${qemu_ga_pkg}"
24
        gagent_guest_dir = "C:\qemu-ga"
25
        gagent_remove_service_cmd = "net stop qemu-ga & del /f C:\qemu-ga\${qemu_ga_pkg} & echo done"
26 27 28
    RHEL.6:
        gagent_start_cmd = "service qemu-ga start"
        gagent_status_cmd = "service qemu-ga status"
29 30 31
    variants:
        - gagent_install:
            gagent_check_type = install
32 33 34 35
        - gagent_install_uninstall:
            only Windows
            gagent_check_type = install_uninstall
            repeat_times = 50
36 37 38 39 40 41
        - check_sync:
            gagent_check_type = sync
        - check_powerdown:
            gagent_check_type = powerdown
        - check_reboot:
            gagent_check_type = reboot
42 43
            # This config would be overriden in guest-os.cfg.
            gagent_guest_reboot_pattern = "Restarting system"
44 45
            Windows:
                gagent_guest_reboot_pattern = ""
46 47
        - check_halt:
            gagent_check_type = halt
48 49
            # This config would be overriden in guest-os.cfg.
            gagent_guest_shutdown_pattern = "System halted"
50 51
            Windows:
                gagent_guest_shutdown_pattern = ""
52 53 54 55 56 57 58
        - check_sync_delimited:
            gagent_check_type = sync_delimited
        - check_set_user_password:
            gagent_check_type = set_user_password
            image_snapshot = yes
            variants:
                - no_crypto:
59
                    new_password = "Abc_123"
60
                - crypto:
61
                    no Windows
62 63 64 65 66 67 68 69
                    new_password = "123456"
                    crypted = "yes"
        - check_get_vcpus:
            no Windows
            gagent_check_type = get_vcpus
        - check_set_vcpus:
            no Windows
            gagent_check_type = set_vcpus
70 71 72
        - check_get_time:
            gagent_check_type = get_time
            get_guest_time_cmd = python -c "import time; print int(time.time())"
73 74 75 76 77 78
        - 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" 
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
        - 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
99
        - check_fsfreeze:
100 101
            # fsfreeze series commands can't run on windows guest.
            no Windows
102 103 104
            gagent_check_type = fsfreeze
            gagent_fs_test_cmd = "rm -f /tmp/foo; echo foo > /tmp/foo"
        - check_snapshot:
105
            # fsfreeze series commands can't run on windows guest.
106 107 108 109
            type = qemu_guest_agent_snapshot
            gagent_check_type = fsfreeze
            gagent_fs_test_cmd = "rm -f /tmp/foo; echo foo > /tmp/foo"
            gagent_fs_check_cmd = "grep foo /tmp/foo"
110 111
        - check_suspend:
            type = qemu_guest_agent_suspend
112
            services_up_timeout = 30
113 114
            extra_params += " -global PIIX4_PM.disable_s3=0"
            extra_params += " -global PIIX4_PM.disable_s4=0"
115 116 117 118 119
            # 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
120 121 122
            Windows:
                # Windows guest only works with qxl driver.
                vga = "qxl"
123 124 125 126 127 128
    variants:
        - virtio_serial:
            gagent_serial_type = virtio
            virtio_ports += " org.qemu.guest_agent.0"
            virtio_port_type_org.qemu.guest_agent.0 = "serialport"
        - isa_serial:
129 130
            # Windows guests don't support isa serial, disable it directly.
            no Windows
131
            # ppc64 and ppc64le platform doesn't support isa serial
132
            no ppc64 ppc64le
133
            gagent_serial_type = isa
134
            serials += " org.qemu.guest_agent.0"
135
            gagent_start_cmd = "pgrep qemu-ga || qemu-ga -d -m isa-serial -p /dev/ttyS1"