This update adds functionality to enable the hook implementer to change the virtual machine state from start-up to paused, then later resume it.
This ensures that operations that require virtual machines to be started in the paused state can be completed. For example, to attach an external NIC the virtual machine should not be started until the plugging of the NIC is complete on the virtual machine and the entire NIC infrastructure outside the virtual machine.
The paused state can be set in the following two hooks:
Resuming the virtual machine can be done in the following hooks:
The flags which control the virtual machine state can be read and set using the following functions in the hooking library:
Get the current state of the flags, including changes made by other hooks
- dump_vm_launch_flags_from_file(vm_id, flags)
Write the new state of the startup flags, all subsequent hooks will see the modified state of the flags