Sharing hard drive with Windows guest

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
HarryZ
Level 1
Level 1
Posts: 40
Joined: Sun Feb 26, 2017 4:20 am

Sharing hard drive with Windows guest

Post by HarryZ »

Aloha. I'm running Mint 19.1 Cinnamon and have installed VirtualBox 6.0.4. I have a Windows 7 guest machine up and running in VirtualBox. I have an additional hard drive in my system (i.e. NOT the drive I boot Mint from) that I want to share with my Win7 guest. This drive is formatted as NTFS. I've found several articles on the web about how to set this up and following them I have done the following to set this up:

- Booted my guest Win7 system
- In the VB window, click on Devices -> Shared Folders
- In the Add Share window, navigate the gui to /mnt/6TBdrive and select it (this is the mount point for the 6TBdrive)
- Folder name is set to 6TBdrive
- Auto-mount and Make Permanent are checked
- Mount point is blank (I have no idea what to put here)

After clicking OK to all of this I see a Z: drive under Computer in Windows Explorer. The path is \\VBoxSvr\6TBdrive. But, when I double click on this drive, there are no files shown (there are files on this drive when I look at if from Mint), and the properties of this drive show it at 227 GB instead of the 6 TB it actually is.

I can't figure out what I'm doing wrong. Any assistance would be greatly appreciated.

Harry Z
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
AndyMH
Level 21
Level 21
Posts: 13742
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Sharing hard drive with Windows guest

Post by AndyMH »

You've done all the right things, I suspect a permissions issue - who is the owner of your NTFS drive/partitions? Another thought is partition size, is it greater than 2TB. Don't know if there are any VB/win7 limitations here.

Why, if your primary OS is mint, have you got an NTFS format drive?

Edit - does your NTFS drive automount in mint on startup?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
HarryZ
Level 1
Level 1
Posts: 40
Joined: Sun Feb 26, 2017 4:20 am

Re: Sharing hard drive with Windows guest

Post by HarryZ »

AndyMH wrote: Tue Mar 12, 2019 4:43 pm You've done all the right things, I suspect a permissions issue - who is the owner of your NTFS drive/partitions? Another thought is partition size, is it greater than 2TB. Don't know if there are any VB/win7 limitations here.

Why, if your primary OS is mint, have you got an NTFS format drive?

Edit - does your NTFS drive automount in mint on startup?
Aloha @AndyMH. Mahalo for taking the time to reply.

Your reply made me investigate how this drive gets mounted when I boot Mint. I looked in /etc/fstab and did not find anything there for this drive. Next I looked in the Disks app and found the drive. The mountpoint identified there is: /media/harryz/18DE2E4F0E27D576. So, I chanced the Shared Folder in VB to this value and it's now working!

I'm assuming I can delete the '6TBDrive' mount point in /mnt. Or would this break something?

Also, I chose NTFS as this drive will be accessed by both Windows and Mint and I was advised that NTFS is the best filesystem for this circumstance. If you think this is incorrect let me know.

Mahalo!

Harry Z
User avatar
AndyMH
Level 21
Level 21
Posts: 13742
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Sharing hard drive with Windows guest

Post by AndyMH »

If windows is only installed in virtualbox as a VM and you are not dual booting you do not need NTFS partitions - file access is handled by virtualbox. I would reformat the drive as ext4 (saving any data before you start).

Whether you continue with NTFS or ext4 partitions I would mount them directly via fstab rather than the disks app. If you continue with the NTFS partitions, these are the fstab entries for the NTFS partitions on my dual boot desktop:

Code: Select all

# mount point for windows D:
UUID=1A7C80714BFAF6B2 /home/andy/data           ntfs    windows_names,auto,users,uid=1000,gid=1000,noatime        0       2
# mount point for windows C:
UUID=40E45A0AE45A0298 /home/andy/win10           ntfs    windows_names,auto,users,uid=1000,gid=1000,noatime        0       2
A 'standard' entry for an ext4 partition would look like (my home partition):

Code: Select all

UUID=ba112d07-be35-4b87-89df-b0a22dc18ef2 /home           ext4    defaults,noatime        0       2
If the drive is removable, I would also include the nofail option (this stops the 90 sec timeout on boot if the drive is not present). You can mount them wherever you like with meaningful names (rather than the mess that disks generates). If you mount them in /media they will show up in the removable drives icon on the panel to the right (which can be useful). I've chosen to mount my NTFS partitions in /home so that when I take backups, backintime takes care of windows as well as mint.

You can find out the UUIDs by typing blkid in a terminal and copy/paste into fstab. Note - fstab needs to be edited as root.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Virtual Machines”