VirtualBox Arch Install


Nothing fancy here, just Mate DE running


My partition setup.
I tried to follow the Foss Tutorial on a virtualbox install, but the “archinstall” script does not work well with a MBR
type of disk.
I finally figured out the manual Arch install, using VirtualBox, it has been awhile. Do not try to install the
virtualbox-guest-additions in Arch, instead install the Arch virtualbox-guest-utils and not the -nox version.
The -nox version is somtimes installed and it will conflict
with the other, the difference is mostly in the virtualbox
graphics driver, one has it, the other doesn’t.
I have found a way to run the virtualbox-guest-additions, it has helped but I still have found no way to access my shared folder.
I am willing to try any suggestion!!!

1 Like

@4dandl4
Hi Daniel,
I can not suggest anything, but I have questions

  1. Why do you mqke a separate /boot partition? That seems to be the Gentoo way of doing things. Most other distros leave it in /. Rolling release distros seem to accumulate lots of kernel copies in /boot. Is it because of that?
  2. When you have Arch running in virtualbox, can you access things like filesystems and printers which are outside the sandbox? I cant do that in Gnome boxes, and I was wondering if virtualbox allows it.
  3. Efficiency. I just did an experiment running firefox displaying a long webpage and compared its cpu usage inside Gnome boxes (ie qemu) and outside. It seems to take about 4x as much cpu time inside Gnome boxes - ie if the firefox task used 50%cpu time running in the host os, then when I ran the same job inside Gnome boxes, the qemu process took 200% cpu time ( ie 100% of 2 cpu’s). That is a big performance difference. Is virtualbox like that too?
    Regards
    Neville

@nevj
I have spent the better part of two days trying to get Arch to run in a VirtualBox install. I used to run Arch
a few years ago, in dual boot with W7, but those days are gone. The /boot was just something to try, and it worked, but Arch would be just as happy to run in one /mnt root partition, with maybe few GB for the swap
partition. My main reason for installing Arch, was to compare it with Gentoo, that is also running in a VM. The two are similar but also very different, the install time between the two is very different.
I can remember when /boot used to be .ext2, and was used to isolate the boot from the / root, times have changed.
With Gentoo I am able to access the shared folder, to transfer files from Windows. With Arch I am having to use a thumb drive for data transfer. I do not know of any VM, that would make it easy, to
access other drives and their filesystem, it might can be done, but that is over my head. I do know
when Arch or Gentoo is installed to either HDD or SDD they are able to access other filesystems.
I have never tried to access a printer from a VM, that is what Windows is for.
I am hoping that some of our Linux geeks might have a solution for the shared folder access.
This is how I have learned LInux, I always use a VM before a hard install.
Thanks for posting, nice chatting with you.

@4dandl4
Hi Daniel,
Can you just clarify one thing.
I get the message that this shared folder is shared between Windows and Linux, both running in virtualbox – is that correct?
It might help you to get a response from someone if you explained more about how shared folders work, in your situation.

Yes, VM installs are a good way to learn

Regards
Neville

@nevj



The Windows vb_shared folder and path is entered by ticking the VirtualBox Shared Folders and
entering the data necessary to mount the shared folder on the host machine.
As you can see Gentoo has mounted the folder, but Arch has not. Why? I have read that the shared
folder mounting between Windows and Arch has been broken in VirtualBox for sometime now.
I will keep working Google to see if I can find a solution.

@4dandl4 ,
Thanks, I understand now. You have Windows as the host OS. I can see how sharing a folder would work there.

Keep tracking the Arch issue. Someone will have tackled it.

I might be able to try virtualbox running in Debian as the host OS. Then I could perhaps share anything Debian had mounted? Give me some time and I will do a trial run.

Neville

@4dandl4
Hi Daniel,
Just a thought. Are you sharing the same folder with gentoo?
Will virtualbox share one folder with two guest systems simultaneously? Maybe it locks other systems out when you share.

I am going to try an arch install in Gnome boxes. It would seem boxes can share a folder too, so I can test it out there.

Neville

@nevj
I am pretty sure that is not the issue. With Gentoo you use the gpasswd -a vboxsf daniel to become
a user, the gpasswd command does not seem to work with Arch. When the shared folder is mounted
it will show in the media folder in the Linux os.
I have tried Gnome Boxes, when I was running Linux Mint, just never was able to make it do what I
wanted. Hope you get Arch to run in Gnome Boxes.

@nevj


I am at last able to mount the Windows shared folder with Arch.

And this is the shared folder opened in Arch.

@4dandl4

That’s great news.
How about sharing the method, or was it just a silly oversight?

I will still have a go with Arch inside Gnome boxes. Always something to learn in this changing world of modern computing
Neville

1 Like

@nevj
Hi nevj, not really an oversight, more like a determined old man, refusing to give up. It all starts on how
Arch and VirtualBox interacts with each other. Arch has the “virtualbox-guest-utils” that one must
install, but that is only good for the “VMware/VirtualBox graphics driver”, one still needs the
“virtualbox-guest-additions”, and that is where the fun starts. Although Arch has a candidate for
downloading a “virtualbox-guest-iso”, it really is of no use, I did download the “virtualbox-guest-additions-iso 6.1.32-1” from VirtualBox. I used the host drive in VirtualBox and placed the iso in the host cdrom. I booted the Arch VM and the iso appeared on the desktop, I then cd to the “/run/media/daniel/VBox_GAs_6.1.32” and used ls and then used “./VBoxLinuxAdditions.run”.
The first run was ok, but I then had to use “pacman -S kernel 5.16.2-arch1-1 gcc”, one was for the kernel headers and gcc was for perl.
I ran the “./VBoxLinuxAdditions.run” again and a “/sbin/rcvboxadd start” and rebooted the VM.
I now had the shared folder on the desktop but I could not open it from my user account. I restarted the VM and logged into my root account, and was able to open the shared folder. So I navigated to the Media folder and changed the owner from root to daniel, and also the vboxsf folder, that is in the Media folder.
Before I left the root account I did a “usermod -aG vboxsf daniel” to add me to the vboxsf user group. I restarted the VM and logged into my user account, viola, the shared folder was working.
Most Debian based distros will do this, with just a mouse click, but Arch and Gentoo are a completely different animal, although Arch may work differently with Genome Boxes.

1 Like

@4dandl4
I am older than you, and just as determined.
Thanks for documenting that, it will help, not only me but lots of readers.
Maybe I try with Debian first, then try Arch.
Neville

1 Like

@nevj
Smart move!!!

I’ve been setting up a few Arch VMs recently as well, but going through the process manually rather than using the installation script. I’ve set them up as MBR/BIOS rather than EFI (there doesn’t seem to me to be any compelling reason to use EFI for a VM).

Regarding guest additions, you don’t need to install it using the .iso image - just installing the virtualbox-guest-utils will suffice. You do also need to enable vboxservice (sudo systemctl enable vboxservice.service).

If you are planning to use shared folders, you also need to ensure the user on the VM is included in the vboxsf group.

If you are using a fully fledged desktop like MATE, it should pretty much work straight off the bat (if you are going for a more minimalist option - e.g. Openbox - you will have to install some extra items such as a polkit authentication agent and a notification daemon).

This Arch Wiki page has a lot of useful information - VirtualBox/Install Arch Linux as a guest - ArchWiki.

Installing Arch is always such a good learning experience!

@Winston
Yes, I also used that wiki, but still had issues with the Arch VM and the virtualbox-guest-additions install.
The Arch virtualbox-guest-utils was lacking in what it installed. Gentoo was easier to setup in a VM than
Arch has been.