Deployment of a greenfield space with asset of only VMWare cluster + vCenter.
Task is to first build core assets… one of those being VM images (to then deploy initial git-runner into)
But issue is the Packer system when deployment via VPN, just picks first interface of system to deploy from. Vs the Virtual Interface which is “on” the LAN segment and so reachable to pull cloud init during build phase.
Ex:
Remote office/site 172.16.100.x/24
Ignition system IP 172.16.100.146
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:64:bb:0d brd ff:ff:ff:ff:ff:ff
inet 172.16.100.146/24 brd 172.16.100.255 scope global dynamic noprefixroute eth0
valid_lft 5429sec preferred_lft 5429sec
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:64:bb:0e brd ff:ff:ff:ff:ff:ff
inet 169.254.254.101/24 brd 169.254.254.255 scope link noprefixroute eth1
valid_lft forever preferred_lft forever
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 02:42:1e:67:32:b4 brd ff:ff:ff:ff:ff:ff
inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever
inet6 fe80::42:1eff:fe67:32b4/64 scope link
valid_lft forever preferred_lft forever
6: cscotun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1300 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.89.127.241/26 brd 10.89.127.255 scope global cscotun0
valid_lft forever preferred_lft forever
CISCO VPN Interface connection got lease 10.89.127.241 And this is the interface I need cloud-init to host and push as target for vm during build
Image pull works… vault gets all its correct keys / values / secrets. Image is pulled and cached local, and pushed to vCenter / cluster. VM creates and boots… but as example noted below, it defines cloud-init target for pull to pull against remote system’s first interface, not the VPN interface on that network.
GNU GRUB version 2.04
Minimal BASH-like line editing is supported... blah blah
grub> linux /casper/vmlinux --- autoinstall ds="nocloud-net;seedfrom=http://172.16.100.146:8027....blah
My idea is to set packer variable via prompt (doing that aready for other values) and somehow get packer to use this “IP” for listener of cloud-init services and pass that to build
Any articles / ideas on how to do this?
Thanks