compacta la creacion de la VM
This commit is contained in:
14
crea_VM.sh
14
crea_VM.sh
@@ -18,20 +18,12 @@ qm stop $VMID
|
||||
qm destroy $VMID
|
||||
|
||||
qm create $VMID --name ubuntu-cloud --memory 2048 --cores 2 --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
|
||||
qm importdisk $VMID /mnt/pve/ISOs_storage/template/iso/ubuntu-24.04-server-cloudimg-amd64.img local --format qcow2
|
||||
|
||||
qm set $VMID --scsihw virtio-scsi-pci --scsi0 $VMSTORAGE:$VMID/vm-$VMID-disk-0.qcow2
|
||||
|
||||
qm set $VMID --ide2 VMs_storage-E:cloudinit
|
||||
qm set $VMID --boot c --bootdisk scsi0
|
||||
qm set $VMID --serial0 socket --vga serial0
|
||||
|
||||
qm set $VMID --scsihw virtio-scsi-pci --scsi0 $VMSTORAGE:$VMID/vm-$VMID-disk-0.qcow2
|
||||
qm disk resize $VMID scsi0 10G
|
||||
|
||||
qm set $VMID --ipconfig0 ip=dhcp
|
||||
|
||||
qm set $VMID --cicustom "user=VMs_storage-E:snippets/user_data.yaml"
|
||||
qm set $VMID --ipconfig0 ip=dhcp --cicustom "user=VMs_storage-E:snippets/user_data.yaml"
|
||||
|
||||
qm start $VMID
|
||||
|
||||
Reference in New Issue
Block a user