Skip to content

Commit

Permalink
virt-launcher: create dedicated cpu guests paused
Browse files Browse the repository at this point in the history
If guest is configured with dedicated CPUs and emulator thread isolation,
then start it paused.

This allows the cgroup configuration of housekeeping cgroup to happen
before guest is allowed to execute.

The state machine will naturally unpause the guest afterwards
(if the user requested guest state is unpaused).

Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
matosatti committed Nov 9, 2022
1 parent 39ebd09 commit 974046b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/virt-launcher/virtwrap/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1951,5 +1951,8 @@ func getDomainCreateFlags(vmi *v1.VirtualMachineInstance) libvirt.DomainCreateFl
if vmi.ShouldStartPaused() {
flags |= libvirt.DOMAIN_START_PAUSED
}
if vmi.IsCPUDedicated() && vmi.Spec.Domain.CPU.IsolateEmulatorThread {
flags |= libvirt.DOMAIN_START_PAUSED
}
return flags
}

0 comments on commit 974046b

Please sign in to comment.