LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   ubuntu host: are virtualbox guest additions installed or starting up? (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/ubuntu-host-are-virtualbox-guest-additions-installed-or-starting-up-852826/)

Thane 12-28-2010 10:06 AM

ubuntu host: are virtualbox guest additions installed or starting up?
 
Having Virtualbox guest additions installation or mounting problems maybe related to fstab. I added the virtualbox repository to synaptic repos and then installed virtualbox 3.2.8_ose and the virtualbox-guest-additions 3.2.8-1 on my ubuntu amd64 desktop host computer along with dkms, etc. Subsequently installed ubuntu desktop amd64 as my first virtualbox guest and have tried repeatedly to install the guest additions into the guest via both a cd .iso and from synaptic. In each case I thought I had installed the guest additions fine, but I have the feeling it either really hasn't installed or it isn't enabled. Hard time getting a virtual guest share up and running (but I'm brand new to this). Finally got an automatic share working through the back door via samba, which led me to believe my guest additions were installed.
However here is the output from my /var/log/VBoxGuestAdditions.log file:

Code:

Starting the VirtualBox Guest Additions ...fail!
(modprobe vboxguest failed)
Starting VirtualBox Guest Addition service VirtualBox
Additions module not loaded!

Another indication that guest additions isn't installed or running properly, is that I cannot set a larger virtual screen resolution, which I understand should be possible if guest additions is in fact running. I only have the options of 4:3 800x600 and 600x480, whereas my normal host resolution is 1680x1050. My virtual screen is tiny.

lsmod | grep "vbox" gives the output:

Code:

vboxnetadp              5267  0
vboxnetflt            14966  0
vboxdrv              1792856  2 vboxnetadp,vboxnetflt

No reference above to vboxsf or vboxfs. Is it actually there or is it invoked via fstab? I've been trying without success to use fstab to enable a share at vm startup. Have probably tried 20 different fstab entries to date. I always get a vboxfs (vboxsf?) error msg. All vboxfs type fstab entries in my fstab removed at present. Afraid the manuals and help files aren't all they could be for a virtual noob -- ie: quotes, no quotes, sharenames, mountpoints. Not sure what specific values to enter for these in fstab for my particular system. A suggested fstab entry matching my own directories and mounts here would do wonders if possible. One fstab entry I've tried for instance is:

mount -t vboxsf -o uid=1000,gid=1000 share mountpoint

Have tried various values for "share" and "mountpoint" in the above example without success as of yet. I'm missing something.

My system:
Quad core amd cpu and msi mobo (virtual compliant), 4GB ram, 64bit ubuntu desktop host, virtualbox 3.2.8, 64bit ubuntu guest.

On the host I have a 20 gig ext4 partition from a separate drive successfully mounted via fstab on my ubuntu host's /media/share for virtual file sharing use, with the "share" directory having user read/write access via chown and samba.

On guest ubuntu I have a shared /home/v1share directory.

These two directories now networked through samba. Somehow muddled through that, but it seems to work sort of. Seems a bit cumbersome but I can transfer files and read them. I'd really prefer to have all of my shared files just automatically written to the /media/share directory though and have this just work, when I start up my ubuntu guest.

My next guest will be win xp, as I need to share xp program data with the ubuntu host. Would like to sort this sharing/screen resolution/guest additions problem out before I install xp and make the system more complicated. I'll have to get the legal rights transfered over from another computer to get the xp activated and updated and I don't then want to trash my xp later on getting the sharing to work. Many thanks.

catkin 12-29-2010 04:41 AM

Guest Additions should not be installed on the host.

After installing Guest Additions there should be three files in the /var/log directory which may contain clues about why Guest Additions are not working: vboxadd-install.log, VBoxGuestAdditions.log and vboxadd-install-x11.log.

On a Slackware64 13.1 host running VirtualBox 3.2.12 with Slackware64 13.1 guest with Guest Additions 3.2.8 and working Shared Folders (the Shared Folder is called d):
Code:

lsmod | grep vbox
vboxsf                32325  1
vboxguest            135879  8 vboxsf
mount -t vboxsf d /mnt/host\:d/
df -hT /mnt/host\:d/
Filesystem    Type    Size  Used Avail Use% Mounted on
none        vboxsf    50G  43G  7.4G  86% /mnt/host:d


Thane 12-29-2010 04:32 PM

getting there...
 
Thanks catkin for your reply! I subsequently realized from your post, that I had installed guest additions on the host and was also trying to install them on the guest with problems. Another search revealed, that two installations will conflict. Since I've tried so many things out so far, I decided the best course would be to delete everything and start from scratch, which I've done. Happy to say I've just gotten guest additions installed on the guest, but I've still got a ways to go to get everything up and running. I'll work on it. There are still some things I would welcome a little insight on from anyone though. Still confused about the actual info to insert for the words "share" and "mountpoint" in the following line:

Code:

mount -t vboxsf -o uid=1000,gid=1000 share mountpoint
Also in the Ubuntu Community page for host, it says to enter

Code:

mkdir ~/VirtualBoxShare
VBoxManage sharedfolder add "XP" -name "share" -hostpath /home/your/shared/folder/VirtualBoxShare/

Where "XP" is the name of the virtual machine in VirtualBox, and "share" is the name of the share as the guest machine will see it.

This is very confusing for a noob. The name I gave to my newly reinstalled guest ubuntu machine to set it up (and the name that shows up in the host menus) was "ubu64_1" but Virtualbox also shows my virtual computer name elsewhere as "v1-VirtualBox". Which to use? And as to the "share" referred to above, does this mean the shared folder on the host or the guest. I'm thinking the former? If this is the case, I assume the hostpath is in relation to the host shared folder and not the other shared folder its to be shared with. Its great to have helpfiles, but for those of us, who've never done this before and still struggle somewhat with the command line, these finer points aren't really obvious. They lead to a lot of needless trial and error after getting overloaded from man page info.

My reinstalled system:
host is ubuntu-10.10-desktop-amd64
host directory to share: /media/share
guest virtual machine: either ubu64_1 or v1-VirtualBox
guest directory to share: /home/v1share
No samba shares set up at present like I had in my initial post.

Many thanks for any input. Cheers.

catkin 12-29-2010 10:42 PM

Regards the mount command:
  1. "share" is the name you gave the Shared Folder in the definition of the VM. In the configuration GUI it is in the last section, Shared Folders.
  2. "mountpoint" is a directory on the guest machine such as /mnt
Regards "Virtualbox also shows my virtual computer name elsewhere as "v1-VirtualBox"", where did you see that name? I have only ever seen VMs named as they appear in the left pane of the configuration GUI window and as listed by VBoxManage list vms

You don't need to use VBoxManage sharedfolder add if you are more comfortable working in the configuration GUI (that's how I choose to do it even though I am familiar with the command line). If you do choose to use it then:
  1. The machine name should be as it appears in the left pane of the configuration GUI window and as listed by VBoxManage list vms ignoring the long hexadecimal string -- unless you want to be a real geek and use that instead!
  2. The share name should be the name listed in the configuration GUI under Shared Folders or as listed by VBoxManage list --long vms after "Shared Folders" (I could not find a way to list only the Shared Folders.
  3. The hostpath is the directory on the host, in your case /media/share
Regards sharing the guest's /home/v1share with the host, it cannot be done directly using Shared Folders; from the User Manual: "4.3 Shared folders With the “shared folders” feature of VirtualBox, you can access files of your host system from within the guest system". What you could do is set up mounts so the guest's /home/v1share is actually on the host and made available on the guest via Shared Folders or otherwise. For example, /home/v1share could be a symbolic link to /media/share.

If you do choose to use some other mechanism instead of Shared Folders to to share the guest's /home/v1share with the host, NFS is a better choice than samba when both systems are Linux; samba emulates Windows (SMB now called CIF) networked file systems so is only well suited when the sharing client needs to see a Windows file share.

Thane 12-29-2010 11:01 PM

Many thanks again catkin! I'll plug away at it some more. Getting closer. Cheers


All times are GMT -5. The time now is 11:41 AM.