Direct Disk passthrough to a Win10 VM

Bytales

Member
Oct 8, 2018
34
1
6
40
I have a Proxmox installed on a NVME 250GB WD disk, gave it the whole disk, This is plugged into the only Motherboard NVME Slot.

Further, i have a PCI Express 3.0 16x Card, which supports up to 4 PCI Express 3.0 4x NVME drives.
here i have a Samsung 960 Evo 250 GB, and a Samsung 950 PRO 512 GB

The ideeas was to give the drives directly to the Windows VM, the 250 GB as Windows Partition, and the 512 GB as a "Programs/Games" Partition.

I have succesfully passed the disk directly, as instructed here
https://pve.proxmox.com/wiki/Physical_disk_to_kvm

The line that i used is similar to this
qm set 592 -virtio2 /dev/disk/by-id/ata-ST3000DM001-1CH166_Z1F41BLC

It works ok, but the disks still appear in Windows as a Virtio Disk

is there any way to pass them through so that they may appear as a Samsung SSD ? Like as in the physical dievice itself appears as being connected to VM ?

Say i install the Windows on the 250gb ssd, and use the 512gb ssd as a Partition for games.
If i then take out the 512gb disk, and connect it to a Laptop that has Windows 10, would this Windows from Laptop be able to see the files created in that Windows VM on the 512GB SSD (becuase it was attached directly as a Samsung ssd) ?

Or would files created on These disk, even if through virtio, would These bee seeable to another Windows PC if i connect These SSD to another Windows 10 machine ?
Or would it only work if the drives were directly passed through (not as virtio drives but directly as Samsung ssds) ?
 
Last edited:
is there any way to pass them through so that they may appear as a Samsung SSD ? Like as in the physical dievice itself appears as being connected to VM ?
with sata no, the pcie disks you can passthrough with 'hostpci'

i would recommend to use 'scsi' instead of virtio for the disk passthrough, i will update the wiki article some time this week
 
If i then take out the 512gb disk, and connect it to a Laptop that has Windows 10, would this Windows from Laptop be able to see the files created in that Windows VM on the 512GB SSD (becuase it was attached directly as a Samsung ssd) ?
yes
 
Its not a PCI SSD, but a PCI Card with 4 NVME Slots. I think the Hosts sees 4 PCI express attached NVME Controllers. And i think These cna be passed through directly.
With a SATA hdd, i think i Need to do it by device id.

Now the question is, since my disks were passed directly by id with VirtIO.
If i pass directly their NVME Controllers to the VM, making them appear in Windows as Samsung SSD, do i Need to install Windows from Zero again ? Or i could use the devices in the state their are in now, (with Windows programs what not etc files on them directly)?

Becaue the Windows install was done through virtio Drivers. If they will be attached directly, there is no virtio passtrough, but somehow a direct Connection.
Windows should still be the same as nothing happened, right ?

Becuase i loaded Windows and aproximately 250 GB in total on the SSDs, i dont want to Need to do it again, if it is posible.
 
Becaue the Windows install was done through virtio Drivers. If they will be attached directly, there is no virtio passtrough, but somehow a direct Connection.
Windows should still be the same as nothing happened, right ?
i do not know how robust windows is in that scenario, but in general this should work
 
In general virtio-scsi is the disk emulation, which gets the most active development and has many features that are not present in virtio block.
The recommendation is for all VMs (which support the virtio-scsi controller)
There are a few corner cases where virtio-block performs a bit better than virtio-scsi, but unless some good benchmarks tell you that virtio-block really helps much - go with virtio-scsi

Thanks for the hint with the wiki-page - I'll update it accordingly!

I hope this helps!
 
Hi

I am looking to achieve the same thing for my Synology NAS but when I tried the command using -sata switch I could see the disk getting attached to the Synology but upon creating storage pool and then volume after few minutes disks fails. Don't know what to do. Any suggestions highly appreciated. Thanks in advance.
 
I'm having the same concern, I have passthrough the disk with -sata option, it's an SSD but Windows VM detect it as an HDD, is there anyway to correct it? Thanks!
 
I want to pass-through an NVME drive, the ID is 1bb1:5013 / 48:00.0

Its in it's own IOMMU group:
# find /sys/kernel/iommu_groups/ -type l |grep "53"
/sys/kernel/iommu_groups/53/devices/0000:48:00.0

Do I have to add 1bb1:5013 to pci-stub.ids= or vfio-pci.ids= in grub's config?

Also, How to add that device as the "primary" disk for a new VM (i.e. to be the boot drive & the OS drive)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!