project-pegaprox icon indicating copy to clipboard operation
project-pegaprox copied to clipboard

[Bug] V2P: Discard and SSD emulation from the migration dialog are not applied to the disk

Open ThomasRie opened this issue 1 month ago • 4 comments

Describe the bug

"SSD Emulation" and "Discard (TRIM): on" in the Advanced tab of the migration dialog are not applied. After the migration scsi0 has neither discard=on nor ssd=1, in every transfer mode I tried (offline copy, live mirror, auto, live clone).

On thin storage (Ceph RBD here) the full disk stays allocated until discard is set by hand and the guest trims: 60 GiB instead of 26 GiB for a Windows Server 2025 guest, 32 GiB instead of 4.7 GiB for Debian.

Setting it by hand afterwards works:

qm set <vmid> --scsi0 <storage>:vm-<vmid>-disk-0,discard=on,ssd=1

Steps to Reproduce

  1. Migrate any VM from ESXi, Advanced tab: SSD Emulation on, Discard (TRIM) on.
  2. qm config <vmid> | grep scsi0

Expected behavior

scsi0: …,discard=on,ssd=1 as selected in the dialog.

Environment

  • PegaProx Version: 1.4.1 (build 2026.10.24)
  • Installation Method: Debian package (pegaprox 1.4.1-1)
  • OS: Debian 13 (trixie)
  • UI? Corporate
  • Browser: Chrome (latest)
  • Behind Reverse Proxy? No
  • Source / Target: standalone ESXi 8.0U3 (VMFS6) → Proxmox VE 9, 3 nodes, Ceph RBD

Logs

# qm config 100 | grep scsi0   (SSD Emulation and Discard on in the dialog)
scsi0: vm-rbd:vm-100-disk-0,size=60G

Screenshots

n/a

Checklist

  • [x] I have searched existing issues to make sure this is not a duplicate
  • [x] I am using the latest version of PegaProx
  • [x] I've put enough in here that someone can start on it without asking me three questions first
  • [x] I understand PegaProx is maintained by volunteers in their free time. Nobody is on call, and writing URGENT doesn't get anyone out of bed 🪄

ThomasRie avatar Nov 05 '26 14:11 ThomasRie

For the record, since #1255 was closed for the checklist and not for the change itself: I had tested it in my lab against 1.4.1 on real hardware (ESXi 8.0U3g → PVE 9 with Ceph RBD), with the offline copy, live mirror and live-clone, Debian and Windows Server 2025. scsi0 came out with discard=on,ssd=1 every time, TRIM reached Ceph (rbd du 32 → 4.7 GiB on Debian, 60 → 26 GiB on Windows). Details are in my comments on #1255.

So this issue is still open on Testing. Happy to test again if the PR is reopened or someone picks it up.

ThomasRie avatar Nov 09 '26 08:11 ThomasRie

Hey, thanks for the follow-up and for keeping the numbers in one place. You're right: on Testing the Discard and SSD choices from the dialog are still read into the migration task but never written to the disk line, so this stays open. Your offline, live mirror and live clone results from the closed PR are exactly what a fix gets checked against.

mkellermann97 avatar Nov 09 '26 14:11 mkellermann97

1.5.0 is out and Discard and SSD emulation from the dialog now reach the migrated disks. Closing, thanks for reporting.

MrMasterbay avatar Nov 15 '26 01:11 MrMasterbay

Retested on 1.5.0-1: confirmed fixed with Live Mirror (Windows) and Auto/vmkfstools_clone (Debian). scsi0 ends with discard=on,ssd=1; the guest sees an SSD (Get-PhysicalDisk MediaType SSD, Linux DISC-GRAN 4K, ROTA 0).

ThomasRie avatar Nov 16 '26 09:11 ThomasRie