TrueNAS VirtualBox Mac External HDD access?

Solarczar

Cadet
Joined
Mar 10, 2021
Messages
2
Hey guys,

New to VB & TrueNAS over the last 6mths. I'm not a chef, but I think I'm a good cook, and trying to follow recipes to add TrueNAS on a VB VM running on a recycled 2010 MacBook Pro with High Sierra MacOS. I'm struggling to solve what I hope is a simple answer. I have a 14Tb USB physical drive that is partitioned (expecting to use for 2 VM's TrueNAS & Home Assistant). I'm running TrueNAS on a FreeBSD (whatever that is) instance and it's started up great so far. I just don't have any storage capability, because it can't see the drive. Turned on USB and see/added the SeaGate Disk usb in VB settings. I tried the Vboxmanage command to prepare the .vmdk pointer to the disk partition, but I get VERR_ACCESS_DENIED when I add it as a disk in my VM storage settings. Some have suggested I run my VB instance as root, but that doesn't feel right. I have been reading/reading/reading, but I'm not finding anything that is helpful.

Apologies if this is a rookie question, but I don't know where to go and I have to go somewhere to learn. Thanks in advance.
Solarczar Posts: 1Joined: 10. Mar 2021, 17:31
 

Solarczar

Cadet
Joined
Mar 10, 2021
Messages
2
So the guys on the VB Forum gave me some other hints, but not sure I've got the syntax right...

Re: TrueNAS External HDD problems
Post by scottgus1 » 10. Mar 2021, 18:08
Solarczar wrote:I tried the Vboxmanage command to prepare the .vmdk pointer to the disk partition,
This quite likely means that you are trying Raw Disk Access, which is definitely not a "rookie" process. There are lots of possibilities to damage good data if you make the pointer file wrong or the host computer decides to re-enumerate the disks one day and the pointer file points to a different disk.

Solarczar wrote:I get VERR_ACCESS_DENIED
On Windows hosts every step of Raw Disk Access must be Run As Administrator. Possibly Mac requires similar, meaning running as 'root' would probably be required.

Another possibility could be to make a VDI virtual disk file on the USB drive partition, and forget about raw disk access. Per viewtopic.php?f=8&t=29626#p131954:
aeichner wrote:You can create hard disks with up to 2TB with the GUI. If you need a bigger disk use VBoxManage.
The Vboxmanage command to make a VDI is found at https://www.virtualbox.org/manual/ch08. ... eatemedium
scottgus1Site Moderator Posts: 10923Joined: 30. Dec 2009, 20:14Primary OS: MS Windows 10VBox Version: PUELGuest OSses: Windows, Linux
Re: TrueNAS External HDD problems
Post by Solarczar » 10. Mar 2021, 18:44
Okkkkk, I'm no expert, but would this work?...

sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 12Tb.vdi" --size 12288 --format VDI --variant Fixed

My thoughts...
1) I hope this would place a big file volume partition to be seen by all users (my family) on TrueNAS, and as Admin, I would create space for them. Is this best practice or would it make more sense to create a separate VDI for each TrueNAS user and add each to the VM session?
2) Should it be "Fixed" or "Standard", as I think Fixed would make it faster?

Thanks
Solarczar
Re: TrueNAS External HDD problems
Post by Solarczar » 10. Mar 2021, 18:52
sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 12Tb.vdi" --size 12288 --format VDI --variant Fixed

Correction, as the size is in MB...and 12288 is 12Gb and I need 12Tb

Re: TrueNAS External HDD problems
Post by Solarczar » 10. Mar 2021, 18:58
So I struggle with path addressing on a Mac, so not sure I got it right, but just tried this and got these errors...

SolarCzarHA:~ MB2$ sudo VBoxManage createmedium --filename "/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi" --size 1048576 --format VDI --variant Fixed
Password:
0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Failed to create medium
VBoxManage: error: Could not create the medium storage unit '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi'.
VBoxManage: error: VDI: disk would overflow creating image '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi' (VERR_DISK_FULL).
VBoxManage: error: VDI: setting image size failed for '/Volume/TrueNAS 12Tb Partition/TrueNAS 1Tbv1.vdi' (VERR_DISK_FULL)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium
VBoxManage: error: Context: "RTEXITCODE handleCreateMedium(HandlerArg *)" at line 510 of file VBoxManageDisk.cpp
 
Top