From 1f349aeeebe2b28bd43bd3b3c812f1991393f08f Mon Sep 17 00:00:00 2001 From: trigkeyb Date: Thu, 9 Jan 2025 21:06:16 +0100 Subject: [PATCH] prueba 003 --- crea_VM.sh | 2 +- genera_yaml_k8s.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/crea_VM.sh b/crea_VM.sh index 632d440..d3605b8 100755 --- a/crea_VM.sh +++ b/crea_VM.sh @@ -17,7 +17,7 @@ VMNET="vmbr0" qm stop $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 importdisk $VMID /mnt/pve/ISOs_storage/template/iso/ubuntu-24.04-server-cloudimg-amd64.img VMs_storage-E --format qcow2 diff --git a/genera_yaml_k8s.sh b/genera_yaml_k8s.sh index e438a90..3ae0738 100755 --- a/genera_yaml_k8s.sh +++ b/genera_yaml_k8s.sh @@ -8,6 +8,7 @@ USER="curso" PASSWORD="1" PASSWORD_HASH=$(openssl passwd -6 "$PASSWORD") PUB_KEY=$(cat ~/.ssh/id_rsa.pub) +VMHOST="k8scp" cat < /mnt/pve/VMs_storage-E/snippets/user_data.yaml #cloud-config @@ -23,9 +24,9 @@ system_info: ssh_authorized_keys: - $PUB_KEY ssh_pwauth: true -hostname: ubuntu-cloud +hostname: $VMHOST manage_etc_hosts: true -fqdn: ubuntu-cloud +fqdn: $VMHOST runcmd: - cd /root - git clone https://git.lfgut.duckdns.org/luis/infra_cloudinit.git