Update debian-13-fr-vm.sh
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Debian 13 VM – Version FR personnalisée
|
||||
# Basé sur community-scripts + adaptations
|
||||
|
||||
set -e
|
||||
|
||||
VMID=$(pvesh get /cluster/nextid)
|
||||
@@ -25,7 +22,6 @@ curl -fLO "$URL"
|
||||
|
||||
STORAGE="local-zfs"
|
||||
|
||||
echo "Création VM..."
|
||||
qm create $VMID \
|
||||
-name "$HN" \
|
||||
-memory $RAM_SIZE \
|
||||
@@ -47,13 +43,22 @@ qm set $VMID \
|
||||
# DHCP IPv4 cloud-init
|
||||
qm set $VMID --ipconfig0 ip=dhcp
|
||||
|
||||
# ===== Clavier + Locale FR =====
|
||||
# ===== Cloud-init FR + ROOT PASSWORD =====
|
||||
|
||||
SNIPPET_DIR="/var/lib/vz/snippets"
|
||||
mkdir -p "$SNIPPET_DIR"
|
||||
|
||||
cat > "$SNIPPET_DIR/${VMID}-user-data.yaml" <<EOF
|
||||
#cloud-config
|
||||
|
||||
disable_root: false
|
||||
ssh_pwauth: true
|
||||
|
||||
chpasswd:
|
||||
list: |
|
||||
root:root
|
||||
expire: false
|
||||
|
||||
locale: fr_FR.UTF-8
|
||||
|
||||
packages:
|
||||
@@ -82,5 +87,5 @@ EOF
|
||||
qm set $VMID --cicustom "user=local:snippets/${VMID}-user-data.yaml"
|
||||
|
||||
echo "VM Debian 13 créée avec succès : $VMID"
|
||||
echo "Bridge : dhcp | DHCP IPv4 activé | FR OK"
|
||||
echo "Bridge : dhcp | DHCP IPv4 | Clavier FR | root/root"
|
||||
echo "La VM n'est PAS démarrée automatiquement."
|
||||
Reference in New Issue
Block a user