nzr-virt: make BiosData optional

Hopefully this fixes an issue with some VMs created outside of nzr.
This commit is contained in:
snow flurry 2024-08-15 20:24:29 -07:00
parent 8448a93b21
commit a4c38c7d82

View file

@ -65,10 +65,10 @@ impl Default for Domain {
dev: BootDevice::HardDrive,
}),
r#type: OsType::default(),
bios: BiosData {
bios: Some(BiosData {
useserial: "yes".to_owned(),
reboot_timeout: 0,
},
}),
..Default::default()
},
sysinfo: None,
@ -373,7 +373,7 @@ pub struct OsData {
boot: Option<BootNode>,
r#type: OsType,
// we will not be doing PV, no <bootloader>/<kernel>/<initrd>/etc
bios: BiosData,
bios: Option<BiosData>,
smbios: Option<SmbiosInfo>,
}
@ -384,10 +384,10 @@ impl Default for OsData {
dev: BootDevice::HardDrive,
}),
r#type: OsType::default(),
bios: BiosData {
bios: Some(BiosData {
useserial: "yes".to_owned(),
reboot_timeout: 0,
},
}),
smbios: None,
}
}