20 lines
737 B
Bash
Executable File
20 lines
737 B
Bash
Executable File
source config.sh
|
|
|
|
|
|
# Genera la configuracion inicial de CLoudInit
|
|
./genera_yaml_k8s.sh
|
|
|
|
# apaga y borra la VM si existe antes
|
|
qm stop $VMID
|
|
qm destroy $VMID
|
|
|
|
qm create $VMID --name $VMHOST --memory $VRAM --cores $VCORES --net0 virtio,bridge=$VMNET --cpu host --agent enabled=1 --tags docker
|
|
qm set $VMID --ide2 $VMSTORAGE:cloudinit --boot c --bootdisk scsi0 --serial0 socket --vga serial0
|
|
|
|
qm importdisk $VMID /mnt/pve/ISOs_storage/template/iso/ubuntu-24.04-minimal-cloudimg-amd64.img $VMSTORAGE --format qcow2
|
|
qm set $VMID --scsihw virtio-scsi-pci --scsi0 $VMSTORAGE:$VMID/vm-$VMID-disk-0.qcow2
|
|
qm disk resize $VMID scsi0 40G
|
|
qm set $VMID --ipconfig0 ip=dhcp --cicustom "user=$VMSTORAGE:snippets/user_data-docker.yaml"
|
|
|
|
qm start $VMID
|