-
Notifications
You must be signed in to change notification settings - Fork 339
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
Some improvements on vmware_guest_disk module #905
Comments
So that we can cover all the scenarios:
Usage of
Or only one disk controller with one disk one time:
|
@Akasurde @goneri @mariolenz @sky-joker what do you think about this proposal? Thanks. |
To tell you the truth, I'm not really sure... if I understand your proposal correct, this would fix one special case: If you add only one disk. It sounds like we'll run into the problem that Linux doesn't recognize disks 2+ if users want to add more than one. Actually, I think it would be more important to move the handling of storage controllers and disks to a library ( Btw: Do you run into the same issue if you use Thanks for starting this discussion! This might get really interesting :-) |
Yeah, you are right about this, it only work for the first time adding the controller and disk at the same time, but when add disk to the exiting controller, there is still the problem.
This is really a good suggestion, I think this can reduce the duplicated code in many modules and easy for adding new supported parameters.
Yeah, I'll use this module to see if can fulfill our requirement. Thanks. |
Maybe we can start with this new feature request in #853, since |
Personally, I think we should move community.vmware/plugins/modules/vmware_guest.py Line 1011 in 99eef38
to module_utils and, as a second step, make You see, I think we've build up a lot of technical debt by implementing more and more features. But we're not working on paying this dept back. But that's just my opinion. Let's see what @Akasurde, @goneri, and @sky-joker think about this. |
Move PyVmomiDeviceHelper to module_utils.vm_device_helper SUMMARY I think we should move the class PyVmomiDeviceHelper from vmware_guest to a module util. This way, we can use it in other modules (like vmware_guest_disk) and avoid duplicate code. In the long run, I hope this'll make it easier for us to maintain this collection. ISSUE TYPE Feature Pull Request COMPONENT NAME vmware_guest ADDITIONAL INFORMATION Context: #905 Reviewed-by: Diane Wang <None> Reviewed-by: sky-joker <[email protected]> Reviewed-by: Mario Lenz <[email protected]> Reviewed-by: Abhijeet Kasurde <None>
Since PyVmomiDeviceHelper has been moved to module_utils, I'll close this issue. |
SUMMARY
ISSUE TYPE
COMPONENT NAME
vmware_guest_disk
ADDITIONAL INFORMATION
In current implementation, the new disk controllers and new disks are handled/configured separately as below, disk controllers will be added first, then new disks will be added. (There is error when add them at the same time when I tried to implement this way before.)
Normally there is no issue about this, but when we need to add a controller and a disk at the same time, e.g., NVMe controller and disk need to be added at the same time then guest OS can recognize this new disk on some ESXi host versions or some Linux guest OS. So I wonder if we can also make some changes on this module like "vmware_guest_network" module does, add one controller and one disk at the same time in one task, if users want to add more than one disks, execute this the task several times.
The text was updated successfully, but these errors were encountered: