Further testing reveals we need some additional padding on the request
passed to libvirt when performing migrations. I believe this is due to
the structure alignment normally provided automatically by the compiler.
In testing, this fixes an error I was seeing: "Unable to decode message
paylaod", returned from libvirt when performing migrations.
This adds basic support for domain migrations from one hypervisor to
another. Migration options, e.g., live, tunneled, compressed, etc..,
are specified by the constants described `constants.Migrate*`.
Two unknowns remain, Libvirt specifies `RemoteParameters` and `CookieIn`.
In testing both values are always set to 0 by `virsh` and the source
does not provide clear definitions of their purpose. For now, using
the same zero'd values used by `virsh` will be Good Enough.
When performing QEMU monitor commands, libvirt will return StatusOK even
when the underlying QEMU process fails to perform the command.
This modifies Run() to check for QEMU errors.
I'm not entirely happy with the hacky modifications to the test library
to handle this scenario. The test framework is in obvious need for a
complete refactor. For now this will have to work.
This splits out the mock libvirt server for testing within
other packages. Constants from the main libvirt package
have been moved to a separate package, constants, for shared access.