Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable the possibility to mount NBD devices #759

Closed
alvistar opened this issue Mar 18, 2024 · 4 comments · Fixed by #786
Closed

Enable the possibility to mount NBD devices #759

alvistar opened this issue Mar 18, 2024 · 4 comments · Fixed by #786
Labels
enhancement New feature or request

Comments

@alvistar
Copy link

Hi,
I would like to mount a physical disk from a NAS using NBD as main disk for a VM.

I suppose this should be possible as there is
VZNetworkBlockDeviceStorageDeviceAttachment -> https://developer.apple.com/documentation/virtualization/vznetworkblockdevicestoragedeviceattachment

Ideally it would be nice to provide a nbd url as disk so it would be able to mount on start.

Thanks for everything

@fkorotkov
Copy link
Contributor

Let's make it happen! We were looking for someone seeking this use case.

Could you please share your setup? What kind of NAS do you use which supports NBD out of box?

@fkorotkov fkorotkov added the enhancement New feature or request label Mar 18, 2024
@edigaryev
Copy link
Collaborator

What kind of NAS do you use which supports NBD out of box?

I'm also interested in this. Might be useful for others, see #737.

@alvistar
Copy link
Author

Hi,
thanks for quick replies.

Not out of my box unfortunately. I am using Truenas which is based on Freebsd so nbd-server is supported but the package need to be installed and configured outside the UI and not officially supported.

The only way to share block devices would be Iscsi but there is no native support on Macos.

@DrDonk
Copy link

DrDonk commented Mar 25, 2024

I think another opportunity with this is to use qemu-nbd and mount other more traditional v12n file formats (qcow2, vmdk, ...) to store the VM. The vz Go bindings to HVF have a pull request for this and have shown you can install and run macOS from qcow2.

Code-Hex/vz#156

The Apple sparse disk files are great except when you need to move to non-APFS drives at which point we all know the size expands to the defined size.

fkorotkov added a commit that referenced this issue Apr 11, 2024
fkorotkov added a commit that referenced this issue Apr 11, 2024
* Allow mounting NBD disks

Fixes #759

* Apply suggestions from code review

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

* Removed unnecessary docs

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants