VDI Agent - Gargravarr2112/kvm-vdi GitHub Wiki
Description
VDI-agent is a service, which runs on each hypervisor. It accepts json-formatted commands via
UNIX socket from Dashboard service.
Currently it fulfills these functions:
- VM startup and SSO - after getting properly formated SSO command from dashboard service,
VDI-agent starts VM, connects to it via virtio socket and passes user credentials to
oVirt-guest-agent on that machine. oVirt-guest-agent then completes user login.
Correct json massage to VDI-agent:
{"command": "STARTVM", "vmname": "VMnaname", "username": "UserName", "password": "Password", "os_type": "windows(or linux)"}
For more information on oVirt agent and SSO please visit my blog page:
https://www.neblogas.lt/2016/07/18/technical-info-ovirt-agent-sso/
- Disk image copy - VDI-agent uses
qemu-img convert
command to transfer image from
Source VM to Initial VM. Using this approach saves write IO and disk space, because it
does not copy any zero-valued sectors from source disk image. Thus zeroing free space
in Source machine before shutting it down is recommended.
For Linux OS take a look atzerofree
command.
For Windows OS, look atSdelete
program:sdelete.exe -z c:
Correct json massage to VDI-agent:
{"command": "COPYDISK", "vm": "VMid", "source_file": "SourceFile", "destination_file": "DestinationFile"}