Closed cattywampus closed 4 years ago
Thanks for the contribution. Looks great and looking forward to leveraging this functionality as well.
Would love to see this merged/released soon. We could really use it!
I am basing some changes off of this, and adding Windows support too (will raise PR in due course). For what it is worth this PR works with my Linux builds and DHCP too, so using it locally until this PR is merged.
Thanks @clintoncwolfe. I was able to test it with a static IP address, should have mentioned this in the description (will update).
I'm new to the RbVmomi API. Still kind of feeling my way around and having trouble finding a good source of documentation. My best source of reference for what it provides and how it's used has been the no longer supported chef-provisioning-vsphere gem.
@cattywampus actually I apologize as I previously shared the incorrect link. Misplacing my resources these days. The VIM operations map to Managed and Data objects in https://code.vmware.com/apis/196/vsphere/doc/. Still new to it, but that was my resources.
Description
This changes updates the
CustomizationSpec
applied to the cloned VM so that it's IP address can be generated automatically using DHCP if a fixed IPv4 address is not specified. To make this possible the validations on the guest customization settings had to be adjusted to allowip_address
,subnet_mask
, andgateway
to be optional instead of required. Now if theip_address
is omitted the VM's customization spec will use theCustomizationDhcpIpGenerator
when setting up the customized ip settings.I tested this by:
ip_address
,gateway
, andsubnet
and successfully leased a DHCP addressSigned-off-by: Keith Walters kwalters@taphere.com
Related Issue
Issue #109
Types of changes
Checklist: