Page 1 of 1

From Host to VM

Posted: 28. Jul 2014, 05:07
by F-Zero_Sam
My new Ubuntu VM is nice and everything, but I don't really have anything to play around with in its directories. Is there some type of converter that can convert copied content or files from a Windows OS to be compatible on a Linux OS?

It won't let me drag & drop or right-click-copy and paste content into the Ubuntu OS running in Virtual Box. What can I do?

Re: From Host to VM

Posted: 28. Jul 2014, 05:44
by loukingjr
To copy files from the host to a guest, you can use shared folders.

As far as converting files, depends on what kinds of files you mean. Many don't need converted. Applications can't be converted. There are cross-platform applications.
It seems you had no idea what Linux is or why you would want to install it.

Re: From Host to VM

Posted: 29. Jul 2014, 05:14
by F-Zero_Sam
loukingjr wrote:It seems you had no idea what Linux is or why you would want to install it.
The truth is I only want to learn linux, so that I can eventually start learning kali linux. There's PuTTY for Windows (which is, needless to say, is my host platform), but wasn't sure if a full fledged Ubuntu OS was necessary.

Re: From Host to VM

Posted: 29. Jul 2014, 16:56
by scottgus1
F-Zero_Sam wrote:I only want to learn Linux
Personally, that strikes me as a very good reason to install Linux.

I'm taking from your post, F-zero-sam, that you're needing to get files into the Linux guest. (I may be wrong...)

The trick with getting the host and guest to talk to each other is to think of them as two separate computers sitting side-by-side. You want to get a file from one to the other. Now how can that be done using the tools at hand? Solve that problem theoretically, and you have an idea on how to proceed in Virtualbox and with the host & guest.

One way to pass files between 2 PCs is with a USB stick. But, as a little reading on the forum shows, getting a USB stick to work in a guest is a little tricky. It can be done if one follows a certain procedure (and say a few magic/swear words in the process :) )

Another way is with a network. And Virtualbox comes built-in with all the networking tools needed to connect the host and guest, no thumbdrives needed. There's two ways to get a network set up, using a virtual network card in the guest, or with Virtualbox Guest Additions.

If you set the Linux guest's network card settings to Bridged, and your host's physical network is connected to a router, then the guest ought to get set up on the physical network just as if it was another PC you plugged into your router. If you can share a folder on your host and find your host's local IP address, you should be able to enter that IP address in whatever window Linux has to browse shared folders, and your host's shared folder will appear.

If you install Guest Additions in the Linux guest you can use the guest's Virtualbox Shared Folders settings to pick any folder on your host you'd like to use, and the guest will be able to find that folder by browsing the "vboxsvr" server. That window I mentioned above where you would have typed the IP address of your host to see the host's shared folders, type vboxsvr instead of the IP address and you'll see whatever folder(s) you picked to share in the guest's settings.

Re: From Host to VM

Posted: 29. Jul 2014, 19:18
by F-Zero_Sam
scottgus1 wrote: I'm taking from your post, F-zero-sam, that you're needing to get files into the Linux guest. (I may be wrong...)
You're correct.
scottgus1 wrote: One way to pass files between 2 PCs is with a USB stick. But, as a little reading on the forum shows, getting a USB stick to work in a guest is a little tricky. It can be done if one follows a certain procedure (and say a few magic/swear words in the process :) )
Well, I've set a USB device filter in the Virtual Box Manager, and it says that it's active, but I still can't find it in the Ubuntu VM. What else do I need to do?

Re: From Host to VM

Posted: 29. Jul 2014, 19:46
by mpack
Of all the options Scottgus listed, why did you go directly for the option he said would give you the most trouble?

Use GA shared folders. In other words, use the "Shared Folders" section of the VM settings to define which host folders you want the guest to have access to, and make sure to install the Guest Additions (inside the Guest).

If you want to continue this conversation then please provide a VM log file.

Re: From Host to VM

Posted: 29. Jul 2014, 20:26
by loukingjr
Something you may be interested in. A free introductory course on Linux by the Linux Foundation. Intro To Linux

Re: From Host to VM

Posted: 29. Jul 2014, 21:51
by F-Zero_Sam
mpack wrote: Use GA shared folders. In other words, use the "Shared Folders" section of the VM settings to define which host folders you want the guest to have access to, and make sure to install the Guest Additions (inside the Guest).
How do I do that?
mpack wrote: If you want to continue this conversation then please provide a VM log file.
How do I generate a VM log file?

Re: From Host to VM

Posted: 30. Jul 2014, 12:25
by mpack
To install the GAs, see chapter 4 of the user manual.

To provide a log file, right click the VM in the GUI and select "Show Log". Make sure the VM is shut down at the time. We only want the latest log, i.e. "VBox.log". Zip it before posting.

Re: From Host to VM

Posted: 30. Jul 2014, 19:54
by F-Zero_Sam
mpack wrote:To install the GAs, see chapter 4 of the user manual.
It says:

"The VirtualBox Guest Additions for all supported guest operating systems are provided as a single CD-ROM image file which is called VBoxGuestAdditions.iso. This image file is located in the installation directory of VirtualBox."

What is meant by "installation directory"? I checked the .VirtualBox folder, my VirtualBox VMs folder, and the VM's settings in VirtualBox Manager, but I couldn't find the VBoxGuestAdditions.iso file.

Re: From Host to VM

Posted: 30. Jul 2014, 20:35
by ChipMcK
F-Zero_Sam wrote:
mpack wrote:To install the GAs, see chapter 4 of the user manual.
4.2.1.1. Installation

In the "Devices" menu in the virtual machine's menu bar, VirtualBox has a handy menu item named "Insert Guest Additions CD image", which mounts the Guest Additions ISO file inside your virtual machine. A Windows guest should then automatically start the Guest Additions installer, which installs the Guest Additions into your Windows guest. Other guest operating systems (or if automatic start of software on CD is disabled) need manual start of the installer.
Some effort by you is expected

Re: From Host to VM

Posted: 30. Jul 2014, 20:57
by loukingjr
ChipMcK wrote: Some effort by you is expected
+1

Re: From Host to VM

Posted: 31. Jul 2014, 00:03
by F-Zero_Sam
I got this far:
GotThisFar.PNG
GotThisFar.PNG (77.36 KiB) Viewed 3763 times
And I inserted a shared folder in my VM, and rebooted it, but I can't find my shared folder in my VM when I run it. Did I miss something? Note that I zipped and attached my latest log file to this post.

Re: From Host to VM

Posted: 31. Jul 2014, 00:38
by Perryg

Code: Select all

00:00:01.042813 SharedFolders host service: adding host mapping
00:00:01.042841     Host path 'C:\Users\User\Documents\LinuxPlayground', map name 'LinuxPlayground', writable, automount=true, create_symlinks=false, missing=false
Since you are using automount you will find the share in /media/sf_LinuxPlayground

But you must also add your guests user name to the guests vboxsf group or you will not be able to do anything with it.
Then you will need to log off and back in to the guest for the permissions to take effect.

Hint:
In a host terminal run this:

Code: Select all

sudo usermod -aG vboxsf <your username>
Replace <your username> with the name you use to log in. Type your user password when prompted.

Re: From Host to VM

Posted: 31. Jul 2014, 12:07
by mpack
I'm moving this topic to "Linux Guests".