Files
the_information_nexus/docs/tech_docs/proxmox_virtualmachines.md

5.7 KiB

Here are the updated configurations for VMs 500, 600, and 700, optimized for performance and based on best practices:

VM 500 (Debian 12):

agent: enabled=1
boot: c
bootdisk: scsi0
cores: 4
ide2: local:iso/debian-12.5.0-amd64-netinst.iso,media=cdrom,size=629M
cpu: host
kvm: 1
memory: 4096
name: debian-12
net0: virtio=BC:24:11:85:09:34,bridge=vmbr0
net1: virtio=BC:24:11:3B:2E:94,bridge=vmbr1
onboot: 1
scsi0: zfs-disk0:vm-500-disk-0,discard=on,size=64G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=7ccd0747-63bb-4626-b971-5f0ea27a3692
startup: order=1
vga: qxl

root@whitebox:/etc/pve/qemu-server# cat 501.conf

agent: 1
boot: order=scsi0;ide2;net0
cores: 2
cpu: x86-64-v2-AES
ide2: local:iso/debian-12.5.0-amd64-netinst.iso,media=cdrom,size=629M
memory: 2048
meta: creation-qemu=8.1.5,ctime=1713509174
name: debian12-1
net0: virtio=BC:24:11:0A:EC:C6,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: zfs-disk2:vm-501-disk-0,discard=on,iothread=1,size=64G
scsihw: virtio-scsi-single
smbios1: uuid=97afaa05-5ef4-48a5-afcd-54867b40eca0
sockets: 1

VM 600 (Ubuntu 22.04):

agent: enabled=1
boot: c
bootdisk: scsi0
cores: 8
cpu: host
kvm: 1
memory: 8192
name: ubuntu-22-04
net0: virtio=BC:24:11:85:09:35,bridge=vmbr0
net1: virtio=BC:24:11:3B:2E:95,bridge=vmbr1
numa: 1
numa0: memory=4096,hostnodes=0,cpus=0-3
numa1: memory=4096,hostnodes=1,cpus=4-7
onboot: 1
scsi0: zfs-disk0:vm-600-disk-0,discard=on,size=128G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=7ccd0747-63bb-4626-b971-5f0ea27a3693
startup: order=2
vga: qxl,memory=128
vmgenid: 137fbfab-cc44-4246-a558-67369061819b

VM 700 (Rocky Linux 9):

agent: enabled=1
boot: c
bootdisk: scsi0
cores: 6
cpu: host
kvm: 1
memory: 6144
name: rocky-linux-9
net0: virtio=BC:24:11:85:09:36,bridge=vmbr0
net1: virtio=BC:24:11:3B:2E:96,bridge=vmbr1
onboot: 1
scsi0: zfs-disk0:vm-700-disk-0,discard=on,size=96G,ssd=1
scsihw: virtio-scsi-pci
serial0: socket
smbios1: uuid=7ccd0747-63bb-4626-b971-5f0ea27a3694
startup: order=3
vga: qxl
vmgenid: 137fbfab-cc44-4246-a558-67369061819c
qm clone 500 501 --full --net0 virtio,bridge=vmbr0 --net1 virtio,bridge=vmbr1

Key changes and optimizations:

  1. Increased CPU cores for better performance (4 cores for VM 500, 8 cores for VM 600, and 6 cores for VM 700).
  2. Set cpu: host to match the host's CPU model for optimal performance.
  3. Explicitly enabled KVM hardware virtualization with kvm: 1.
  4. Increased memory allocation (4GB for VM 500, 8GB for VM 600, and 6GB for VM 700).
  5. Increased disk sizes (64GB for VM 500, 128GB for VM 600, and 96GB for VM 700) and set ssd=1 for SSD emulation.
  6. Configured NUMA for VM 600 to optimize memory access and CPU utilization.
  7. Set vga: qxl and increased GPU memory for VM 600 to enhance desktop performance.
  8. Adjusted startup order to prioritize VMs based on their importance.

These configurations prioritize performance by allocating more CPU cores, memory, and disk space to the VMs. They also leverage features like KVM hardware virtualization, NUMA, and SSD emulation to further enhance performance.

Remember to monitor the resource utilization and performance of the VMs and make necessary adjustments based on your specific workload and requirements.


Here's a guide to help you manage your VMs using the qm command-line tool in Proxmox VE:

  1. Creating a VM: Use the qm create command to create a new VM. Specify the VM ID, OS type, disk size, and other parameters. Example:

    qm create 100 --memory 1024 --net0 virtio,bridge=vmbr0 --bootdisk sata0 --ostype l26 --sockets 1 --cores 2 --sata0 local-lvm:32,format=qcow2
    
  2. Configuring VM Hardware: Use the qm set command to modify VM hardware settings such as CPU, memory, network, and disk. Examples:

    • Set CPU cores: qm set 100 --cores 4
    • Set memory: qm set 100 --memory 2048
    • Add a network device: qm set 100 --net1 virtio,bridge=vmbr1
    • Add a disk: qm set 100 --sata1 local-lvm:64,format=qcow2
  3. Starting and Stopping VMs:

    • Start a VM: qm start 100
    • Stop a VM: qm stop 100
    • Shutdown a VM gracefully: qm shutdown 100
    • Reset a VM: qm reset 100
  4. Cloning and Templating:

    • Clone a VM: qm clone 100 101
    • Create a template from a VM: qm template 100
    • Create a new VM from a template: qm clone 100 102 --name "New VM"
  5. Managing Snapshots:

    • Create a snapshot: qm snapshot 100 snap1
    • List snapshots: qm listsnapshot 100
    • Restore a snapshot: qm rollback 100 snap1
    • Delete a snapshot: qm delsnapshot 100 snap1
  6. Migrating VMs:

    • Offline migration: qm migrate 100 pve2 --online 0
    • Online migration: qm migrate 100 pve2 --online 1
  7. Backup and Restore:

    • Backup a VM: vzdump 100 --storage local --compress lzo
    • Restore a VM: qmrestore 100 vzdump-qemu-100-2023_05_20-14_30_00.vma.lzo --storage local-lvm
  8. Monitoring VM Performance:

    • Show VM status: qm status 100
    • Show VM configuration: qm config 100
    • Show VM usage statistics: qm monitor 100
  9. Accessing VM Console:

    • Access VM console: qm terminal 100
  10. Managing VM Disks:

    • Move a VM disk to a different storage: qm move-disk 100 scsi0 local-lvm
    • Resize a VM disk: qm resize 100 scsi0 +10G

Remember to replace 100 with the actual VM ID you want to manage.

These are just a few examples of what you can do with the qm command. For a complete list of available options and commands, refer to the qm manual page by running man qm.

Always make sure to have proper backups of your VMs before performing any major operations. Regularly monitor your VMs' resource usage and performance to ensure optimal operation.

Feel free to explore and experiment with different commands and options to effectively manage your VMs in Proxmox VE.