IP Library Granted Patent US 12,367,056
Granted Patent B2
US 12,367,056 · App. 17/448,761 · Granted Jul 22, 2025

Reliable device assignment for virtual machine based containers

Inventors: Marcel Apfelbaum (Afula, IL); Gal Hammer (Ra'anana, IL)
Assignee: Red Hat, Inc.
G06F9/45558G06F2009/45579G06F2009/45591
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,367,056
App. No.
17/448,761
Granted
Jul 22, 2025
Kind
B2
Abstract

A device attachment request to attach a device to a container within a virtual machine is received. The virtual machine is monitored to determine whether the virtual machine is ready for a hot-plug of the device. An indication that the virtual machine is ready for the hot-plug of the device is received from the virtual machine. A device hot-plug operation is issued to cause the device to be hot-plugged to the virtual machine.

Claims (31)

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.

2. The method of claim 1 , wherein the hardware device comprises a Peripheral Component Interconnect (PCI) device.

3. The method of claim 1 , further comprising: receiving a request to create the container within the virtual machine from a cloud agent.

4. The method of claim 3 , wherein the device attachment request is received from the cloud agent.

5. A system comprising:

a memory; and

a processing device executing a virtual machine (VM) agent, the processing device operatively coupled to the memory, to:

create, via a virtual machine boot process, a virtual machine to execute on a host operating system, wherein creating the virtual machine updates registers;

create, via a container boot process, a container within the virtual machine executing on the host operating system;

receive, by the VM agent, a device attachment request to attach a hardware device to the virtual machine after creating the container within the virtual machine;

determine, using 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;

send, 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

issue, using 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.

6. The system of claim 5 , wherein the hardware device comprises a Peripheral Component Interconnect (PCI) device.

7. The system of claim 5 , wherein the processing device further: receives a request to create the container within the virtual machine from a cloud agent.

8. The system of claim 7 , wherein the device attachment request is received from the cloud agent.

9. A non-transitory computer-readable storage medium including instructions that, when executed by a processing device, cause the processing device to:

create, via a virtual machine boot process, a virtual machine to execute on a host operating system, wherein creating the virtual machine updates registers;

create, via a container boot process, a container within the virtual machine executing on the host operating system;

receive, by a virtual machine (VM) agent executing on the processing device, a device attachment request to attach a hardware device to the virtual machine after creating the container within the virtual machine;

determine, using a hypervisor of the host operating system, whether of 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;

send, 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

issue, using 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.

10. The non-transitory computer-readable storage medium of claim 9 , wherein the hardware device comprises a Peripheral Component Interconnect (PCI) device.

11. The non-transitory computer-readable storage medium of claim 9 , wherein the processing device further: receives a request to create the container within the virtual machine from a cloud agent.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 24, 2021
From: APFELBAUM, MARCEL; HAMMER, GAL
To: RED HAT, INC.
Reel/Frame 057594/0225 →
Continuity (1)
Related Publication 20230101885A1 · Mar 30, 2023
References Cited (24)
US 7917811B2 · Yamamoto · 2011 [cited by applicant]
US 8028040B1 · Hobbs et al. · 2011 [cited by applicant]
US 8503468B2 · Akyol et al. · 2013 [cited by applicant]
US 8850426B2 · Glikson et al. · 2014 [cited by applicant]
US 8930568B1 · Chalmer · 2015 [cited by examiner]
US 10846145B2 · Xu et al. · 2020 [cited by applicant]
US 20040128670A1 · Robinson · 2004 [cited by examiner]
US 20040187106A1 · Tanaka · 2004 [cited by examiner]
US 20070266179A1 · Chavan · 2007 [cited by examiner]
US 20150149996A1 · Tsirkin et al. · 2015 [cited by applicant]
US 20170147370A1 · Williamson · 2017 [cited by examiner]
US 20170289060A1 · Aftab · 2017 [cited by examiner]
US 20170344270A1 · Sterin · 2017 [cited by examiner]
US 20180039594A1 · Apfelbaum et al. · 2018 [cited by applicant]
US 20180357086A1 · Kinsella · 2018 [cited by examiner]
US 20180357089A1 · Tsirkin · 2018 [cited by examiner]
US 20210141655A1 · Gamage et al. · 2021 [cited by applicant]
CN 109639455A · 2019 [cited by examiner]
WO WO2022095844A1 · 2022 [cited by examiner]
Jing et al. CN109639455A Description Translation, Apr. 16, 2019, <https://worldwide.espacenet.com/publicationDetails/description?CC=CN&NR=109639455A&KC=A&FT=D&ND=3&date=20190416&DB=&locale=en_EP>, pp. 1-12 (Year: 2019). [cited by examiner]
Jiang, WO2022095844A1 Description Translation, May 12, 2022, <https://worldwide.espacenet.com/publicationDetails/description?CC=WO&NR=2022095844A1&KC=A1&FT=D&ND=4&date=20220512&DB=&locale=en_EP>, pp. 1-19 (Year: 2022). [cited by examiner]
“Add a PCI Device to a Virtual Machine” (2021). VMware, Inc. pp. 5. [cited by applicant]
“Proxmox VE Administration Guide” (May 7, 2021). Proxmox Server Solutions GmbH, pp. 357. [cited by applicant]
Extended European Search Report mailed on May 6, 2022 for European Patent Application No. 21209240.7. [cited by applicant]