Skip to content

Commit 2b367c9

Browse files
Merge pull request #8366 from honza/dmacvicar
OCPBUGS-33189: OCPBUGS-33006: baremetal: correct libvirt defaults
2 parents 7057ff4 + 748bc3c commit 2b367c9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

pkg/infrastructure/baremetal/bootstrap.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@ func newDomain(name string) libvirtxml.Domain {
3434
OS: &libvirtxml.DomainOS{
3535
Type: &libvirtxml.DomainOSType{
3636
Type: "hvm",
37-
Arch: "x86_64",
38-
},
39-
},
40-
SecLabel: []libvirtxml.DomainSecLabel{
41-
{
42-
Type: "none",
43-
Model: "selinux",
44-
Relabel: "no",
4537
},
4638
},
4739
Devices: &libvirtxml.DomainDeviceList{
@@ -54,6 +46,9 @@ func newDomain(name string) libvirtxml.Domain {
5446
},
5547
Channels: []libvirtxml.DomainChannel{
5648
{
49+
Source: &libvirtxml.DomainChardevSource{
50+
UNIX: &libvirtxml.DomainChardevSourceUNIX{},
51+
},
5752
Target: &libvirtxml.DomainChannelTarget{
5853
VirtIO: &libvirtxml.DomainChannelTargetVirtIO{
5954
Name: "org.qemu.guest_agent.0",
@@ -296,6 +291,12 @@ func getCapabilities(virConn *libvirt.Libvirt) (libvirtxml.Caps, error) {
296291
func createBootstrapDomain(virConn *libvirt.Libvirt, config baremetalConfig, pool libvirt.StoragePool, volume libvirt.StorageVol) error {
297292
bootstrapDom := newDomain(fmt.Sprintf("%s-bootstrap", config.ClusterID))
298293

294+
if bootstrapDom.OS.Type.Arch == "aarch64" {
295+
// for aarch64 speciffying this will automatically select the firmware and NVRAM file
296+
// reference: https://libvirt.org/formatdomain.html#bios-bootloader
297+
bootstrapDom.OS.Firmware = "efi"
298+
}
299+
299300
capabilities, err := getCapabilities(virConn)
300301
if err != nil {
301302
return fmt.Errorf("failed to get libvirt capabilities: %w", err)

0 commit comments

Comments
 (0)