How to share game disk between multiple gaming VM:s with zfs?


Recommended Posts

Hi! 

I have 2 gaming VM:s with two GPU:s passed through to them (one for each). I would like to store all games on a single virtual disk and clone the disk for the other VM, so that I do not have to install all games twice, and could thus save space.

 

Preferably, one disk would be the "master disk" and when games are added or updated on that one, it would be nice if these updates could be easily propagated to the other VM.

- However I am not sure how this would work with game saves etc. Both VM:s already have an OS drive (virtual), that I am thinking I should keep, and where save data etc could be saved, but I am not sure if game saves can be easily separated from the game files (I am using steam and blizzard games at the moment).

 

Before, I used btrfs and the "cp reflink" function, but the disks go corrupted after a while. Maybe btrfs is not stable enough to do this? So I thought that zfs could perhaps be used instead? 

 

However, I have never used zfs before so I would like some advice on how to set it up. I have a 1 TB SATA SSD that I am planning to use for this. And I have installed the zfs plugin for unraid. 

 

Thank you in advance! 

 

Link to comment
  • 4 weeks later...

ZFS is not especially recommended for your use case; nor not recommended. What "we" use mostly, is an iscsi connection to connect a dedicated space area to several host. That's possible with ZFS with ZVOL, don't know for BTRFS.

If your not interested more than that by ZFS, try the XFS or BTRFS solution to support ISCSI.

Link to comment
On 6/25/2022 at 3:39 PM, eribob said:

I would like to store all games on a single virtual disk and clone the disk for the other VM, so that I do not have to install all games twice, and could thus save space

Hi, I don't understand what you are trying to achieve..Ok to save time because you wont install games twice, but how are you thinking to save space if you are going to clone the disk?And why having 2 identical vms running?

 

On 6/25/2022 at 3:39 PM, eribob said:

Preferably, one disk would be the "master disk" and when games are added or updated on that one, it would be nice if these updates could be easily propagated to the other VM.

I can think about 2 solutions: one (preferred in my opinion) is to delete/copy the vdisk from the master vm, 2 is to sync the files.

Note that if you have 2 vdisks for each vm, let's say one for the os and one for installed games (like a secondary vdisk), the game could install things on the os drive too, so you should clone both.

 

On 6/25/2022 at 3:39 PM, eribob said:

However I am not sure how this would work with game saves etc. Both VM:s already have an OS drive (virtual), that I am thinking I should keep, and where save data etc could be saved, but I am not sure if game saves can be easily separated from the game files (I am using steam and blizzard games at the moment).

Usually data files are saved in the users folder; if no data is present the game will start "clean". For steam, game data should be saved into the Program Files (x86)\Steam\userdata directory. However each game can save data in different locations, so you should need to check the saved location for each particular case.

 

 

Link to comment
11 hours ago, gyto6 said:

ZFS is not especially recommended for your use case; nor not recommended. What "we" use mostly, is an iscsi connection to connect a dedicated space area to several host. That's possible with ZFS with ZVOL, don't know for BTRFS.

If your not interested more than that by ZFS, try the XFS or BTRFS solution to support ISCSI.

 

Thank you for the advice. I would like to try this. How can I implement iSCSI on unraid? 

Will this allow for me to share the same game data between several gaming VM:s? Can the VM:s be on at the same time? 

Link to comment
1 hour ago, ghost82 said:

Hi, I don't understand what you are trying to achieve..Ok to save time because you wont install games twice, but how are you thinking to save space if you are going to clone the disk?And why having 2 identical vms running?

 

I can think about 2 solutions: one (preferred in my opinion) is to delete/copy the vdisk from the master vm, 2 is to sync the files.

Note that if you have 2 vdisks for each vm, let's say one for the os and one for installed games (like a secondary vdisk), the game could install things on the os drive too, so you should clone both.

 

Usually data files are saved in the users folder; if no data is present the game will start "clean". For steam, game data should be saved into the Program Files (x86)\Steam\userdata directory. However each game can save data in different locations, so you should need to check the saved location for each particular case.

 

 

 

I have 2 identical VM:s running because that way, me and someone else can game at the same time, for example me and my brother. We both connect to the server using parsec. I have 2 GPU:s, one for each VM.

 

I am well aware of how vdisks work, I have several VM:s running already. I would like to avoid copying the vdisks because it will use twice the space and all updates and new game installs need to be done on all disks. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.