Mount UNRAID shared dir/folder in MacOS VM as a disk?


Go to solution Solved by JonathanM,

Recommended Posts

I don't even have UNRAID installed yet but am doing research before migrating to it from Windows.

 

I would like to try running a MacOS VM on UNRAID and download a local copy of my iCloud Photos library to it.  However, I want to avoid downloading the library into the VM's vDisk image.  Instead, I would like the library to be stored on the UNRAID NAS share so that it can then be backed up by a Crashplan docker image.

 

In MacOS, the Photos app does NOT allow you to store your Photos library file on a network attached drive, it has to be a hard drive or USB/Thunderbolt connected drive.

 

Is there a way to create a standard shared folder in UNRAID NAS that I can then mount directly into the MacOS VM so that MacOS sees it as a standard disk or USB drive vs. a network mapped drive?

 

Sorry if this is a dumb question, new to this... Thanks for any help!

Link to comment

Not a dumb question, but I think you have 2 strikes against this scenario. The state of apple software as a VM doesn't seem very healthy, I think the latest CPU type change in genuine hardware has caused issues with virtual machines. I've not stayed up to date on this, but from what I've noticed in the forums you should investigate the feasibility of even running a VM.

 

Second issue is one of general architecture, not specific to apple. A shared folder is controlled by the host doing the sharing, the guest passes requests that the host honors or not, any conflicts between possible multiple guests are resolved by the host doing the sharing. When the application requires exclusive control of the storage, it can't be on a shared resource.

  • Thanks 1
Link to comment
2 hours ago, JonathanM said:

Not a dumb question, but I think you have 2 strikes against this scenario. The state of apple software as a VM doesn't seem very healthy, I think the latest CPU type change in genuine hardware has caused issues with virtual machines. I've not stayed up to date on this, but from what I've noticed in the forums you should investigate the feasibility of even running a VM.

 

Second issue is one of general architecture, not specific to apple. A shared folder is controlled by the host doing the sharing, the guest passes requests that the host honors or not, any conflicts between possible multiple guests are resolved by the host doing the sharing. When the application requires exclusive control of the storage, it can't be on a shared resource.

Gotcha, appreciate the response!

 

In that case, I might give it a shot anyway but instead of a shared folder, I guess I could create a second vDisk and attach that to the VM, and just back up that vDisk from the host side... I'm not familiar with any hypervisor besides VMware and Hyper-V, but I'm assuming I can create multiple vDisks and mount them to any VM?  Also, I'm assuming I can create the disk small to start and have it dynamically grow over time?

Link to comment
  • Solution
8 hours ago, pchoi94 said:

I guess I could create a second vDisk and attach that to the VM, and just back up that vDisk from the host side... I'm not familiar with any hypervisor besides VMware and Hyper-V, but I'm assuming I can create multiple vDisks and mount them to any VM?  Also, I'm assuming I can create the disk small to start and have it dynamically grow over time?

Yes on both counts. Be aware that vdisks are sparse by default, so don't overprovision without being acutely aware of the space actually in use. It's too easy to create a 1TB vdisk image on a disk with less than 1TB of real space available, and when the VM tries to allocate more than it can actually write to because the vdisk can't grow, it crashes the VM. Better to under allocate and move the vdisk to a larger space and reallocate as needed later.

 

Backing up vdisks while the VM is running is tricky, as it's likely the file system as it appears to the VM may not be in a consistent state and a restoration from that state may require file system check and repair. If the VM is shut down, or the volume in question is unmounted inside the VM if it's a not a boot or system required volume, then it's no longer an issue. I'm not familiar enough with macos to know whether it's possible to release a mounted volume while the OS is still running.

 

Depending on which type of file system the vdisk.img file resides, it should be possible to use snapshots in the host as well.

  • Thanks 1
Link to comment

Sorry one last question... I am thinking of dedicating an entire physical hard drive to use for the photo library.  Would it be possible and feasible to do a direct pass through of the "raw" disk to the VM, but still allow the UNRAID host system to read the contents of that drive to do the backups?

 

EDIT: BTW, it appears there is an iCloud sync tool for Windows 11, so if Mac VM becomes an issue, I may go that route instead...

Edited by pchoi94
Link to comment
3 hours ago, pchoi94 said:

Would it be possible and feasible to do a direct pass through of the "raw" disk to the VM, but still allow the UNRAID host system to read the contents of that drive to do the backups?

Not without a bunch of hassle. The VM would have to be shut down, the passthough status changed, then if it's in a file system that Unraid's Unassigned Devices plugin understands, it could be mounted and read. Then the whole process reversed to allow the VM passthough to work.

3 hours ago, pchoi94 said:

it appears there is an iCloud sync tool for Windows 11,

That may be the path of least resistance.

  • Thanks 1
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.