[SOLVED] Passthrough drive with Windows 10 OS already on it?

arbrog

New Member
Sep 30, 2019
4
0
1
29
Is it possible to pass through a nvme with an existing windows boot on it to a vm to use to boot from? I saw on the Migration_of_servers_to_Proxmox_VE page there were ways if you used a backup or container but I was hoping for a way to not modify my existing windows install? This way I could boot the windows install through proxmox as a vm or switch my boot drive on the host machine and boot the windows install on bare metal when I want.
 
Hi
Is it possible to pass through a nvme with an existing windows boot on it to a vm to use to boot from?
Yes, you can pass the NVME through.
But this VM is not migratable.

This snippet you have to use in your VM config.
Code:
scsi0: /dev/nvme<x>n1
 
  • Like
Reactions: arbrog
I had tried passing through the drive (followed Physical_disk_to_kvm originally) and set the boot order to prioritize that drive but found that when launching the VM it was unable to find a boot device.

startup_windows.PNG
Related info:
root@pve:~# fdisk -l Disk /dev/nvme0n1: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Code:
root@pve:~# cat /etc/pve/qemu-server/100.conf
boot: dnc
bootdisk: scsi0
cores: 4
memory: 8192
name: Windows
net0: e1000=4A:8E:F7:AC:36:FC,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi0: /dev/nvme0n1
scsihw: virtio-scsi-pci
smbios1: uuid=d792a49c-61c9-45bd-88c6-f5017032b7a1
sockets: 1
vmgenid: 27c60c2d-2f7f-4efe-96ae-715b57451f57
 
Might be GPT/UEFI only on that nvme?

Try changing the VM Hardware> BIOS = OVMF and attach and EFI Disk

Also, if that OS was not previously attached to a VM you will probably want to change the disk to sata0
If it boots, temporarily create and attach a small virtual disk to the VM as scsi and boot into the sata0/nvme OS, install the VirtIO SCSI driver.

Then you can poweroff and switch your nvme back to scsi0 and it should have the drivers loaded.
 
  • Like
Reactions: arbrog
Switching to OVMF and sata worked. I will try installing the scsi drivers so I can use that instead of sata. Many thanks!
 
Hi,
Is there any dangers of using sata instead of scsi ?

My windows which was already on my ssd boots only when set as sata instead of scsi
 
SATA mode works well. VirtIO SCSI or VirtIO Block will be better paravirtualized with the host.
Did you try adding a VirtIO device?

1) attach the physical disk as SATA (which you said works)
2) attach a second disk as a VirtIO hard disk
3) Power on VM and boot into Windows
4) Install VirtIO driver for second disk
5) power off VM
6) Switch physical disk from SATA to VirtIO and remove second disk (from step 2)
7) boot VM to Windows; success
 
Last edited:
  • Like
Reactions: k1lerbee
if I switch to virtIO, it does not actually touch the physical disk right? I will still be able to boot from the physical disk normally (without proxmox) if needed?
 
Mostly, yes. The only significant difference is that you will have then also installed the VirtIO drivers onto that physical disk.
But otherwise, the disk would still boot without proxmox because those previous drivers are also present.
 
is there any danger or downsides to the phisical disk by keepting it as Sata?

what about cache configurations? should they be write back?
 

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!