mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-04 12:34:29 +01:00
Debian VM: keep a static IP without a snippets storage
The MAC-matched network snippet is a workaround for Ubuntu 26.04's NIC rename. Without a storage for snippets the run failed after the VM was built; Debian now keeps the static ipconfig0 Proxmox already set, as it did before September.
This commit is contained in:
+4
-1
@@ -191,7 +191,10 @@ if [ "$USE_CLOUD_INIT" == "yes" ] && declare -f setup_cloud_init >/dev/null 2>&1
|
||||
"${CLOUDINIT_GW:-}" \
|
||||
"${CLOUDINIT_DNS:-${CLOUDINIT_DNS_SERVERS:-1.1.1.1 8.8.8.8}}"
|
||||
|
||||
if [[ "${CLOUDINIT_NETWORK_MODE:-dhcp}" == "static" ]]; then
|
||||
if [[ "${CLOUDINIT_NETWORK_MODE:-dhcp}" == "static" && -z "${CLOUDINIT_SNIPPET_STORAGE:-}" ]] &&
|
||||
! pvesm status -content snippets 2>/dev/null | awk 'NR > 1 && $3 == "active" {found = 1} END {exit !found}'; then
|
||||
msg_warn "No storage with 'snippets' content: the static IP uses Proxmox's own cloud-init network config"
|
||||
elif [[ "${CLOUDINIT_NETWORK_MODE:-dhcp}" == "static" ]]; then
|
||||
setup_cloud_init_network_no_rename \
|
||||
"$VMID" \
|
||||
"$MAC" \
|
||||
|
||||
Reference in New Issue
Block a user