Merge pull request #22758 from slp/rosetta-libkrun-fix

Check AppleHypervisor before accessing it
This commit is contained in:
openshift-merge-bot[bot] 2024-05-21 16:24:37 +00:00 committed by GitHub
commit 3d48d9b6ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -43,8 +43,7 @@ func GetDefaultDevices(mc *vmconfigs.MachineConfig) ([]vfConfig.VirtioDevice, *d
}
devices = append(devices, disk, rng, serial, readyDevice)
rosettaCfg := mc.AppleHypervisor.Vfkit.Rosetta
if rosettaCfg {
if mc.AppleHypervisor != nil && mc.AppleHypervisor.Vfkit.Rosetta {
rosetta := &vfConfig.RosettaShare{
DirectorySharingConfig: vfConfig.DirectorySharingConfig{
MountTag: define.MountTag,