Update readme.md

This commit is contained in:
2025-11-12 14:32:16 +01:00
parent c7fc65960e
commit 69634a5e8f

119
readme.md
View File

@@ -34,4 +34,123 @@ Run this PowerShell script inside the VM (as Administrator):
```powershell
Set-ExecutionPolicy Bypass -Scope Process -Force
irm https://git.voskuil.cloud/marco/scripts/raw/branch/main/Prep-VirtIODrivers.ps1 | iex
```
This mounts the VirtIO ISO, injects `vioscsi`, `viostor`, `NetKVM`, and `Balloon` drivers,
and makes them available in the Windows driver store.
---
## 🧱 2. Install tools on the Proxmox host
```bash
apt update
apt install virt-v2v libguestfs-tools -y
```
---
## 🚀 3. Run the conversion
Replace the example values with your own host and VM names.
```bash
export LIBGUESTFS_BACKEND=direct
virt-v2v -ic esx://root@esx01.gpeu.local/?no_verify=1 -o local -os /var/lib/vz/images/9001 "WIN2025-SRV"
```
- `esx01.gpeu.local` → your ESXi host
- `WIN2025-SRV` → your VM name on ESXi
- `9001` → the VMID you plan to use in Proxmox
This converts the VMs disks and configuration to a Proxmox-compatible format.
---
## 🖥️ 4. Create and attach the VM in Proxmox
```bash
qm create 9001 --name WIN2025-SRV --memory 8192 --cores 4 --scsihw virtio-scsi-pci
qm importdisk 9001 /var/lib/vz/images/9001/*.qcow2 local-lvm
qm set 9001 --scsi0 local-lvm:vm-9001-disk-0 --boot order=scsi0
qm set 9001 --net0 virtio,bridge=vmbr0
qm set 9001 --ide2 local:iso/virtio-win.iso,media=cdrom
```
---
## 🪄 5. Boot and finalize in Proxmox
1. Start the VM.
- If the PowerShell prep script was used → Windows should boot normally.
- If not → boot once from the Windows ISO, open a repair prompt, and inject the drivers manually:
```cmd
dism /image:C:\ /add-driver /driver:D:\viostor\w11\amd64 /forceunsigned
dism /image:C:\ /add-driver /driver:D:\NetKVM\w11\amd64 /forceunsigned
```
2. Once booted, run:
```
D:\virtio-win-guest-tools.exe
```
(installs QEMU Guest Agent, Balloon, network, and display drivers)
---
## ⚙️ Optional: VMDK import (manual method)
If you prefer manual import:
```bash
scp /vmfs/volumes/datastore1/WIN2025-SRV/*.vmdk root@pve01:/var/lib/vz/images/9001/
qm importdisk 9001 /var/lib/vz/images/9001/WS2025.vmdk local-lvm
qm set 9001 --scsi0 local-lvm:vm-9001-disk-0 --boot order=scsi0
```
Then attach the VirtIO ISO and repeat the driver installation steps inside Windows.
---
## 💡 Tips
- Always set your Proxmox disk controller to **VirtIO-SCSI**.
- For best performance use **VirtIO (paravirtualized)** NIC.
- Once migrated, snapshot and back up from Proxmox before deleting the ESXi copy.
- You can repeat the same process for Linux VMs — no VirtIO ISO needed.
---
### ✅ Example network bridge config (for VLANs)
If your 10-GbE trunk carries all VLANs and you need VLAN-specific bridges:
```ini
auto ens1f0
iface ens1f0 inet manual
auto ens1f0.120
iface ens1f0.120 inet manual
vlan-raw-device ens1f0
auto vmbr120
iface vmbr120 inet manual
bridge-ports ens1f0.120
bridge-stp off
bridge-fd 0
```
VMs connected to `vmbr120` will automatically be placed in VLAN 120.
---
### 🏁 Result
After these steps:
- Your Windows Server 2025 VM boots on Proxmox without BSOD.
- Disk and network use VirtIO drivers.
- QEMU Guest Agent works (clean shutdowns, IP reporting).
- Migration from ESXi to Proxmox completed with full functionality.
---