Last active
September 17, 2024 21:17
-
-
Save salaros/b534f8fe8d0b484e7d520f0598ef8bc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VM_ID=8011 | |
VM_VOLUME=DATA | |
NET_BRIDGE=vmbr2 | |
IMG_PATH=/mnt/pve/DATA/template/iso/ubuntu-24.04-minimal-cloudimg-amd64.img | |
qm create $VM_ID --ostype l26 \ | |
--memory 8192 \ | |
--cpu host --socket 1 --cores 2 \ | |
--agent 1 \ | |
--bios ovmf \ | |
--machine q35 \ | |
--efidisk0 $VM_VOLUME:0,pre-enrolled-keys=0 \ | |
--vga serial0 \ | |
--serial0 socket \ | |
--net0 virtio,bridge=$NET_BRIDGE | |
qm importdisk $VM_ID $IMG_PATH $VM_VOLUME | |
qm set $VM_ID --scsihw virtio-scsi-pci --virtio0 DATA:$VM_ID/vm-$VM_ID-disk-1.raw,discard=on | |
#qm resize $VM_ID scsi1 20G | |
#qm set $VM_ID --boot order=scsi1 | |
qm set $VM_ID --scsi0 $VM_VOLUME:cloudinit | |
# qm set $VM_ID --ciuser root --cipassword ZYtest | |
qm set $VM_ID --boot order=virtio0 | |
#qm set $VM_ID --ipconfig0 ip=dhcp | |
#qm set $VM_ID --cicustom "user=$VM_VOLUME:snippets/k8s-node-ci.user.yaml,network=$VM_VOLUME:snippets/k8s-node-ci.network.yaml" | |
#qm set $VM_ID --cicustom "user=$VM_VOLUME:snippets/k8s-node-ci.yaml" | |
#qm cloudinit update $VM_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment