-
-
Notifications
You must be signed in to change notification settings - Fork 46
Dev
DVNILXP edited this page Nov 6, 2025
·
2 revisions
vmx
# === NESTED VIRTUALIZATION (KVM dentro de Proxmox) ===
vhv.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"
monitor.virtual_mmu = "automatic"
monitor.virtual_exec = "automatic"
# ======================================================
Host
# === Cambiar el nombre corto del host en Proxmox (sin FQDN) ===
# Ejecuta como root
NUEVO="pve01" # <-- pon aquí el nuevo nombre corto (sin puntos)
# 1) Aplica el hostname corto
hostnamectl set-hostname "$NUEVO"
# 2) Actualiza /etc/hosts para reflejar el nuevo nombre
IP="$(ip -4 route get 1.1.1.1 | awk '{for(i=1;i<=NF;i++) if($i=="src"){print $(i+1); exit}}')"
cp -a /etc/hosts "/etc/hosts.bak.$(date +%F_%H%M%S)"
# 127.0.1.1 -> nombre corto
if grep -q "^127\.0\.1\.1" /etc/hosts; then
sed -i -E "s/^(127\.0\.1\.1\s+).*/\1$NUEVO/" /etc/hosts
else
echo "127.0.1.1 $NUEVO" >> /etc/hosts
fi
# Mapeo de la IP de gestión -> nombre corto
if grep -q "^$IP " /etc/hosts; then
sed -i -E "s|^$IP .*|$IP $NUEVO|" /etc/hosts
else
echo "$IP $NUEVO" >> /etc/hosts
fi
# 3) Regenera certificados y reinicia servicios de Proxmox
pvecm updatecerts --force
systemctl restart pveproxy pvedaemon
# 4) Comprobación
hostname -s # debería mostrar: p.ej. pve01