Improve disk device naming to increase limitations
Description Currently the total number of disks on one virtual machine is hardcode limited to 20, and even when this is bypassed it is limited by single letter drive names (vda - vdz). This should be updated to handle multi-letter drive names as linux does when exceeding the amount of drive names available (vdaa, vdab, vdac, ...) to allow more disks attached to a single VM.
Use case Some virtual machines functions may rely on having many separate disk devices. Additionally, if the internal guest OS is capable of handling such devices then it should be supported.
Additional Context https://github.com/OpenNebula/one/blob/master/src/vm/VirtualMachine.cc#L3240 ( VirtualMachine::get_disk_images ) https://github.com/OpenNebula/one/blob/master/src/vm/VirtualMachineDisk.cc#L742 ( VirtualMachineDisks::assign_disk_targets )
Progress Status
- [ ] Code committed
- [x] Testing - QA
- [ ] Documentation (Release notes - resolved issues, compatibility, known issues)
@onenhansen : Thanks for creating an issue on behalf of us. I will like to add more details based on the tests we did,
There are two limitations:
-
one is number disks per VM which is limited to 20 (1 OS + 1 Context + 18 SATA/iSCSI) Disks which need to lifted from above sources.
-
2nd is limitation in Opennebula's Qemu Driver for KVM to a-z(26 english letters) for both SATA (vda ~ vdz) and iSCSI (sda ~ sdz) disks.
The following work with the proposed changes:
- SCSI using
DEV_PREFIX='sd' - Virtio using
DEV_PREFIX='vd' - SATA using
DEV_PREFIX='hd'andOS = [ MACHINE = 'q35' ]
There are still limitations with IDE of course( DEV_PREFIX='hd' without OS = [ MACHINE = 'q35' ] )