ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

attach_guest_tools_iso: true on vm create also requires operatingSystem: field = os_windows_server_2012 #50

Closed ddemlow closed 1 year ago

ddemlow commented 1 year ago

currently operatingSystem field is not exposed in module and can't be set (however is in native rest api)

simplest solution would be to add operatingSystem field to vm module and require user to set both attach AND operatingSystem correctly. and thinking about this further - even though it doesn't really change any behavior (beyond the attach_guest_tools) - it is useful for reporting / filtering ... some users may want to depend on this value to be able to store which VM's are running Windows vs. Other (only values the UI allows) ... UI also does allow it to be changed when VM is powered off (likely this is one that UI doesn't enforce)

image

additionally might want to pass operatingsystem = windows value IF attach_guest_tools_iso: true since both are required to meet user desired state?

domendobnikar commented 1 year ago

We can try first by adding the operatingsystem field in the vm module, hopefully this will then work. Is operatingsystem connected to anything else besides the guest_tools ISO? In case operatingsystem is connected to other parameters of the VM, addition of operatingsystem might create bugs in other modules. If that is the case, we would need more time and probably divide this task into smaller pieces. @dradX @ddemlow @TomboScaleComputing

domendobnikar commented 1 year ago

operating_system was also added vm_params. OS can be changed while VM is running but changing it has no impact on attach_guest_tools or the ISO that it attached, it is purely for "cleanup" reasons.