qemu-guest-agent各版本功能演进

一、0.15.0

guest-sync 

Echo back a unique integer value

{ 'command': 'guest-sync',

 'data':    { 'id': 'int' },

  'returns':'int' }

guest-ping

Ping the guest agent, a non-error return implies success

{ 'command': 'guest-ping' }

guest-info

#Get some information about the guest agent.

{ 'command': 'guest-info',

  'returns':'GuestAgentInfo' }

##Information about guest agent

{ 'struct': 'GuestAgentInfo',

  'data': {'version': 'str',

           'supported_commands': ['GuestAgentCommandInfo'] } }

since 1.1.0
##Information about guest agent commands.

{ 'struct': 'GuestAgentCommandInfo',

  'data': {'name': 'str', 'enabled': 'bool', 'success-response': 'bool' } }

guest-shutdown

#Initiate guest-activated shutdown. Note: this isan asynchronous shutdown request, with no guarantee of successful shutdown.

{ 'command': 'guest-shutdown', 'data': { '*mode':'str' },

 'success-response': false }

guest-file-open

##Open a file in the guest and retrieve a filehandle for it

{ 'command': 'guest-file-open',

  'data':    { 'path': 'str', '*mode': 'str' },

  'returns':'int' } 

guest-file-close

##Close an open file in the guest

{ 'command': 'guest-file-close',

  'data': {'handle': 'int' } }

guest-file-read

##Read from an open file in the guest. Data willbe base64-encoded

{ 'command': 'guest-file-read',

 'data':    { 'handle': 'int','*count': 'int' },

  'returns':'GuestFileRead' }

##Result of guest agent file-read operation

{ 'struct': 'GuestFileRead',

  'data': {'count': 'int', 'buf-b64': 'str', 'eof': 'bool' } }

guest-file-write

##Write to an open file in the guest

{ 'command': 'guest-file-write',

 'data':    { 'handle': 'int','buf-b64': 'str', '*count': 'int' },

  'returns':'GuestFileWrite' }

##Result of guest agent file-write operation

{ 'struct': 'GuestFileWrite',

  'data': {'count': 'int', 'eof': 'bool' } }

guest-file-seek

##Seek to a position in the file, as with fseek(),and return the current file position afterward. Alsoencapsulates ftell()'s  functionality, just Set offset=0,whence=SEEK_CUR.

{ 'command': 'guest-file-seek',

 'data':    { 'handle': 'int','offset': 'int', 'whence': 'int' },

  'returns':'GuestFileSeek' } 

##Result of guest agent file-seek operation

{ 'struct': 'GuestFileSeek',

  'data': {'position': 'int', 'eof': 'bool' } }

guest-file-flush

##Write file changes bufferred in userspace todisk/kernel buffers

{ 'command': 'guest-file-flush',

  'data': {'handle': 'int' } }

guest-fsfreeze-status

##Get guest fsfreeze state. error state indicates

{ 'command': 'guest-fsfreeze-status',

  'returns':'GuestFsfreezeStatus' }

##An enumeration of filesystem freeze states

{ 'enum': 'GuestFsfreezeStatus',

  'data': ['thawed', 'frozen' ] } 

guest-fsfreeze-freeze

##Sync and freeze all freezable, local guestfilesystems

{ 'command': 'guest-fsfreeze-freeze',

  'returns':'int' } 

guest-fsfreeze-thaw

##Unfreeze all frozen guest filesystems

{ 'command': 'guest-fsfreeze-thaw',

  'returns':'int' } 

二、1.1

guest-sync-delimited

##Echo back a unique integer value, and prepend to response a leadingsentinel byte (0xFF) the client can check scan for.

{ 'command': 'guest-sync-delimited',

 'data':    { 'id': 'int' },

  'returns':'int' }

guest-suspend-disk

##Suspend guest to disk.

{ 'command': 'guest-suspend-disk','success-response': false }

guest-suspend-ram

##Suspend guest to ram

{ 'command': 'guest-suspend-ram','success-response': false }

guest-suspend-hybrid

##Save guest state to disk and suspend to ram.

{ 'command': 'guest-suspend-hybrid', 'success-response':false }

guest-network-get-interfaces

##Get list of guest IP addresses, MAC addresses and netmasks.

{ 'command': 'guest-network-get-interfaces',

  'returns':['GuestNetworkInterface'] }

##An enumeration of supported IP address types

{ 'enum': 'GuestIpAddressType',

  'data': ['ipv4', 'ipv6' ] }

##

{ 'struct': 'GuestIpAddress',

  'data':{'ip-address': 'str',

          'ip-address-type': 'GuestIpAddressType',

          'prefix': 'int'} } 

##

{ 'struct': 'GuestNetworkInterface',

  'data':{'name': 'str',

          '*hardware-address': 'str',

          '*ip-addresses': ['GuestIpAddress'] } }


三、1.2

guest-fstrim

##Discard (or "trim") blocks which arenot in use by the filesystem.

{ 'command': 'guest-fstrim',

  'data': {'*minimum': 'int' },

  'returns':'GuestFilesystemTrimResponse' }

四、1.5

guest-get-time

##Get the information about guest's System Timerelative to

{ 'command': 'guest-get-time',

  'returns':'int' }

guest-set-time

##Set guest time.

{ 'command': 'guest-set-time',

  'data': {'*time': 'int' } }

guest-get-vcpus

##Retrieve the list of the guest's logicalprocessors.

{ 'command': 'guest-get-vcpus',

  'returns':['GuestLogicalProcessor'] }

{ 'struct': 'GuestLogicalProcessor',

  'data':{'logical-id': 'int',

          'online': 'bool',

          '*can-offline': 'bool'} }


guest-set-vcpus

##Attempt to reconfigure (currently:enable/disable) logical processors inside

# the guest.

{ 'command': 'guest-set-vcpus',

  'data':    {'vcpus': ['GuestLogicalProcessor'] },

  'returns':'int' }

 

五、2.2

guest-fsfreeze-freeze-list

##Sync and freeze specified guest filesystems

{ 'command': 'guest-fsfreeze-freeze-list',

 'data':    { '*mountpoints':['str'] },

  'returns':'int' }

guest-get-fsinfo

##Returns: The list of filesystems information mounted in the guest.The returned mountpoints may be specified to guest-fsfreeze-freeze-list.Network filesystems (such as CIFS and NFS) are not listed.

{ 'command': 'guest-get-fsinfo',

  'returns':['GuestFilesystemInfo'] }

##An enumeration of bus type of disks,'Unknown' and all entries below since 2.4

{ 'enum': 'GuestDiskBusType',

  'data': [ 'ide','fdc', 'scsi', 'virtio', 'xen', 'usb', 'uml', 'sata',

            'sd','unknown', 'ieee1394', 'ssa', 'fibre', 'raid', 'iscsi',

            'sas','mmc', 'virtual', 'file-backed-virtual' ] }

##

{ 'struct': 'GuestPCIAddress',

  'data': {'domain':'int', 'bus': 'int',

           'slot':'int', 'function': 'int'} }

##

{ 'struct': 'GuestDiskAddress',

  'data': {'pci-controller':'GuestPCIAddress',

           'bus-type':'GuestDiskBusType',

           'bus':'int', 'target': 'int', 'unit': 'int'} }

 ##

{ 'struct': 'GuestFilesystemInfo',

  'data': {'name':'str', 'mountpoint': 'str', 'type': 'str',

           'disk':['GuestDiskAddress']} }

六、2.3

guest-set-user-password

## If the @crypted flag is true, it is the caller's responsibility to ensure the correct crypt() encryption scheme is used. This command does not attempt to interpret or reporton the encryption scheme. Refer to the documentation of the guestoperating system in question to determine what is supported.

{ 'command': 'guest-set-user-password',

  'data': { 'username':'str', 'password': 'str', 'crypted': 'bool' } }

guest-get-memory-blocks

##Retrieve the list of the guest's memory blocks.

{ 'command': 'guest-get-memory-blocks',

  'returns':['GuestMemoryBlock'] }

##

{ 'struct': 'GuestMemoryBlock',

  'data': {'phys-index':'uint64',

           'online':'bool',

           '*can-offline':'bool'} }

guest-set-memory-blocks

## Attempt to reconfigure (currently:enable/disable) state of memory blocks

# inside the guest.

{ 'command': 'guest-set-memory-blocks',

  'data':    {'mem-blks': ['GuestMemoryBlock'] },

  'returns':['GuestMemoryBlockResponse'] }

##response: the result of memory block operation.

{ 'struct': 'GuestMemoryBlockResponse',

  'data': { 'phys-index':'uint64',

            'response':'GuestMemoryBlockResponseType',

            '*error-code':'int' }}

##An enumeration of memory block operation result.

{ 'enum': 'GuestMemoryBlockResponseType',

  'data': ['success','not-found', 'operation-not-supported',

           'operation-failed']}

guest-get-memory-block-info

##Get information relating to guest memory blocks

{ 'command': 'guest-get-memory-block-info',

  'returns':'GuestMemoryBlockInfo' }

##

{ 'struct': 'GuestMemoryBlockInfo',

  'data': {'size':'uint64'} }



Since: 2.4

{ 'struct': 'GuestFilesystemTrimResult',

  'data':{'path': 'str',

          '*trimmed': 'int', '*minimum': 'int', '*error': 'str'} }


{ 'struct': 'GuestFilesystemTrimResponse',

  'data':{'paths': ['GuestFilesystemTrimResult']} }


详情见:https://github.com/qemu/qemu/blob/master/qga/qapi-schema.json

 

你可能感兴趣的:(qemu-guest-agent各版本功能演进)