one icon indicating copy to clipboard operation
one copied to clipboard

Improve disk device naming to increase limitations

Open OpenNebulaSupport opened this issue 2 years ago • 2 comments

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)

OpenNebulaSupport avatar Aug 02 '23 17:08 OpenNebulaSupport

@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. terraform-vm-disk-attach-limit-20-error-2023-08-02

  • 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.

thangamani-arun avatar Aug 10 '23 22:08 thangamani-arun

The following work with the proposed changes:

  • SCSI using DEV_PREFIX='sd'
  • Virtio using DEV_PREFIX='vd'
  • SATA using DEV_PREFIX='hd' and OS = [ MACHINE = 'q35' ]

There are still limitations with IDE of course( DEV_PREFIX='hd' without OS = [ MACHINE = 'q35' ] )

onenhansen avatar May 16 '24 20:05 onenhansen