Update debian-13-fr-vm.sh

This commit is contained in:
2026-02-21 17:10:31 +01:00
parent 5ecc21bb9d
commit 0629eadf85

View File

@@ -7,7 +7,7 @@ HN="debian13"
BRG="dhcp" BRG="dhcp"
CORE_COUNT="2" CORE_COUNT="2"
RAM_SIZE="2048" RAM_SIZE="2048"
DISK_SIZE="8G" DISK_SIZE="40G"
echo "Création VM Debian 13 ID: $VMID" echo "Création VM Debian 13 ID: $VMID"
@@ -40,8 +40,18 @@ qm set $VMID \
-serial0 socket \ -serial0 socket \
-scsi1 ${STORAGE}:cloudinit -scsi1 ${STORAGE}:cloudinit
# DHCP IPv4 cloud-init
qm set $VMID --ipconfig0 ip=dhcp # DHCP IPv4 dans l'UI cloud-init
qm set "$VMID" --ipconfig0 ip=dhcp >/dev/null
# Root user + password via Proxmox cloud-init (fiable)
qm set "$VMID" --ciuser root --cipassword "root" >/dev/null
# Meilleure résolution console
qm set "$VMID" --vga virtio >/dev/null
# Resize disque côté Proxmox
qm resize "$VMID" scsi0 "$DISK_SIZE" >/dev/null
# ===== Cloud-init FR + ROOT PASSWORD + PROXMOX AGENT ===== # ===== Cloud-init FR + ROOT PASSWORD + PROXMOX AGENT =====
@@ -54,6 +64,12 @@ cat > "$SNIPPET_DIR/${VMID}-user-data.yaml" <<EOF
disable_root: false disable_root: false
ssh_pwauth: true ssh_pwauth: true
growpart:
mode: auto
devices: ["/"]
ignore_growroot_disabled: false
resize_rootfs: true
chpasswd: chpasswd:
list: | list: |
root:root root:root