CPC G06F 9/45558 (2013.01) [G06F 2009/45579 (2013.01); G06F 2009/45591 (2013.01)] | 11 Claims |
1. A method comprising:
creating, via a virtual machine boot process, a virtual machine to execute on a host operating system, wherein creating the virtual machine updates registers;
creating, via a container boot process, a container within the virtual machine executing on the host operating system;
receiving, by a virtual machine (VM) agent executing on a processing device, a device attachment request to attach a hardware device to the virtual machine after creating the container within the virtual machine;
determining, by a hypervisor of the host operating system, whether the virtual machine is ready for a hot-plug of the hardware device by polling, after creating the container within the virtual machine via the container boot process and before issuing a device hot-plug operation, the registers updated during the virtual machine boot process to prevent errors associated with the hot-plug of the hardware device, wherein the hot-plug of the hardware device corresponds to an attachment of the hardware device to the virtual machine while bypassing a restart of the virtual machine or a shutdown of the virtual machine;
sending, by the hypervisor to the VM agent, a hot-plug ready indication that the virtual machine is ready for the hot-plug of the hardware device responsive to determining that the virtual machine is ready for the hot-plug of the hardware device; and
issuing, by the VM agent and responsive to receiving the hot-plug ready indication from the hypervisor, the device hot-plug operation to cause the hardware device to be hot-plugged to the virtual machine.
|