This message was deleted.
# vsphere
a
This message was deleted.
a
Obvious question - are you out of assigned ips in that pool? What is shown when you hover your mouse over the red exclamation point?
b
Yes, this is a fresh setup...no IPs have been allocated yet. I have a case open with VMware to hopefully figure out what the issue is. Getting a similar issue in vCenter deploying a VM directly in vCenter and enabling vApp Options to use the pool. There are ips in the pool, but vCenter does not "see" them.
s
@blue-jelly-47972 Another question, what does your ip address assignment look like in the network profile? Not looking at the numbers but more the syntax at the end.
b
Not sure what you mean by "syntax at the end", but here's the Profile
Template Config
Copy code
write_files:
  - path: /tmp/configure-network.sh
    content: |
        #!/bin/bash
        vmtoolsd --cmd 'info-get guestinfo.ovfEnv' > /tmp/ovfenv
        IPAddress=$(sed -n 's/.*Property oe:key="guestinfo.interface.0.ip.0.address" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
        SubnetMask=$(sed -n 's/.*Property oe:key="guestinfo.interface.0.ip.0.netmask" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
        Gateway=$(sed -n 's/.*Property oe:key="guestinfo.interface.0.route.0.gateway" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
        DNS=$(sed -n 's/.*Property oe:key="guestinfo.dns.servers" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)

        echo 'Creating network config'
        cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
        # Generated by Cloud-init for Rancher
        NAME=eth0
        GATEWAY=$Gateway
        DNS1=$DNS
        DOMAIN="domain.com"
        DEVICE=eth0
        ONBOOT=yes
        USERCTL=no
        BOOTPROTO=static
        NETMASK=$SubnetMask
        IPADDR=$IPAddress
        PEERDNS=no

        check_link_down() {
         return 1;
        }
        EOF
        
        cat > /etc/sysconfig/network-scripts/route-eth0 <<EOF
        # Generated by Cloud-init for Rancher
        10.7.8.0/21 via 10.7.15.254 dev eth0
        EOF

        echo 'Reload network config'
        sudo systemctl restart NetworkManager
        sudo hostnamectl set-hostname $IPAddress2
runcmd:
  - bash /tmp/configure-network.sh
s
Ip address looks wrong
In the vapp
b
ah yeah, I see that -- should be the portgroup name. I was testing by network profile name vs the portgroup name
same thing
s
No the formatting is wrong
Where are the braces
b
${netmask:rck3237trunk}
s
The ip address one
b
David's blog doesnt show curly brackets in the IP value
a
For the IP address it's not required
👍 1
s
i have used this and it works for me: ${autoIp:internal} internal here is the network name. works for me, so up to you @blue-jelly-47972. just sharing what i did
b
i will give that a shot!
Much appreciated! 🙂
same thing unfortunately....
s
Ip range is different from subnet?
b
ip range is a /21 so 10.7.8.0-10.7.15.254
s
Ok. Sounds like a vmware thing. Let's see what they come back with. What version of vcentre and esxi do you have
b
7.0.3 -- mix of f and g on the hosts.
thank you for your input... really do appreciate your time! 🙂
s
Interesting. At work and home I have vcentre 7 and 6.5 esxi and they both work.
If it was me for troubleshooting purposes I would try with 24, instead of 21 and the ip address pools on the same range as the subnet mask
If that works Then troubleshoot from there as a base. Because for me I know that this approach works. I have implemented it on two sites