Skip to content

Commit

Permalink
kvm2 driver: Use scsi cdrom for arm64
Browse files Browse the repository at this point in the history
On linux/aarch64 (e.g. Asahi Linux on MacBook M*) booting from SATA
cdrom is broken and the VM drops into the UEFI shell.

It seems that linux/aarch64 supports only virtio and scsi devices[1].
Replace with scsi cdrom (like the x86 version) and addd a virtio-scsi
controller since the default scsi controller does not boot as well.

[1] https://kubevirt.io/user-guide/virtual_machines/virtual_machines_on_Arm64/#disks-and-volumes

Fixes #18238
  • Loading branch information
nirs committed Feb 23, 2024
1 parent 0fb901c commit 0afe0c0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/drivers/kvm/domain_definition_arm64.go
Expand Up @@ -49,14 +49,16 @@ const domainTmpl = `
<devices>
<disk type='file' device='cdrom'>
<source file='{{.ISO}}'/>
<target dev='sdc' bus='sata'/>
<target dev='sdc' bus='scsi'/>
<readonly/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw' cache='default' io='threads' />
<source file='{{.DiskPath}}'/>
<target dev='hda' bus='virtio'/>
</disk>
<controller type='scsi' index='0' model='virtio-scsi'>
</controller>
<interface type='network'>
<source network='{{.PrivateNetwork}}'/>
<model type='virtio'/>
Expand Down

0 comments on commit 0afe0c0

Please sign in to comment.