prueba 003

This commit is contained in:
trigkeyb
2025-01-09 21:06:16 +01:00
parent d8e64abba2
commit 1f349aeeeb
2 changed files with 4 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ VMNET="vmbr0"
qm stop $VMID qm stop $VMID
qm destroy $VMID qm destroy $VMID
qm create $VMID --name ubuntu-cloud --memory 8192 --cores 4 --net0 virtio,bridge=$VMNET --cpu host --agent enabled=1 --tags k8s qm create $VMID --name k8scp --memory 8192 --cores 4 --net0 virtio,bridge=$VMNET --cpu host --agent enabled=1 --tags k8s
qm set $VMID --ide2 VMs_storage-E:cloudinit --boot c --bootdisk scsi0 --serial0 socket --vga serial0 qm set $VMID --ide2 VMs_storage-E:cloudinit --boot c --bootdisk scsi0 --serial0 socket --vga serial0
# qm importdisk $VMID /mnt/pve/ISOs_storage/template/iso/ubuntu-24.04-server-cloudimg-amd64.img VMs_storage-E --format qcow2 # qm importdisk $VMID /mnt/pve/ISOs_storage/template/iso/ubuntu-24.04-server-cloudimg-amd64.img VMs_storage-E --format qcow2

View File

@@ -8,6 +8,7 @@ USER="curso"
PASSWORD="1" PASSWORD="1"
PASSWORD_HASH=$(openssl passwd -6 "$PASSWORD") PASSWORD_HASH=$(openssl passwd -6 "$PASSWORD")
PUB_KEY=$(cat ~/.ssh/id_rsa.pub) PUB_KEY=$(cat ~/.ssh/id_rsa.pub)
VMHOST="k8scp"
cat <<EOF > /mnt/pve/VMs_storage-E/snippets/user_data.yaml cat <<EOF > /mnt/pve/VMs_storage-E/snippets/user_data.yaml
#cloud-config #cloud-config
@@ -23,9 +24,9 @@ system_info:
ssh_authorized_keys: ssh_authorized_keys:
- $PUB_KEY - $PUB_KEY
ssh_pwauth: true ssh_pwauth: true
hostname: ubuntu-cloud hostname: $VMHOST
manage_etc_hosts: true manage_etc_hosts: true
fqdn: ubuntu-cloud fqdn: $VMHOST
runcmd: runcmd:
- cd /root - cd /root
- git clone https://git.lfgut.duckdns.org/luis/infra_cloudinit.git - git clone https://git.lfgut.duckdns.org/luis/infra_cloudinit.git