qemu_guest_agent.cfg 5.4 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 6
    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"
7
    Windows:
8 9 10 11 12 13 14
        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}"
15
        gagent_guest_dir = "C:\qemu-ga"
16
        gagent_remove_service_cmd = "net stop qemu-ga & del /f C:\qemu-ga\${qemu_ga_pkg} & echo done"
17 18 19 20 21 22 23 24 25
    variants:
        - gagent_install:
            gagent_check_type = install
        - check_sync:
            gagent_check_type = sync
        - check_powerdown:
            gagent_check_type = powerdown
        - check_reboot:
            gagent_check_type = reboot
26 27
            # This config would be overriden in guest-os.cfg.
            gagent_guest_reboot_pattern = "Restarting system"
28 29
            Windows:
                gagent_guest_reboot_pattern = ""
30 31
        - check_halt:
            gagent_check_type = halt
32 33
            # This config would be overriden in guest-os.cfg.
            gagent_guest_shutdown_pattern = "System halted"
34 35
            Windows:
                gagent_guest_shutdown_pattern = ""
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
        - check_sync_delimited:
            gagent_check_type = sync_delimited
        - check_set_user_password:
            no Windows
            gagent_check_type = set_user_password
            image_snapshot = yes
            variants:
                - no_crypto:
                    new_password = "abcdef"
                - crypto:
                    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
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
        - 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
77
        - check_fsfreeze:
78 79
            # fsfreeze series commands can't run on windows guest.
            no Windows
80 81 82
            gagent_check_type = fsfreeze
            gagent_fs_test_cmd = "rm -f /tmp/foo; echo foo > /tmp/foo"
        - check_snapshot:
83
            # fsfreeze series commands can't run on windows guest.
84 85 86 87
            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"
88 89
        - check_suspend:
            type = qemu_guest_agent_suspend
90
            services_up_timeout = 30
91 92
            extra_params += " -global PIIX4_PM.disable_s3=0"
            extra_params += " -global PIIX4_PM.disable_s4=0"
93 94 95 96 97
            # 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
98 99 100
            Windows:
                # Windows guest only works with qxl driver.
                vga = "qxl"
101 102 103 104 105 106
    variants:
        - virtio_serial:
            gagent_serial_type = virtio
            virtio_ports += " org.qemu.guest_agent.0"
            virtio_port_type_org.qemu.guest_agent.0 = "serialport"
            gagent_start_cmd = "service qemu-guest-agent start"
107 108
            RHEL.6:
                gagent_start_cmd = "service qemu-ga start"
109 110
            Windows:
                gagent_start_cmd = "net start qemu-ga"
111
        - isa_serial:
112 113
            # Windows guests don't support isa serial, disable it directly.
            no Windows
114
            # ppc64 and ppc64le platform doesn't support isa serial
115
            no ppc64 ppc64le
116
            gagent_serial_type = isa
117
            serials += " org.qemu.guest_agent.0"
118
            gagent_start_cmd = "pgrep qemu-ga || qemu-ga -d -m isa-serial -p /dev/ttyS1"