Page 1 of 1

Can a host be given read access to files inside a guest?

Posted: 2. Oct 2009, 15:47
by appyface
I have a guest that is wholly contained, it has no shares or any kind of write except to it's own hard disk (VDI file). I would like for the host to be able to read the filesystem inside the guest, and copy out designated files. Is this possible?

I have been searching here for info but can't seem to find the right words or phrases -- the only posts I have found so far, tell of giving the guest write access to shares on the host machine. Please do point me to documentation, posts, etc. if I missed finding them in my searches, thank you.

I did find one reference on the 'net that sounded like what I want to do, it uses a networking bridge created between the host and the guest. I'm not familiar with this concept and I did not get a clear picture if that will do what I want -- give the host read access to the guest's filesystem -- without allowing the guest to write outside the VDI.

Thanks and regards,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 2. Oct 2009, 15:53
by Sasquatch
Add a Host-Only NIC to the VM and share the whole virtual drive from within the VM. You can then mount that share in the Host.

Re: Can a host be given read access to files inside a guest?

Posted: 2. Oct 2009, 17:06
by appyface
You're kidding, it's that easy? I did not find this, so sorry. Thank you I will give this try.

Best regards,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 2. Oct 2009, 17:08
by Sasquatch
appyface wrote:You're kidding, it's that easy? I did not find this, so sorry. Thank you I will give this try.

Best regards,
--appyface
You really didn't think about the easiest solution? :lol: :lol:

Re: Can a host be given read access to files inside a guest?

Posted: 2. Oct 2009, 17:33
by appyface
:shock:

j/k :P

Unfortunately I'm brand new to Vbox and VM's. So I not only had no idea what this would be called or how it would work, I didn't even know if it *could* work. When you're starting out that far below ground-zero, there aren't a lot of concepts formed yet :lol:

Thanks again for the help,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 4. Oct 2009, 01:01
by appyface
Step one accomplished in seconds -- the host-only adaptor is working on the guest.

Step two -- share the guest filesystem -- I am completely stuck here.

My guest is Linux Mint 7 Gloria Universal. Unfortunately I am also a complete n00b to linux not just VBox.

I've been searching the Linux Mint forums and the 'net at large for the better part of the day and have found -zilch-. I'll go post in the Linux Mint forums for help now. If anyone can throw me a post or webpage that tells me what I need to look at/do, please let me know. I realize this has nothing to do with VBox but perhaps someone here just happens to know what I need to do :)

Kind regards,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 4. Oct 2009, 13:12
by Sasquatch
Search for a howto about Samba. That package allows *NIX systems to share files on a Windows network. It's highly configurable, most of that is explained in the howto's. http://ubuntuforums.org/showthread.php? ... amba+howto for example is quite helpful.

Re: Can a host be given read access to files inside a guest?

Posted: 4. Oct 2009, 22:44
by appyface
Thanks again, Sasquatch... off to have a look now.

Kind regards,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 5. Oct 2009, 17:33
by NeBlackCat
If it's just something you want to do occasionally in an offline sort of way, you could also use imdisk (Windows host, with ext2/3 support installed) or mount_vdi (Linux host) to mount and directly access the guest's (static) virtual disk from the host.

Downside is that you have to stop your VM, upside is that it's way faster than, and doesn't require, virtual networking.

Re: Can a host be given read access to files inside a guest?

Posted: 5. Oct 2009, 19:47
by Sasquatch
May be, but I find the ext2/3 driver for Windows very unstable and has caused data loss for me at least once (and I used it three, four times max).

Re: Can a host be given read access to files inside a guest?

Posted: 5. Oct 2009, 20:58
by appyface
@NeBlackCat - That is an interesting idea! I hadn't thought about 'mounting' a VDI as one would do, say, an ISO (at least, I think conceptually that's what you're suggesting, mount it and read what's inside it).

@Sasquatch - Stability issues would definitely be a concern for me. And I am planning for the VM to be up all of the time unless there is a specific reason to take it down. Nonetheless, I do like both ideas and will look into them further, they could both be quite useful.

Thank you both for your suggestions and valueable insights.
Kind regards,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 5. Oct 2009, 21:03
by Sasquatch
As long as you only copy files from the VDI to the Host system, and not write into the VDI, you should be a big step away from corruption, but it's always possible. The VDI should be mounted as read-only to avoid any chance of corruption (maybe the tool already does that).

Re: Can a host be given read access to files inside a guest?

Posted: 6. Oct 2009, 13:01
by appyface
Thanks Sasquatch, very good point. I already have and use imdisk on my windows host for ISO, which I mount read-only. I'm sure I didn't install the ex2/ex3 support as NeBLackCat mentions (having not needed this before), so I'll be finding out if those drivers cause me any problems. While I do have long-term goals for Mint-in-a-VM, the good news is I'm still learning at this point -- so trying out all the options is all good.

I do have a heavy load at work right now so will have to put this down for a couple weeks :( Just when it is getting interesting! So it won't be right away, but I will be back to post what happened to me :lol:

Kind regards,
--appyface

Re: Can a host be given read access to files inside a guest?

Posted: 6. Oct 2009, 16:12
by NeBlackCat
I've used the ext2/ext3 IFS for some time now, it doesn't cause any instability on my system and seems to be bulletproof for reading Linux partitions. I don't know about writing them extensively, but the occasional writing that I do hasnt yet corrupted anything.

Nice to have both options, anyway.