Last active
January 9, 2024 13:02
-
-
Save kkroesch/65e2f4449007915c1f87fdd5645f361f to your computer and use it in GitHub Desktop.
Create VM via Proxmox VM Command Line Tools
This file contains hidden or 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
## Get cloud image | |
cd /storage | |
wget https://cloud-images.ubuntu.com/lunar/current/lunar-server-cloudimg-amd64.img | |
## Create and configure Machine | |
qm create 101 --name ubuntu-lunar-template --memory 512 --net0 virtio,bridge=vmbr0 | |
qm importdisk 101 /storage/lunar-server-cloudimg-amd64.img VDI -format qcow2 | |
qm set 101 --scsihw virtio-scsi-pci --scsi0 VDI:vm-101-disk-0 | |
qm set 101 --ide2 local:cloudinit --boot c --bootdisk scsi0 --serial0 socket --vga serial0 | |
qm resize 101 scsi0 +30G | |
qm set 101 --ipconfig0 ip=dhcp | |
#qm set 101 --ipconfig0 ip=10.10.10.222/24,gw=10.10.10.1 | |
qm set 101 --sshkey ~/.ssh/id_rsa.pub | |
qm cloudinit dump 101 user | |
qm template 101 | |
qm clone 101 9001 --name dns-server | |
qm start 9001 | |
rm -v bionic-server-cloudimg-amd64.img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment