Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-22560

IPv6 and Userdata based VM deployment fails with error Failed to create a compute VMWare (vm.example.com) (VMware) instance client.example.com: expected array for 'ip', got CustomizationFixedIpV6

XMLWordPrintable

    • 0
    • False
    • Critical
    • sat-rocket
    • None
    • None
    • None
    • None
    • No

      Description of problem:

      The end-user trying provision a VM in VSphere using an adapted version of the default UserData open-vm-tools template which reads

      nicSettingMap:
      <%- @host.interfaces.each do |interface| -%>
      <%- next unless interface.subnet -%>
        - adapter:
            dnsDomain: <%= interface.domain %>
            dnsServerList: [<%= interface.subnet.dns_servers.join(', ') %>]
            gateway: [<%= interface.subnet.gateway %>]
            ip: <%= interface.ip %>
            subnetMask: <%= interface.subnet.mask %>
            <% if interface.ip6 -%>ipV6Spec:
              ipAddress: "<%= interface.ip6 %>"
              subnetMask: 64
              gateway: ["<%= interface.subnet6.gateway %>"]
            <%- end -%>
      <%- end -%>
      

      But it fails with an error:

      Failed to create a compute VMWare (vm.example.com) (VMware) instance client.example.com: expected array for 'ip', got CustomizationFixedIpV6

      How reproducible:

      Cu already reported the same to the upstream, please check the below link for the same.

      https://github.com/fog/fog-vsphere/issues/290

      Steps to Reproduce:

      If you check the below link, you'll see the 'ip' field should be an array but if you see this is not mentioned like that.

      https://github.com/fog/fog-vsphere/blob/ddc5f494e72b15de375900d0c87afd9fdcde8b9c/lib/fog/vsphere/requests/compute/vm_clone.rb#L543C92-L543C92

      Actual results:

      custom_ipv6Spec = RbVmomi::VIM.CustomizationIPSettingsIpV6AddressSpec(ip: custom_ipv6)
      

      Expected results:

      custom_ipv6Spec = RbVmomi::VIM.CustomizationIPSettingsIpV6AddressSpec(ip: [custom_ipv6])
      

      Additional info:

      https://github.com/fog/fog-vsphere/commit/656d106f177256a44d69e189a61e67334c79e108

      https://github.com/fog/fog-vsphere/blob/ddc5f494e72b15de375900d0c87afd9fdcde8b9c/lib/fog/vsphere/requests/compute/vm_clone.rb#L543C92-L543C92

      https://github.com/fog/fog-vsphere/pull/291

      https://github.com/fog/fog-vsphere/issues/290

              Unassigned Unassigned
              rhn-support-sussen Susmita Sen
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: