Skip to content

Handle non-sequential unit_number and 64 disks per controller limit in samples/add_disk_to_vm.py #754

@nryc

Description

@nryc

Is your feature request related to a problem? Please describe.

Hi,

samples/add_disk_to_vm.py has currently two issues:

  • it loops through vm.config.hardware.device and increment the last unit_number found, but the last unit_number of vm.config.hardware.device isn't necessarily the greatest (unit_number aren't sequential),
  • the script sets a limit to 16 disks per controllers. Since vSphere 6.7, the limit is now 64 disks per controller.

Describe the solution you'd like

  • to address the non-sequential unit_number, we should take the max unit_number found and increment it, not the last one,
  • the limit for the number of disks per controller should be 64.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions