1. 17 Nov, 2014 1 commit
  2. 22 Oct, 2014 1 commit
  3. 15 Aug, 2014 1 commit
  4. 07 Aug, 2014 3 commits
    • Tomoki Sekiyama's avatar
      qga: Disable unsupported commands by default · 1281c08a
      Tomoki Sekiyama authored
      Currently management softwares cannot know whether a qemu-ga command is
      supported or not on the running platform until they actually execute it.
      This patch disables unsupported commands at launch time of qemu-ga, so that
      management softwares can check whether they are supported from 'enabled'
      property of the result from 'guest-info' command.
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      1281c08a
    • Tomoki Sekiyama's avatar
      qga: Add guest-get-fsinfo command · 46d4c572
      Tomoki Sekiyama authored
      Add command to get mounted filesystems information in the guest.
      The returned value contains a list of mountpoint paths and
      corresponding disks info such as disk bus type, drive address,
      and the disk controllers' PCI addresses, so that management layer
      such as libvirt can resolve the disk backends.
      
      For example, when `lsblk' result is:
      
          NAME           MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
          sdb              8:16   0    1G  0 disk
          `-sdb1           8:17   0 1024M  0 part
            `-vg0-lv0    253:1    0  1.4G  0 lvm  /mnt/test
          sdc              8:32   0    1G  0 disk
          `-sdc1           8:33   0  512M  0 part
            `-vg0-lv0    253:1    0  1.4G  0 lvm  /mnt/test
          vda            252:0    0   25G  0 disk
          `-vda1         252:1    0   25G  0 part /
      
      where sdb is a SCSI disk with PCI controller 0000:00:0a.0 and ID=1,
            sdc is an IDE disk with PCI controller 0000:00:01.1, and
            vda is a virtio-blk disk with PCI device 0000:00:06.0,
      
      guest-get-fsinfo command will return the following result:
      
          {"return":
           [{"name":"dm-1",
             "mountpoint":"/mnt/test",
             "disk":[
              {"bus-type":"scsi","bus":0,"unit":1,"target":0,
               "pci-controller":{"bus":0,"slot":10,"domain":0,"function":0}},
              {"bus-type":"ide","bus":0,"unit":0,"target":0,
               "pci-controller":{"bus":0,"slot":1,"domain":0,"function":1}}],
             "type":"xfs"},
            {"name":"vda1", "mountpoint":"/",
             "disk":[
              {"bus-type":"virtio","bus":0,"unit":0,"target":0,
               "pci-controller":{"bus":0,"slot":6,"domain":0,"function":0}}],
             "type":"ext4"}]}
      
      In Linux guest, the disk information is resolved from sysfs. So far,
      it only supports virtio-blk, virtio-scsi, IDE, SATA, SCSI disks on x86
      hosts, and "disk" parameter may be empty for unsupported disk types.
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      
      *updated schema to report 2.2 as initial supported version
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      46d4c572
    • Tomoki Sekiyama's avatar
      qga: Add guest-fsfreeze-freeze-list command · e99bce20
      Tomoki Sekiyama authored
      If an array of mount point paths is specified as 'mountpoints' argument
      of guest-fsfreeze-freeze-list, qemu-ga will only freeze the file systems
      mounted on specified paths in Linux guests. Otherwise, it works as the
      same way as guest-fsfreeze-freeze.
      This would be useful when the host wants to create partial disk snapshots.
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      
      *updated schema to report 2.2 as initial supported version
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      e99bce20
  5. 18 Jul, 2014 1 commit
  6. 03 Jun, 2014 1 commit
  7. 09 May, 2014 4 commits
  8. 07 May, 2014 1 commit
  9. 18 Apr, 2014 1 commit
  10. 07 Apr, 2014 1 commit
  11. 02 Mar, 2014 1 commit
  12. 23 Feb, 2014 6 commits
  13. 17 Feb, 2014 1 commit
  14. 25 Nov, 2013 1 commit
  15. 22 Nov, 2013 1 commit
  16. 21 Nov, 2013 1 commit
    • Stefan Weil's avatar
      qga: Fix compiler warnings (missing format attribute, wrong format strings) · d607a523
      Stefan Weil authored
      gcc 4.8.2 reports this warning when extra warnings are enabled (-Wextra):
      
        CC    qga/commands.o
      qga/commands.c: In function ‘slog’:
      qga/commands.c:28:5: error:
       function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
           g_logv("syslog", G_LOG_LEVEL_INFO, fmt, ap);
           ^
      
      gcc 4.8.2 reports this warning when slog is declared with the
      gnu_printf format attribute:
      
      qga/commands-posix.c: In function ‘qmp_guest_file_open’:
      qga/commands-posix.c:404:5: warning:
       format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘int64_t’ [-Wformat=]
           slog("guest-file-open, handle: %d", handle);
           ^
      
      On 32 bit hosts there are three more warnings which are also fixed here.
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      d607a523
  17. 16 Nov, 2013 1 commit
    • whitearchey's avatar
      qga: Fix shutdown command of guest agent to work with SysV · 485e741c
      whitearchey authored
      For now guest agent uses following command to shutdown system:
      shutdown -P +0 "blabla"
      but this syntax works only with shutdown command from systemd or upstart,
      because SysV shutdown requires -h switch.
      
      Following patch changes the command so it works with systemd, upstart and SysV
      
      With upstart/systemd qga use one of thee commands, depending on 'mode' parameter:
        shutdown -P +0 "..."
        shutdown -H +0 "..."
        shutdown -r +0 "..."
      SysV equivalents for these are:
        shutdown -h -P +0 "..."
        shutdown -h -H +0 "..."
        shutdown -h -r +0 "..."
      and these retain their meaning with upstart/systemd.
      
      According to FreeBSD manpages, shutdown does not accept -P and -H options. Commands should be:
        shutdown -p +0 "..."
        shutdown -h +0 "..."
        shutdown -r +0 "..."
      
      shutdown in Solaris does not accept any of -hHpPr and does not accept time in "+0" format
      Signed-off-by: default avatarMichael Avdienko <whitearchey@gmail.com>
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      485e741c
  18. 13 Nov, 2013 1 commit
    • Stefan Weil's avatar
      qga: Fix compilation for old versions of MinGW · ba1c2931
      Stefan Weil authored
      While MinGW-w64 can compile the qga code, MinGW from Debian lenny
      (gcc-mingw32 4.4.2-3) shows these errors:
      
      In file included from qga/vss-win32.c:17:
      qga/vss-win32/requester.h:31:
       error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_init«
      qga/vss-win32/requester.h:32:
       error: expected »=«, »,«, »;«, »asm« or »__attribute__« before »requester_deinit«
      
      The macro STDAPI is unknown, so add the missing include file which
      defines it.
      Signed-off-by: default avatarStefan Weil <sw@weilnetz.de>
      Signed-off-by: default avatarMichael Tokarev <mjt@tls.msk.ru>
      ba1c2931
  19. 10 Oct, 2013 3 commits
  20. 09 Sep, 2013 3 commits
    • Tomoki Sekiyama's avatar
      qemu-ga: Install Windows VSS provider on `qemu-ga -s install' · f311f2c2
      Tomoki Sekiyama authored
      Register QGA VSS provider library into Windows when qemu-ga is installed as
      Windows service ('-s install' option). It is deregistered when the service
      is uninstalled ('-s uninstall' option).
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Reviewed-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      f311f2c2
    • Tomoki Sekiyama's avatar
      qemu-ga: Call Windows VSS requester in fsfreeze command handler · 64c00317
      Tomoki Sekiyama authored
      Support guest-fsfreeze-freeze and guest-fsfreeze-thaw commands for Windows
      guests. When fsfreeze command is issued, it calls the VSS requester to
      freeze filesystems and applications. On thaw command, it again tells the VSS
      requester to thaw them.
      
      This also adds calling of initialize functions for the VSS requester.
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Reviewed-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      64c00317
    • Tomoki Sekiyama's avatar
      qemu-ga: Add Windows VSS provider and requester as DLL · b39297ae
      Tomoki Sekiyama authored
      Adds VSS provider and requester as a qga-vss.dll, which is loaded by
      Windows VSS service as well as by qemu-ga.
      
      "provider.cpp" implements a basic stub of a software VSS provider.
      Currently, this module only relays a frozen event from VSS service to the
      agent, and thaw event from the agent to VSS service, to block VSS process
      to keep the system frozen while snapshots are taken at the host.
      
      To register the provider to the guest system as COM+ application, the type
      library (.tlb) for qga-vss.dll is required. To build it from COM IDL (.idl),
      VisualC++, MIDL and stdole2.tlb in Windows SDK are required. This patch also
      adds pre-compiled .tlb file in the repository in order to enable
      cross-compile qemu-ga.exe for Windows with VSS support.
      
      "requester.cpp" provides the VSS requester to kick the VSS snapshot process.
      Qemu-ga.exe works without the DLL, although fsfreeze features are disabled.
      
      These functions are only supported in Windows 2003 or later. In older
      systems, fsfreeze features are disabled.
      
      In several versions of Windows which don't support attribute
      VSS_VOLSNAP_ATTR_NO_AUTORECOVERY, DoSnapshotSet fails with error
      VSS_E_OBJECT_NOT_FOUND. In this patch, we just ignore this error.
      To solve this fundamentally, we need a framework to handle mount writable
      snapshot on guests, which is required by VSS auto-recovery feature
      (cleanup phase after a snapshot is taken).
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      b39297ae
  21. 25 Jul, 2013 3 commits
  22. 30 May, 2013 3 commits