Mounting external drive as "local" in VM

Questions about virtualization software
Forum rules
Before you post please read how to get help
Post Reply
HarryZ
Level 1
Level 1
Posts: 31
Joined: Sun Feb 26, 2017 4:20 am

Mounting external drive as "local" in VM

Post by HarryZ » Mon Oct 14, 2019 12:29 am

Aloha. I'm running a Windows 7 Home 64-bit guest on a Linux Mint 19.1 Cinnamon box. I'm using VirtualBox Version 6.0.12 r133076 (Qt5.9.5 as the vm software.

Everything works. But I need to mount a drive that is attached to the Linux host via an eSATA docking station to the VM. I have been using the "Devices -> Shared Folders -> Shared Folders Settings -> Add new shared folder" to connect the external eSATA drive to the VM. This does work, but the drive shows up as a network drive. Unfortunately, I have some Windows based tools that I want to use for this drive, and they do not recognize Network Drives.

I've done some searching on how to connect this drive as a local drive, but everything I've found so far carries warnings about possibly losing all your data! I can't afford that risk.

So, is there some (relatively safe) method to attach this drive to my Win 7 VM? Please understand that I am something of a novice with both Linux and VMs.

Mahalo,

Harry Z

User avatar
catweazel
Level 19
Level 19
Posts: 9825
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Mounting external drive as "local" in VM

Post by catweazel » Mon Oct 14, 2019 1:16 am

HarryZ wrote:
Mon Oct 14, 2019 12:29 am
I've done some searching on how to connect this drive as a local drive, but everything I've found so far carries warnings about possibly losing all your data! I can't afford that risk.
If you can't afford the risk, don't do it. It's that simple.

https://www.serverwatch.com/server-tuto ... ox-vm.html

That link shows how it's done, and carries the warning.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.

User avatar
pbear
Level 9
Level 9
Posts: 2678
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Mounting external drive as "local" in VM

Post by pbear » Mon Oct 14, 2019 12:43 pm

HarryZ wrote:
Mon Oct 14, 2019 12:29 am
... warnings about possibly losing all your data! I can't afford that risk.
Do you have backups? If so, you're not at risk for losing your data, only of having to copy it back. If not, that's a much bigger problem and something you should take care of immediately. Yesterday, even.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
AndyMH
Level 9
Level 9
Posts: 2671
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Mounting external drive as "local" in VM

Post by AndyMH » Mon Oct 14, 2019 4:50 pm

Tried the link purely out of interest:
https://www.serverwatch.com/server-tuto ... ox-vm.html
and got:
An error occurred while processing your request.
Reference #97.ac81655f.1571086112.35905c04
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

HarryZ
Level 1
Level 1
Posts: 31
Joined: Sun Feb 26, 2017 4:20 am

Re: Mounting external drive as "local" in VM

Post by HarryZ » Mon Oct 14, 2019 6:47 pm

catweazel wrote:
Mon Oct 14, 2019 1:16 am
HarryZ wrote:
Mon Oct 14, 2019 12:29 am
I've done some searching on how to connect this drive as a local drive, but everything I've found so far carries warnings about possibly losing all your data! I can't afford that risk.
If you can't afford the risk, don't do it. It's that simple.

https://www.serverwatch.com/server-tuto ... ox-vm.html

That link shows how it's done, and carries the warning.
Well, I guess I'm not going to do this then.
pbear wrote:
Mon Oct 14, 2019 12:43 pm
Do you have backups? If so, you're not at risk for losing your data, only of having to copy it back. If not, that's a much bigger problem and something you should take care of immediately. Yesterday, even.
The tools I want to run are backup tools. Unfortunately, they don't work with network drives.

Thank you all for taking the time to respond.

Harry Z

User avatar
pbear
Level 9
Level 9
Posts: 2678
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Mounting external drive as "local" in VM

Post by pbear » Mon Oct 14, 2019 10:22 pm

HarryZ wrote:
Mon Oct 14, 2019 6:47 pm
The tools I want to run are backup tools. Unfortunately, they don't work with network drives.
Obviously, there are other ways to do backups. You realize VBox will permit the VM to read/write to a USB drive, right?
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
AndyMH
Level 9
Level 9
Posts: 2671
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Mounting external drive as "local" in VM

Post by AndyMH » Tue Oct 15, 2019 4:22 am

There is no reason to use win7 running as a guest in VB to do backups, there are plenty of excellent linux backup tools that will take care of your external drive (or backup to your external drive if that's what you are using it for).
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

markfilipak
Level 5
Level 5
Posts: 916
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Mounting external drive as "local" in VM

Post by markfilipak » Thu Oct 17, 2019 5:50 pm

HarryZ wrote:
Mon Oct 14, 2019 12:29 am
Aloha. I'm running a Windows 7 Home 64-bit guest on a Linux Mint 19.1 Cinnamon box. I'm using VirtualBox Version 6.0.12 r133076 (Qt5.9.5 as the vm software.

Everything works. But I need to mount a drive that is attached to the Linux host via an eSATA docking station to the VM. ...
Aloha, Harry,

My setup is Windows Host, Linux Guest, but I think I can help you. Let me relate my experience.

You may be able to mount your drive as a virtual USB hard disk. That's what I do. Here's what I have:

Virtual USB #1 is my web browser (Pale Moon). The virtual USB includes the Pale Moon application plus the entire browser profile. Since Pale Moon executes in Linux, and since symlinks may be involved, this virtual USB is formatted with ext3 file system -- you would format yours for Win7.

Virtual USB #2 is my email client (Thunderbird). The virtual USB includes only the TBird application. Since TBird executes in Linux, and since symlinks may be involved, this virtual USB is also formatted with ext3 file system -- you would format yours for Win7.

Shared directory #1 is my TBird profile (including the entire emial store). This is part of my Windows Host (that's only shared with Linux), so it's NTFS. I share it so that I can access my email in both the Host & the Guest.

Shared directory #2 is my Windows data disk also formatted in NTFS.

The rub for you would be that, in order to run applications in your Win7 Guest, they'd have to be portable versions of those applications. Other than that slight complication, a similar setup might work for you. Try it and let me know how it goes.

Hope this helps.

SomeDudeInAZ
Level 2
Level 2
Posts: 50
Joined: Sun May 05, 2019 6:48 pm
Location: Scottsdale, AZ, USA

Re: Mounting external drive as "local" in VM

Post by SomeDudeInAZ » Thu Oct 17, 2019 7:37 pm

This may be a dumb question...

Have you tried mapping a drive letter to your "network" drive?

markfilipak
Level 5
Level 5
Posts: 916
Joined: Sun Mar 10, 2013 8:08 pm
Location: Ohio (formerly California), USA

Re: Mounting external drive as "local" in VM

Post by markfilipak » Thu Oct 17, 2019 9:03 pm

After reading SomeDudeInAZ's reply (which is pretty good, by the way), I realized that Harry's ultimate issue may be making backups, not mounting a docking station in the Guest.

You want to make a safety backup of a Guest, right?

Forget trying to mount a docking station into the Guest. What you want is a lot easier than that. Simply make a copy of the Guest's VDI (or VHD) from within the Host.

My Guest's VDI is named 'Mint18.vdi'. When I make a backup, I shut down the Guest and simply copy 'Mint18.vdi' from within the Host. If anything happens to the Guest at a latter time, I simply copy it back. There's no problem with UUIDs because the two VDIs have the same UUID. But don't try to do the copying via VBox's Virtual Media Manager.

It really is that simple.

PS: With such a simple backup method, I don't bother with snapshots and such stuff. Life is simple. Life is good.

PPS: In a Linux Host, a docking station may show up solely as a networked drive. I think that's a characteristic of Linux that you're not likely to circumvent.

User avatar
AndyMH
Level 9
Level 9
Posts: 2671
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Mounting external drive as "local" in VM

Post by AndyMH » Fri Oct 18, 2019 4:26 am

Forget trying to mount a docking station into the Guest. What you want is a lot easier than that. Simply make a copy of the Guest's VDI (or VHD) from within the Host
Agreed. My VMs live in the default folder, /home/andy/VirtualBox VMs. I use backintime to backup /home and have two backups scheduled to run automatically. /home gets backed up daily, the VMs once a week (on the basis that they don't change often). For this to work as intended, it does require that you don't keep any data inside the VM - but that's what shared folders are for.
Homebrew i5-8400+GTX1080 Cinnamon 19.0, 3 x Thinkpad T430 Cinnamon 19.0, i7-3632 , i5-3320, i5-3210, Thinkpad T60 19.0 Mate

HarryZ
Level 1
Level 1
Posts: 31
Joined: Sun Feb 26, 2017 4:20 am

Re: Mounting external drive as "local" in VM

Post by HarryZ » Mon Oct 21, 2019 6:21 pm

While I do appreciate the advice, it is not pertinent to what I'm doing. I am using a specialized tool written to backup all user data for either transfer to another machine or a new hard drive. It's called Fab's Autobackup https://www.fpnet.fr/. There is no Linux equivalent, and this tool does not work with network connected drives. All the techniques posted here are not what I'm looking for.

I will just make my bench machine dual boot Mint / Windows 10.

Again, thanks for all the input.

Harry Z

SomeDudeInAZ
Level 2
Level 2
Posts: 50
Joined: Sun May 05, 2019 6:48 pm
Location: Scottsdale, AZ, USA

Re: Mounting external drive as "local" in VM

Post by SomeDudeInAZ » Tue Oct 22, 2019 4:14 pm

Here's an even dumber question...

If that's the app you're going to use...will it run under WINE? Just a thought

HarryZ wrote:
Mon Oct 21, 2019 6:21 pm
While I do appreciate the advice, it is not pertinent to what I'm doing. I am using a specialized tool written to backup all user data for either transfer to another machine or a new hard drive. It's called Fab's Autobackup https://www.fpnet.fr/. There is no Linux equivalent, and this tool does not work with network connected drives. All the techniques posted here are not what I'm looking for.

I will just make my bench machine dual boot Mint / Windows 10.

Again, thanks for all the input.

Harry Z

HarryZ
Level 1
Level 1
Posts: 31
Joined: Sun Feb 26, 2017 4:20 am

Re: Mounting external drive as "local" in VM

Post by HarryZ » Tue Oct 22, 2019 4:49 pm

SomeDudeInAZ wrote:
Tue Oct 22, 2019 4:14 pm
Here's an even dumber question...

If that's the app you're going to use...will it run under WINE? Just a thought
Thanks for the suggestion. I've talked with the author and he's not sure if it will or won't work under Wine. But, I need to spend my time doing productive (billable) work as opposed to "playing" with Wine. Much easier for this Windows-centric person to set up the machine for dual boot than to mess around with more unfamiliar software.

Again, thanx for the suggestion.

Harry Z

User avatar
smurphos
Level 13
Level 13
Posts: 4785
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Mounting external drive as "local" in VM

Post by smurphos » Tue Oct 22, 2019 5:02 pm

HarryZ wrote:
Mon Oct 21, 2019 6:21 pm
It's called Fab's Autobackup https://www.fpnet.fr/. There is no Linux equivalent
Are you backing user data on the Linux machine? Your windows tool at first glance sounds like Aptik https://github.com/teejee2008/aptik
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

HarryZ
Level 1
Level 1
Posts: 31
Joined: Sun Feb 26, 2017 4:20 am

Re: Mounting external drive as "local" in VM

Post by HarryZ » Tue Oct 22, 2019 6:19 pm

smurphos wrote:
Tue Oct 22, 2019 5:02 pm
Are you backing user data on the Linux machine? Your windows tool at first glance sounds like Aptik https://github.com/teejee2008/aptik
No, I was trying to use a specialty tool (Fab's Autobackup) that only runs on Windows in a Win 7 Guest running on a Mint host. Unfortunately, the tool does not work with network drives, which is how the "source" drive looks to the guest.

The only tools I run on Mint are ddrescue, RStudio, gsmartcontrol, and gparted, and occasionally I have to use Mint to delete a file or folder structure from a Windows drive where Windows chokes on it for some reason. Any tool that saves data has to save it in a format that I can use from Windows. (e.g.: ddrescue creates image files, which I can mount in Windows using osfmount).

Harry Z

User avatar
smurphos
Level 13
Level 13
Posts: 4785
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: Mounting external drive as "local" in VM

Post by smurphos » Wed Oct 23, 2019 12:26 am

HarryZ wrote:
Tue Oct 22, 2019 6:19 pm
No, I was trying to use a specialty tool (Fab's Autobackup) that only runs on Windows in a Win 7 Guest running on a Mint host.
Yeah sure I understood that - but was wondering what data you were using it to back up as that wasn't clear from your thread and if the data was your linux user data I was suggesting a (very good IMHO) linux near alternative. If it's Windows data crack on and ignore me. I can't really help with your presenting question as I don't run any Windows guests to experiment with other than to reiterate the query a few posts above - are you automounting the shared drive with an assigned drive letter and if not does doing so make any difference - https://www.virtualbox.org/manual/UserM ... unt_manual
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.

HarryZ
Level 1
Level 1
Posts: 31
Joined: Sun Feb 26, 2017 4:20 am

Re: Mounting external drive as "local" in VM

Post by HarryZ » Thu Oct 24, 2019 3:07 pm

smurphos wrote:
Wed Oct 23, 2019 12:26 am

... are you automounting the shared drive with an assigned drive letter and if not does doing so make any difference - https://www.virtualbox.org/manual/UserM ... unt_manual
No, I have not tried that. The documentation you point to makes it clear (to me) that every mounted drive will be a "network" drive.

Thanks again for your assitance!

Harry Z

Post Reply

Return to “Virtualization”