Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ganeti/KVM Disk Types #1669

Open
rbott opened this issue Apr 11, 2022 · 1 comment
Open

Ganeti/KVM Disk Types #1669

rbott opened this issue Apr 11, 2022 · 1 comment

Comments

@rbott
Copy link
Member

rbott commented Apr 11, 2022

According to the the gnt-instance manpage, Ganeti supports the following disk types for KVM instances:

ioemu
paravirtual
ide
scsi
sd
mtd
pflash

The code lists these as supported:

ide
mtd
paravirtual
pflash
scsi
scsi-block
scsi-cd
scsi-generic
scsi-hd
sd

However, I can not find much documentation which are supposed to work in which scenario. So I have tested all of them with plain instances on Debian Bullseye with Qemu 5.2 (running a Ganeti build off the stable-3.0 branch). This is what happens:

paravirtual, ide and scsi-hd work as expected. The guest is able to boot and sees a device corresponding to the configured disk type.

In all other cases Ganeti fails to start the KVM process with the following errors (taken from the instance's KVM logfile):

disk_type=scsi-block
kvm: -device scsi-block,id=disk-5d71ee32-04e2-40bf,bus=scsi.0,channel=0,scsi-id=0,lun=0,drive=disk-5d71ee32-04e2-40bf: cannot get SG_IO version number: Inappropriate ioctl for device
Is this a SCSI device?

disk_type=scsi-generic
kvm: -device scsi-generic,id=disk-5d71ee32-04e2-40bf,bus=scsi.0,channel=0,scsi-id=0,lun=0,drive=disk-5d71ee32-04e2-40bf: cannot get SG_IO version number: Inappropriate ioctl for device
Is this a SCSI device?

disk_type=scsi
kvm: -drive file=/var/run/ganeti/instance-disks/kvm-test-instance.ganeti.org:0,format=raw,if=scsi,aio=native,cache=none,auto-read-only=off: machine type does not support if=scsi,bus=0,unit=0

disk_type=sd
kvm: -drive file=/var/run/ganeti/instance-disks/kvm-test-instance.ganeti.org:0,format=raw,if=sd,aio=native,cache=none,auto-read-only=off: machine type does not support if=sd,bus=0,unit=0

disk_type=pflash
kvm: combined size of system firmware exceeds 8388608 bytes

disk_type=mtd
kvm: -drive file=/var/run/ganeti/instance-disks/kvm-test-instance.ganeti.org:0,format=raw,if=mtd,aio=native,cache=none,auto-read-only=off: machine type does not support if=mtd,bus=0,unit=0

scsi-cd is somewhat special in that the KVM process actually starts, but BIOS can not find a disk to boot from (which seems somewhat expected in that case :-) ).

Is there anyone who could explain all the non-working disk types (or the conditions under which they should work)? Have they ever worked? What would be their usecase? Do we need better documentation, better configuration checks or should they simply be dropped from Ganeti?

Maybe someone with better historical knowledge on Ganeti can shed some light on this (@apoikos, @iustin @Morgawr @aehlig?)

@rbott
Copy link
Member Author

rbott commented Apr 19, 2022

One more piece of information I was not aware of: the list of supported disk types also applies to cdrom_disk_type but I have not done any testing here. The cdrom disk type also gets silently overridden to "ide" when boot order is set to "cdrom".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant