Installing Guest Additions eludes me...

Discussions related to using VirtualBox on Windows hosts.
Post Reply
trkee
Posts: 5
Joined: 2. Jan 2024, 20:36

Installing Guest Additions eludes me...

Post by trkee »

 Edit:  
I have as a guest Ubuntu server 22.04.3 installed & running nicely on my Windows 10 Pro machine. When I click on "Devices > Insert Guest Additions CD Image..." nothing happens. Under "Devices > Optical Drives > Choose/Create..." I see "Attached > VBoxGuestAdditions.iso". Clicking on "Choose" does nothing.

Clicking on "Optical Drives > Remove disk..." results in "Unable to eject...".

Clearly I'm missing something. But what? How do I get the additions installed?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Installing Guest Additions eludes me...

Post by scottgus1 »

Linux grabs pit-bull hard on its CDs. You have to unmount the CD inside the VM's OS, then the "CD" can be ejected.
trkee
Posts: 5
Joined: 2. Jan 2024, 20:36

Re: Installing Guest Additions eludes me...

Post by trkee »

Thanks for the reply. Please forgive my ignorance, but I have some questions:

1. Am I to understand that first the iso needs to be ejected so that it could be mounted and run via the Virtual Media Manager? I have experimented with creating a machine with and without specifying the guest additions when creating the VM. For whatever reason that has made no difference in the Virtual Media Manager - the guest additions iso is already mounted. So my next question assumes that I need to eject the iso before mounting it manually.

2. Here is what I believe to be a list of mounted drives (found by `mount -l`). Which of these is the GuestAdditions.iso?

Code: Select all

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1945040k,nr_inodes=486260,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=400600k,mode=755,inode64)
/dev/mapper/ubuntu--vg-ubuntu--lv on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17892)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
none on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/var/lib/snapd/snaps/core20_1974.snap on /snap/core20/1974 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/snapd_19457.snap on /snap/snapd/19457 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/lxd_24322.snap on /snap/lxd/24322 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/core20_2105.snap on /snap/core20/2105 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/var/lib/snapd/snaps/snapd_20671.snap on /snap/snapd/20671 type squashfs (ro,nodev,relatime,errors=continue,x-gdu.hide)
/dev/sda2 on /boot type ext4 (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,noexec,relatime,size=400600k,mode=755,inode64)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=400596k,nr_inodes=100149,mode=700,uid=1000,gid=1000,inode64)
nsfs on /run/snapd/ns/lxd.mnt type nsfs (rw)
3. If none of the above is the guest additions iso, what else should I do?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Installing Guest Additions eludes me...

Post by scottgus1 »

Linux is rather beyond me, too. If you open the VM OS's CD drive, do the Guest Additions install files show up?

If so, then the ISO is already loaded and can be run.

Guest Additions have prerequisites in Linux, same as Virtualbox on the host, see https://www.virtualbox.org/manual/ch04. ... ions-linux and https://www.virtualbox.org/manual/ch02. ... nux-prereq
Also, watch the terminal installation report when running the GAs installer. Error messages will show if the install ran into a problem.
trkee
Posts: 5
Joined: 2. Jan 2024, 20:36

Re: Installing Guest Additions eludes me...

Post by trkee »

Thanks for your time and patience.

I'd like to "... open the VM OS's CD drive", but it's not at all clear how that's done. I can't even find a useful response searching on "Ubuntu server mount cd", or variations on that theme. I've seen several hints. For example:

Code: Select all

$ mount /dev/cdrom/VBoxGuestAdditions.iso
mount: /dev/cdrom/VBoxGuestAdditions.iso: can't find in /etc/fstab
and

Code: Select all

sudo ls -al /etc/fstab
[sudo] password for george:
-rw-r--r-- 1 root root 657 Jan  9 13:16 /etc/fstab
While I'm a noob in linux, I take this first guess at how I might get at the iso to say the machine has no idea where the iso is. Makes it hard to eject.

Digging deeper I found this:

Code: Select all

/dev/disk/by-id:
ata-VBOX_CD-ROM_VB2-01700376
But I can't figure out what it means or allows me to do. Can't mount it, I now know.

For jollies, I loaded VirtualBox on an older PC, but running Windows 10 Pro 22H2. Essentially same result - no automatic installation after pointing Devices to the install guest additions iso.

Any other thoughts on how to install (or learn where to find out how to install) VBoxGuestAdditions?
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Installing Guest Additions eludes me...

Post by fth0 »

In Ubuntu, the VirtualBox Guest Additions ISO normally gets mounted in "/media/<user>/". Open a Terminal, navigate to the mounted folder and manually start the installation with "sudo ./VBoxLinuxAdditions.run".
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Installing Guest Additions eludes me...

Post by scottgus1 »

In addition to fth0's thoughts above:

Is this server command line only? If so, don't bother with the Guest Additions. Most of the fancy stuff GAs does, including shared clipboard, needs a graphical desktop. And the Shared Folders setup can be handled with real host OS shared folders and a Bridged or Host-Only VM network.

If the server has a graphical desktop, why not try the File Manager? It should show the CD drive.
trkee wrote: 12. Jan 2024, 01:42 I loaded VirtualBox on an older PC, but running Windows 10 Pro 22H2. Essentially same result - no automatic installation after pointing Devices to the install guest additions iso.
The menu command says "Insert Guest Additions CD Image". That's all it does: insert the "CD". It is up to the OS inside the VM to autorun the "CD". And most modern OS's don't do CD autorun anymore.
trkee
Posts: 5
Joined: 2. Jan 2024, 20:36

Re: Installing Guest Additions eludes me...

Post by trkee »

Thanks to both of you.

Y'all figured out that I'm trying to share a folder from a PC host on a bridged VM server. I was following the directions at: https://www.makeuseof.com/how-to-create ... er-access/ . Stumbled on the need for a group name that didn't exist. Figured there's some magic needed to make vboxsf allow sharing. If guest additions doesn't do that in this situation, what "magic" do I need to do to make the sharing work? Aside from creating the group?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Installing Guest Additions eludes me...

Post by scottgus1 »

trkee wrote: 12. Jan 2024, 04:28 Stumbled on the need for a group name that didn't exist.
The manual says regarding Virtualbox Shared Folders: https://www.virtualbox.org/manual/ch04. ... mount_auto
Access to an automatically mounted shared folder is granted to everyone in a Windows guest, including the guest user. For Linux and Oracle Solaris guests, access is restricted to members of the group vboxsf and the root user.
However, I believe it is the Guest Additions installer that makes the group. If you haven't got GAs installed yet, the group won't be there.

Which leads us back to a question you missed:
scottgus1 wrote: 12. Jan 2024, 02:14 Is this server command line only?
Note that due to One issue per thread this topic is about getting Guest Additions installed. If you have succeeded installing GAs, then please start a new topic for the Shared Folders question.
fth0
Volunteer
Posts: 5678
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Installing Guest Additions eludes me...

Post by fth0 »

scottgus1 wrote: 12. Jan 2024, 02:14 Is this server command line only? If so, don't bother with the Guest Additions. Most of the fancy stuff GAs does, including shared clipboard, needs a graphical desktop.
I think that the VirtualBox Shared Folders don't need a graphical desktop, so there would be a reason to install the VirtualBox Guest Additions on a CLI-only server.
trkee
Posts: 5
Joined: 2. Jan 2024, 20:36

Re: Installing Guest Additions eludes me...

Post by trkee »

Thanks for all the guidance and wisdom shared. I'll sort it all out from here.
Post Reply