Jump to content

Can I have a Windows VM with GPU passthrough on TrueNAS or unRAID with a single GPU?

I'm looking into consolidating my PC's by putting my normal Windows desktop into a VM ontop of either FreeNAS or unRAID. The idea would be that TrueNAS / unRAID would handle all the same stuff my current NAS does (manage storage pools, set up network sharing, Plex library hosting, etc.) while I reserve some CPU and GPU power for my Windows VM.

 

The question I'm unsure of is this: if I have a single GPU (namely an Nvidia RTX 3060ti), can it be used for both the host NAS OS and in the VM for display capabilities and hardware video decoding at the same time? Or would I need another GPU entirely to allow for this?

Link to comment
Share on other sites

Link to post
Share on other sites

Ideally, you'd use two GPUs, since it makes it easier if you run into issues to fix those issues. However, I believe there is a workaround for this as shown in this video. There's probably a better tutorial but this is the one I know off the top of my head (it's more just a demonstration that it works)

Also, use UnRAID. Truenas, while great and what I'm personally running on my machine, has subpar virtualization and passthrough support. If you want to use Truenas, virtualize it with ProxMox or similar and have a separate VM for you're main machine. Just look up how to setup headless passthrough for whatever OS you decide to go with

Link to comment
Share on other sites

Link to post
Share on other sites

Why run unraid or true nas at all? Id just let windows be the nas and don't run any vms. Windows has storage spaces for managing raid/storage array, and supports smb sharing out of the box. And plex works fine on windows. I don't see a reason to fire up vms here.

Link to comment
Share on other sites

Link to post
Share on other sites

57 minutes ago, Electronics Wizardy said:

Why run unraid or true nas at all? Id just let windows be the nas and don't run any vms. Windows has storage spaces for managing raid/storage array, and supports smb sharing out of the box. And plex works fine on windows. I don't see a reason to fire up vms here.

While I run UnRAID now, for the longest time my 'Server' was literally just an SMB share and a large HDD in a Windows machine.  If you just wanna do one large drive or pool/RAID a few drives while the machine is also your desktop, yeah, just get Windows to do it.

Desktop: Ryzen 9 3950X, Asus TUF Gaming X570-Plus, 64GB DDR4, MSI RTX 3080 Gaming X Trio, Creative Sound Blaster AE-7

Gaming PC #2: Ryzen 7 5800X3D, Asus TUF Gaming B550M-Plus, 32GB DDR4, Gigabyte Windforce GTX 1080

Gaming PC #3: Intel i7 4790, Asus B85M-G, 16B DDR3, XFX Radeon R9 390X 8GB

WFH PC: Intel i7 4790, Asus B85M-F, 16GB DDR3, Gigabyte Radeon RX 6400 4GB

UnRAID #1: AMD Ryzen 9 3900X, Asus TUF Gaming B450M-Plus, 64GB DDR4, Radeon HD 5450

UnRAID #2: Intel E5-2603v2, Asus P9X79 LE, 24GB DDR3, Radeon HD 5450

MiniPC: BeeLink SER6 6600H w/ Ryzen 5 6600H, 16GB DDR5 
Windows XP Retro PC: Intel i3 3250, Asus P8B75-M LX, 8GB DDR3, Sapphire Radeon HD 6850, Creative Sound Blaster Audigy

Windows 9X Retro PC: Intel E5800, ASRock 775i65G r2.0, 1GB DDR1, AGP Sapphire Radeon X800 Pro, Creative Sound Blaster Live!

Steam Deck w/ 2TB SSD Upgrade

Link to comment
Share on other sites

Link to post
Share on other sites

59 minutes ago, Electronics Wizardy said:

Why run unraid or true nas at all? Id just let windows be the nas and don't run any vms. Windows has storage spaces for managing raid/storage array, and supports smb sharing out of the box. And plex works fine on windows. I don't see a reason to fire up vms here.

1. Cause I'd prefer to use ZFS or BTRFS which are more reliable forms of redundancy, and I'm already using ZFS on my current Ubuntu NAS. Storage spaces just uses basic software RAID.

2. Those operating systems are more reliable to use than Windows (no forced reboots due to updates, better performance when kept online for long periods of time)
3. Plex and other apps work just fine on those operating systems too, and I can host a ton of apps on containers - with the above-mentioned reliability.

4. If I need to shutdown/restart my Windows VM, it won't affect my ability to access my NAS shares or any other hosted app on any other machine.

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, RONOTHAN## said:

Ideally, you'd use two GPUs, since it makes it easier if you run into issues to fix those issues. However, I believe there is a workaround for this as shown in this video. There's probably a better tutorial but this is the one I know off the top of my head (it's more just a demonstration that it works)

Also, use UnRAID. Truenas, while great and what I'm personally running on my machine, has subpar virtualization and passthrough support. If you want to use Truenas, virtualize it with ProxMox or similar and have a separate VM for you're main machine. Just look up how to setup headless passthrough for whatever OS you decide to go with

Based on what they seem to be doing at 6:04, it shows all 3 of their GPU's as selectable for the graphics card to use in the VM, so I suppose that means it should be totally doable with just 1 graphics card if I'm running just one VM. Thank you for posting the vid!

Link to comment
Share on other sites

Link to post
Share on other sites

7 hours ago, HunterAP said:

1. Cause I'd prefer to use ZFS or BTRFS which are more reliable forms of redundancy, and I'm already using ZFS on my current Ubuntu NAS. Storage spaces just uses basic software RAID.

2. Those operating systems are more reliable to use than Windows (no forced reboots due to updates, better performance when kept online for long periods of time)
3. Plex and other apps work just fine on those operating systems too, and I can host a ton of apps on containers - with the above-mentioned reliability.

4. If I need to shutdown/restart my Windows VM, it won't affect my ability to access my NAS shares or any other hosted app on any other machine.

storage spaces with refs has the same checksumming features that zfs and btrfs, and is pretty stable, with lots of servers using it now. Storages spaces is the same advanced raid that zfs and btrfs use.

 

2. Windows is pretty powerfull, and more than enough for a home server. Also you still have to reboot to update kernels in linux for most uses.

 

3. Plex also works fine on windows, and you can make vms as needed for other linux only programs.

 

This seems to be the much simpler approach, and should just work better here. I don't see why you want to deal with vms here.

Link to comment
Share on other sites

Link to post
Share on other sites

On 6/30/2021 at 8:19 PM, Electronics Wizardy said:

storage spaces with refs has the same checksumming features that zfs and btrfs, and is pretty stable, with lots of servers using it now. Storages spaces is the same advanced raid that zfs and btrfs use.

 

2. Windows is pretty powerfull, and more than enough for a home server. Also you still have to reboot to update kernels in linux for most uses.

 

3. Plex also works fine on windows, and you can make vms as needed for other linux only programs.

 

This seems to be the much simpler approach, and should just work better here. I don't see why you want to deal with vms here.

1. Storage Spaces does not offer snapshotting, customizable compression settings, or triple parity, among other features I regularly use in ZFS.

 

2. I have no interest in using Windows as my NAS. Linux is arguably better for performance in server applications, and when it comes to kernel updates I can choose when to reboot - windows does it automatically whenever it thinks is a good time to, which it's often completely incorrect about, or it will reboot even if you are using the machine.

 

3. Plex works fine anywhere, it's not an argument for using Windows over Linux.

 

Also managing permissions for different datasets in ZFS is easier than it is in Windows: I can create separate datasets within a pool that are assigned to a specific user or group, rather than in Windows where I have to do more work to do the same thing.

 

Just cause it would be simpler doesn't mean it's better or suits my needs.

Link to comment
Share on other sites

Link to post
Share on other sites

5 hours ago, HunterAP said:

1. Storage Spaces does not offer snapshotting, customizable compression settings, or triple parity, among other features I regularly use in ZFS.

 

NTFS has snapshots with VSS, and compression and dedup. How big are you pools, multiple double parity is probably plenty.

 

5 hours ago, HunterAP said:

2. I have no interest in using Windows as my NAS. Linux is arguably better for performance in server applications, and when it comes to kernel updates I can choose when to reboot - windows does it automatically whenever it thinks is a good time to, which it's often completely incorrect about, or it will reboot even if you are using the machine.

 

You can set reboot times as needed. There are a good amount of settings for updates so this won't be a issues.

 

Performance is fine in both for a home user, both with easily fill 100gbe if needed.

 

5 hours ago, HunterAP said:

Also managing permissions for different datasets in ZFS is easier than it is in Windows: I can create separate datasets within a pool that are assigned to a specific user or group, rather than in Windows where I have to do more work to do the same thing.

Windows also does this well. And shares are easy to setup permissions too.

 

Really id give storage spaces a shot, should work well here, and will give you better performance, and many fewer issues than running a vm with passthrough.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×