1

I searched entire internet haven't see any solution for it yet.

I have a OVH + Proxmox instance. Plan to automatic the launch VM process. I know I can try use cloud-init but since I use Packer + (maybe) Terraform for the ESXi at home, so I want to try to use same thing for the Proxmox cloud as well.

Current setup:

  • I have packer.json, well configured.
  • I have a debian-preseed.cfg.

When install ESXi, the preseed.cfg was hosted locally and use private ip. Which works well.

However, the Proxmox on OVH can't reach my local preseed, so I decide to host it on AWS S3. Then that's when the issue concurred.

Issue: the VM building Proxmox image can't reach the preseed file on AWS - https://bucket-name.s3.regions.amazonaws.com/dir/debian-preseed.cfg

I spent few hours try to figure out what's the root cause. It seems like the VM's network isn't configured properly.

I am using DHCP + Mac-To-Static IP to make installation process easier. I am pretty sure it works if I manually install the VM. However, it seems like the IP and network only reachable after debian installation?

Is there any reason this doesn't work? Should I switch to use bridge+private IP first then manually setup the public IP later once I am using it?

1 Answer 1

0

The issue might lie in (un)predictable network interfaces.

The image might have in /etc/network/interfaces something like:

auto ens4 iface ens4 inet dhcp mtu 1500 

Which might work on local or might not work when deployed elsewhere.

When building a VM image you could disable (un)predictable network interfaces

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0" 

and assume that your single interface will be named eth0.

OVH is also using Packer for building images, but cloud-init as well.

cloud-init on first run

  1. sets hostname, see /var/lib/cloud/data/set-hostname
  2. updates /etc/hosts
  3. attempts to configure networking (see e.g. /etc/network/interfaces.d/50-cloud-init)
  4. removes /var/lib/cloud/data/no-net

This approach makes sense when you can't predict interfaces naming at the time of building VM image.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.