Skip to content

Commit

Permalink
WIP: Use peer-pod-cm firmware value of x86
Browse files Browse the repository at this point in the history
Signed-off-by: stevenhorsman <[email protected]>
  • Loading branch information
stevenhorsman committed Nov 22, 2024
1 parent b141adf commit 1e0206f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cloud-providers/libvirt/libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,7 @@ func createDomainXMLx86_64(client *libvirtClient, cfg *domainConfig, vm *vmConfi
Memory: &libvirtxml.DomainMemory{Value: cfg.mem, Unit: "GiB", DumpCore: "on"},
VCPU: &libvirtxml.DomainVCPU{Value: cfg.cpu},
OS: &libvirtxml.DomainOS{
Firmware: "efi",
Type: &libvirtxml.DomainOSType{Arch: "x86_64", Type: typeHardwareVirtualMachine},
Type: &libvirtxml.DomainOSType{Arch: "x86_64", Type: typeHardwareVirtualMachine},
},
// For Hot-Plug Feature.
Features: &libvirtxml.DomainFeatureList{
Expand Down Expand Up @@ -389,6 +388,14 @@ func createDomainXMLx86_64(client *libvirtClient, cfg *domainConfig, vm *vmConfi
},
}

if vm.firmware != "" {
domain.OS.Loader = &libvirtxml.DomainLoader{
Path: vm.firmware,
Readonly: "yes",
Type: "pflash",
}
}

switch l := vm.launchSecurityType; l {
case NoLaunchSecurity:
return domain, nil
Expand Down

0 comments on commit 1e0206f

Please sign in to comment.