Build(Customize) Windows QEMU Guest Agent

參考資料:

https://wiki.qemu.org/Hosts/W32

http://www.cnblogs.com/silvermagic/p/7666143.html

  1. Prepare(Install) Fedora 26 Virual Machine
  2. Prepare mingw64 envionment
    yum install mingw64-pixman mingw64-glib2  mingw64-gmp mingw64-SDL mingw64-pkg-config
    yum install mingw64-winpthreads-static
  3. Download VSS SDK
    http://www.microsoft.com/en-us/download/details.aspx?id=23490
    from QEMU source

    ./qemu/scripts/extract-vsssdk-headers setup.exe
  4. Download and build from QEMU source
    git clone https://github.com/qemu/qemu
    cd qemu
    git submodule update --init dtc
    ./configure --enable-guest-agent --cross-prefix=x86_64-w64-mingw32- --with-vss-sdk=/root/vss
    make msi -j
    
  5. Copy qemu-ga-x86_64.msi to Windows VM and install it.
  6. Test query VM IP from KVM Host.
    virsh
    list (Get VM Name or ID)
    qemu-agent-command <Name or Id> '{"execute":"guest-info"}'
    qemu-agent-command <Name or Id> '{"execute":"guest-network-get-interfaces"}'

 

 

 

 

 

 

Download: qemu-ga-x86_64(v2.10.50)