Update docs/tech_docs/proxmox_virtualmachines.md

This commit is contained in:
2024-04-28 23:12:52 +00:00
parent f3c5a788a3
commit 9b713a7106

View File

@@ -1,3 +1,130 @@
Certainly! Based on the documentation and context you provided, I have created optimized configurations for two new Windows-based VMs: VM 810 (Windows 7 VDI for general office use) and VM 860 (Windows Server 2016 for Active Directory purposes). These configurations incorporate the best practices and optimizations discussed earlier.
VM 810 (Windows 7 VDI for General Office Use):
```bash
agent: 1
balloon: 1024
bios: seabios
boot: order=scsi0;ide2;net0
cores: 2
cpu: host,flags=+pcid,hidden=1,kvm=off
hotplug: disk,network,usb
ide2: zfs-disk0:iso/Win7_Pro_SP1_English_x64.iso,media=cdrom,size=4G
kvm: 1
memory: 4096
name: windows-7-vdi
net0: virtio=BC:24:11:85:09:38,bridge=vmbr0,firewall=1,tag=500
numa: 0
onboot: 1
ostype: win7
scsi0: zfs-disk0:vm-810-disk-0,size=64G,ssd=1,discard=on,iothread=1,cache=none,format=qcow2
scsihw: virtio-scsi-single
serial0: socket
smbios1: uuid=7ccd0747-63bb-4626-b971-5f0ea27a3696
sockets: 1
tablet: 1
vga: std
vmgenid: 137fbfab-cc44-4246-a558-67369061819e
```
Key points for VM 810:
- Optimized CPU and memory configuration for a general office use VDI.
- Used SeaBIOS (`bios: seabios`) for better compatibility with Windows 7.
- Included an ISO file (`ide2`) for easy installation of Windows 7.
- Enabled the `tablet` device for improved input handling in the VDI environment.
- Used the `std` VGA adapter since Windows 7 doesn't require advanced graphics.
VM 860 (Windows Server 2016 for Active Directory):
```bash
agent: 1
balloon: 2048
bios: ovmf
boot: order=scsi0;net0
cores: 4
cpu: host,flags=+pcid,hidden=1,kvm=off
hotplug: disk,network,usb
kvm: 1
memory: 8192
name: windows-server-2016-ad
net0: virtio=BC:24:11:85:09:39,bridge=vmbr0,firewall=1,tag=600
net1: virtio=BC:24:11:3B:2E:97,bridge=vmbr1,firewall=1,tag=601
numa: 0
onboot: 1
ostype: win2016
scsi0: zfs-disk0:vm-860-disk-0,size=128G,ssd=1,discard=on,iothread=1,cache=none,format=qcow2
scsihw: virtio-scsi-single
serial0: socket
smbios1: uuid=7ccd0747-63bb-4626-b971-5f0ea27a3697
sockets: 1
vga: serial0,type=qxl
vmgenid: 137fbfab-cc44-4246-a558-67369061819f
```
Key points for VM 860:
- Allocated more CPU cores and memory to handle Active Directory workloads.
- Used OVMF (`bios: ovmf`) for better compatibility and features with Windows Server 2016.
- Configured two network interfaces (`net0` and `net1`) for separating management and AD traffic.
- Provided a larger disk size (`size=128G`) to accommodate AD database growth.
- Used QXL VGA (`vga: serial0,type=qxl`) for improved remote management graphics.
These configurations follow the best practices and optimizations discussed in the provided documentation. They include CPU and memory optimizations, disk and network abstractions, guest agent integration, and appropriate virtual hardware settings for each use case.
Remember to thoroughly test these configurations in your environment and make any necessary adjustments based on your specific requirements and performance observations.
VM 870 (Windows 10 Gaming with GPU Passthrough):
```bash
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 1024
bios: ovmf
boot: order=scsi0;net0
cores: 8
cpu: host,hidden=1,flags=+pcid,hv-vendor-id=nvidia
efidisk0: zfs-disk0:vm-870-disk-1,size=128K
hostpci0: 01:00,pcie=1,x-vga=1,romfile=vbios_patched.bin,rombar=0
hostpci1: 01:00.1
hotplug: network,usb
ivshmem: size=128,name=looking-glass
kvm: 1
machine: pc-q35-7.2
memory: 16384
name: windows-10-gaming
net0: virtio=BC:24:11:85:09:3A,bridge=vmbr0,firewall=1,tag=700
numa: 0
onboot: 1
ostype: win10
scsi0: zfs-disk0:vm-870-disk-0,size=256G,ssd=1,discard=on,iothread=1,cache=none,format=qcow2
scsihw: virtio-scsi-single
smbios1: uuid=7ccd0747-63bb-4626-b971-5f0ea27a3698
sockets: 1
tablet: 1
usb0: host=04b4:0101
usb1: host=258a:0001
vga: none
vmgenid: 137fbfab-cc44-4246-a558-67369061819e
```
Key points for VM 870:
- Assigned 8 CPU cores and 16GB of memory for optimal gaming performance.
- Used the Q35 machine type (`machine: pc-q35-7.2`) for better compatibility with PCIe passthrough.
- Configured GPU passthrough with `hostpci0` and `hostpci1` for dedicated graphics performance.
- Included `romfile` and `rombar` options for GPU VBIOS compatibility.
- Added `args` with specific CPU flags and `hv-vendor-id` for better performance and compatibility.
- Set `kvm=off` in `args` to hide KVM virtualization from the guest.
- Allocated a larger disk (`size=256G`) for game installations and storage.
- Configured an `ivshmem` device for shared memory communication with Looking Glass.
- Passed through specific USB devices (`usb0` and `usb1`) for direct input handling.
- Set `vga: none` since the GPU is passed through directly.
- Created an EFI disk (`efidisk0`) for OVMF boot support.
This configuration is tailored for a high-performance gaming experience with full GPU passthrough and optimized CPU and memory settings. The OS abstraction is achieved through the use of hidden KVM virtualization, specific CPU flags, and the Q35 machine type.
The `ivshmem` device is configured to facilitate seamless remote gaming with Looking Glass, allowing you to access the gaming VM's display and input remotely.
Remember to replace the `hostpci0` and `hostpci1` values with the actual PCI IDs of your GPU, and ensure that the GPU supports passthrough and has a compatible VBIOS. Also, adjust the USB device passthrough (`usb0` and `usb1`) based on your specific input devices.
As always, thoroughly test the configuration and make any necessary adjustments based on your specific hardware and performance requirements.
Absolutely! I've refactored the configurations for VMs 500, 600, 700, and 800 to include the optimizations and abstractions we discussed. Here are the updated configurations:
VM 500 (Debian 12):