Title: [HOWTO] Setup VirtualBox Guest Addition Module, Shared Folders and Clip-board
Note: Moved from the theme "Intermediate/Advanced User Questions" to this theme "Tutorials"
Guide covers:
- Creating a module for VirtualBox Guest Additions with Porteus tools.
- Accessing a FTP-server (mirror) for downloading Porteus software.
- Setup "Shared folder" between a Windows10 host and Porteus installed in a VirtualBox.
- Setup shared Clip-board between a Windows10 host and Porteus installed in a VirtualBox.
- Setup drag and drop between a Windows10 host and Porteus installed in a VirtualBox.
Background:
- Setup "shared folder" with the ordinary procedure on VirtualBox failed on my system.
- Several contributions in this forum indicates that several users have had the same problem.
Used abbreviations:
Vbox = VirtualBox
W10 = Windows 10 version 22H2
Software and setup used for this tutorial:
Host: Windows 10 version 22H2
Guest: Porteus-LXQT-x86_64.iso
Shared W10 folder: C:\Users\Public\Documents\porteusx
Beware: Porteus desktop is the LXqt (is also used by newer lubuntu)
Porteus is installed on a Vbox drive:
Size: 3.2GB
Partition type: msdos
The file system: ext4
Mounted in Porteus as: /mnt/sda1
Bootloader: installed (Porteus boots from the Vbox disk)
Beware: do NOT load or install the Vbox Additions "VboxGuestAdditions.iso" in Porteus
Reboot from Vbox drive in "Graphics mode"
(Beware: Porteus-LXQT-x86_64.iso must NOT be loaded in the optical drive of Vbox)
Eventually eject any "iso" from the optical disk:
1. In Vbox in "Devices/Optial Drive" use option "Eject" or "Remove" media
Enable data transfer between Porteus in Vbox and W10:
1. In Vbox: "Devices/Drag and Drop", select: "bidirectional"
2. In Vbox: "Devices/Clip board", select: "bidirectional"
Add shared folder in Vbox :
1. In Vbox "Devices/Shared Folder",
select or add path to folder in W10: "C:\Users\Public\Documents\porteusx"
2. Select Options for the shared folder:
[ ] Read only
[x] Automatic
[x] Permanent
Mirrors for download of porteus modules, see:
http://porteus.org/porteus-mirrors.html
Used mirror site for this guide:
http://www.mirrorservice.org/sites/dl.porteus.org/
Find IP address of mirror site with, eg. a W10 command prompt, enter:
ping mirrorservice.org
The IP-address displayed by the ping will properly be: 212.219.56.184
Opening FTP server for downloading software for Porteus
With the file manager in Porteus "Accessories/PCManFM-Qt":
1. Use "Go/Connect to Server"
2. In the popup menu "Connect to remote Server", enter
Type: FTP
Host: 212.219.56.184
Path: /sites/dl.porteus.org
(x) Anonymous login
3. When the server opens, then goto folder:
.../sites//dl.porteus.org/x86_64/Porteus-v5.0/kernel/
4. Copy the following files (modules) to the Porteus folder "guest/Downloads"
(apparently used for the building of the Vbox Guest Addition)
05-devel.xzm
06-crippled_sources-5.18.8-64bit.xzm
5. Copy the modules from "guest/Downloads" to "/sda1/mnt/porteus/optional"
Activate the modules mentioned above:
1. Navigate to folder "/sda1/mnt/porteus/optional"
2. Use "Tools/Open Tap in Root instance"
3. Enter password: toor
4. Right mouse click on a module
5. In popup menu select: "Open With/Activate..."
Check the modules are activated in Porteus:
1. Open: "System Tools/Porteus System Info"
2. When prompted, then enter password: toor
3. In popup menu "..Porteus system info..", select: "Porteus" and then "Modules"
4. The following modules are shown as activated in my system:
000-kernel.xzm
001-core.xzm
002-xorg.xzm
002-xtra.xzm
003-lxqt.xzm
05-devel.xzm
06-crippled_sources-5.18.8.64bit.xzm
Building the Vbox Guest Addition Module in Porteus:
1. Open: "System Tools/Vbox builder"
2. When prompted, then enter password: toor
3. In popup menu "Update Vbox Builder" check
(x) Vbox Guest Additions (to be built and used inside the VM)
Press OK
4. In popup menu "vboxguest":
[x] I want to download the Vbox guest addons ISO
5. A popup window "Progress window" is shown. Beware: it takes several minuts!
6. The Vbox Guest Addition Module will be saved to: /tmp/vbox-guest-7.0.4-porteus-v5.0-x86_64-1prt.xzm
7. With root-rights, copy the file to: /mnt/sda1/porteus/modules/
8. After rebooting the Vbox Guest Addition will be activated automatically.
After rebooting Porteus in "Graphics mode" the following should now be possible:
1. The screen resolution of Portues in Vbox must be resizable.
2. The clip-board must be shared between Porteus and W10
3. Data Drag-and-drop from W10 to Vbox are copied to "/tmp/VirtualBox Dropped Files"
4. Data Drag-and-drop from Vbox to W10 is apparently not possible. (?? any ideas/knowhow)
5. A shared folder must appear in the Porteus:
- Open Porteus file manager: "Accessories/PCManFM-Qt"
- The following folder must be available: "/media/sf_porteusx"
- "sf_porteusx" must be shown as mounted in the list of the listed devices in the file manager
Beware: properly only the "root" can open the shared folder: "sf_porteusx"
Use Porteus Terminal to give "guest" access to the shared folder with the following commands:
1. Enter: su
2. Enter Password: toor
3. Enter: usermod -aG vboxsf guest
4. Enter: chown -R guest:users /media/
5. Reboot Porteus in "Graphics mode"
Dear Porteuser
Hopefully it worked for you!
Any feedback and additions will be appreciated.
Dear Developer team
Is it possible to ease the setup of "Vbox Guest Additions" and the shared features?
Kind regards
moel
[HOWTO] Setup VirtualBox Guest Addition Module, Shared Folders and Clip-board
- moel
- Ronin
- Posts: 2
- Joined: 04 Dec 2022, 17:24
- Distribution: Porteus-LXQT-v5.0-x86_64.iso
- Location: Switzerland
[HOWTO] Setup VirtualBox Guest Addition Module, Shared Folders and Clip-board
Last edited by moel on 30 Dec 2022, 19:49, edited 1 time in total.
- Rava
- Contributor
- Posts: 5424
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
[HOWTO] Setup VirtualBox Guest Addition Module, Shared Folders and Clip-board
I am sure you meant "05-devel.xzm", and you do not have a 002-xorg.xzm module activated in your system? You sure only have a 002-xtra.xzm?
Added in 3 minutes 15 seconds:
My core modules 00[0123]-* are these:
(I renamed my 003-xfce.xzm since there is also a 003-xfce-4.12 and now even a 003-xfce-4.18 version available)000-kernel.xzm
001-core.xzm
002-xorg.xzm
002-xtra.xzm
003-xfce-4.16-20220925.xzm
Cheers!
Yours Rava
Yours Rava
- moel
- Ronin
- Posts: 2
- Joined: 04 Dec 2022, 17:24
- Distribution: Porteus-LXQT-v5.0-x86_64.iso
- Location: Switzerland
[HOWTO] Setup VirtualBox Guest Addition Module, Shared Folders and Clip-board
Thank you Rava for the feedback!
You are right!
002-xorg.xzm was missing and
05-devel.xzm was misspelled as 05-devl.xzm
On my system, with lxqt desktop, the modules displayed as activated must be:
000-kernel.xzm
001-core.xzm
002-xorg.xzm
002-xtra.xzm
003-lxqt.xzm
05-devel.xzm
06-crippled_sources-5.18.8.64bit.xzm
The errors will be corrected in the original "HowTo" above
You are right!
002-xorg.xzm was missing and
05-devel.xzm was misspelled as 05-devl.xzm
On my system, with lxqt desktop, the modules displayed as activated must be:
000-kernel.xzm
001-core.xzm
002-xorg.xzm
002-xtra.xzm
003-lxqt.xzm
05-devel.xzm
06-crippled_sources-5.18.8.64bit.xzm
The errors will be corrected in the original "HowTo" above
[HOWTO] Setup VirtualBox Guest Addition Module, Shared Folders and Clip-board
This thread is very useful thank you. bumping it * Updated jan 31/ 2025 *
Using oracle virtual box as host from windows11
Bios setting svm enabled
general settings 6cpus and 14gb memory
.vdi drive size 50gb
1. we will install porteus by booting off of the iso. then setup our partitions and install porteus. Following that we will remove the .iso and boot off of the .vdi. This guide will help you setup your virtual machine. Its easy once you have it setup and running. This guide also covers making your own porteus boot .iso for when your more advanced
2. Setting up your drives
For later on I recommend not using 3rd party tools to create an .iso was having some weird problems doing that. more on that below.
boot off the porteus .iso.
once booted off the .iso. go to gparted and create a partition table mdos and format the .vdi to ext4. 25gb for the first drive
do the same for the second one
I have this setup
/mnt/sda1/ 25gb <------- porteus install and modules
/mnt/sda2/ 25gb <-------- for overlays with docker
install porteus to the .vdi using porteus installer in applications menu. First select mount drive you can do that in the install or gparted
and make the bootloader. then shutdown and uncheck .iso from the virtual box boot order.
go to storage and remove the .iso and then move the .vdi up to controller IDE and make it primary device 0
go to settings - general - move hard drive to top of boot order uncheck .iso
boot in and make changes to your /boot folder ect. /boot/syslinux/porteus.cfg
setup your extramod directory
setup your changes I use
notice /porteus the bootloader can find it on the boot drive
you could use UUID as well or even /mnt/sda1/porteus
3.
This is a kind of a repeat of above but just to give you other examples
sudo su
blkid
setup your /boot/syslinux/porteus.cfg for your UUID like
Next we will proceed to install guest additions to use the copy paste from host ect
We need to get the guest additions.xzm and put it in /porteus/modules so it starts on boot.
Lets make our life a little easier go to terminal
cd /mnt/
sudo chown guest:users sda1 -R
sudo chmod 755 sda1 -R
this will allow you to copy your modules from /Downloads into /porteus/modules
dont know why its not like that to begin with
while we are here lets
sudo usermod -aG vboxsf $(whoami)
this adds guest to the vboxsf group and will save you time later
4.
Guest addtions
Install a web browser go to porteus.org and download 05 devel and crippled sources .xzm from the kernel part of porteus version and activate those
Go to applications and virtual box
select guest addtions
you have to indeed select download guest additions .iso option to download. and wait for the terminal to blink. at the first stage it takes a while to run the script from the .iso. wait for the prompt to blink then press ok.
should take half a minute
move the new module to /porteus/modules/ and reboot.
then everything should work as it boots the guest addition from the module
got shared clip board, drag and drop and shared folder working.
go to top menu of virtual box and set those to bidirectional those are extreme useful copy paste and drag and drop
next access shared folder as guest (root can access it currently)
5.
Shared folder
In virtual box go to shared folder of the vm
select the folder and below give it a name
select auto mount
boot into porteus
remember before we used
sudo usermod -aG vboxsf $(whoami)
if you didnt do that use that command and reboot
otherwise proceed
your shared folder will be in /media/ unless you auto mounted it to another location
open file explorer and right click near the trash icon and select choose add entry
choose location to /media/ and then give it a name at the top
then you can easily get to it
6. Making a custom iso
Optional if you prefer to boot from an .iso. Create a custom boot .iso.
once you have porteus setup with the right config files.
setup an extramod directory on your .vdi and point to it in your /boot/syslinux/porteus.cfg so you can dump modules into it
cant make those changes after we make the .iso
cd /mnt/mydrive/porteus/
./makeiso.sh porteusmaster.iso #can be any name
drag this to your host pc. if you cant just use a drive like proton or google drive to upload it. or use the shared folder.
retrieve from drive on host.
then you can choose to boot from the .iso in virtualbox you wont be able to edit your default modules thats why we setup the extramod directory before we made the .iso.
best recommendation is dont travel to far into this stuff as it can get confusing very fast.
Lets enable 256 mb of video memory. Exit out of your vm session open cmd terminal in windows as administrator
cd C:\program files\oracle\virtualbox
vboxmanage modifyvm porteus5.1 --vram 256 <---------- replace porteus5.1 with the name of your vm
then when you go to settings in virtualbox you can increase it to 256mb
3d acceleration doesnt work dont use it
virtual box is way behind and doesnt properly support it. regards max 256mb. we dont need it anyway were not going to game just do fun stuff on porteus
I also tried to install the nvidia driver in porteus by compiling it for the kernel and it doesnt work with virtual box
it works with a full install of porteus however
Important usage. do not power off the machine instead send powerdown signal. this prevents the .vdi from becoming corrupt
Also important
Windows has a bunch of features Hyper-V which virtual box doesnt need. Search bar windows features uncheck hyper-v
Type security in windows search bar
device security and go to core isolation
turn off memory integrity
This is very important and the reason why I dislike windows. Why would I want to use a virtual machine and have it perform terribly and possibly make me never want to use one? that setting alone being turned off is absolutely mandatory to use a virtual machine and have it perform properly
Using oracle virtual box as host from windows11
Bios setting svm enabled
general settings 6cpus and 14gb memory
.vdi drive size 50gb
1. we will install porteus by booting off of the iso. then setup our partitions and install porteus. Following that we will remove the .iso and boot off of the .vdi. This guide will help you setup your virtual machine. Its easy once you have it setup and running. This guide also covers making your own porteus boot .iso for when your more advanced
2. Setting up your drives
For later on I recommend not using 3rd party tools to create an .iso was having some weird problems doing that. more on that below.
boot off the porteus .iso.
once booted off the .iso. go to gparted and create a partition table mdos and format the .vdi to ext4. 25gb for the first drive
do the same for the second one
I have this setup
/mnt/sda1/ 25gb <------- porteus install and modules
/mnt/sda2/ 25gb <-------- for overlays with docker
install porteus to the .vdi using porteus installer in applications menu. First select mount drive you can do that in the install or gparted
and make the bootloader. then shutdown and uncheck .iso from the virtual box boot order.
go to storage and remove the .iso and then move the .vdi up to controller IDE and make it primary device 0
go to settings - general - move hard drive to top of boot order uncheck .iso
boot in and make changes to your /boot folder ect. /boot/syslinux/porteus.cfg
setup your extramod directory
setup your changes I use
Code: Select all
append changes:EXIT:/porteus extramod=UUID:1430b4a9-ce3f-4893-9b03-923fcb082edf/extramod
you could use UUID as well or even /mnt/sda1/porteus
3.
This is a kind of a repeat of above but just to give you other examples
sudo su
blkid
setup your /boot/syslinux/porteus.cfg for your UUID like
Code: Select all
append changes=EXIT:UUID:DFJFDS-45Fdsaf-23423423/ extramod=UUID:DFJFDS-45Fdsaf-23423423/extramod/
Next we will proceed to install guest additions to use the copy paste from host ect
We need to get the guest additions.xzm and put it in /porteus/modules so it starts on boot.
Lets make our life a little easier go to terminal
cd /mnt/
sudo chown guest:users sda1 -R
sudo chmod 755 sda1 -R
this will allow you to copy your modules from /Downloads into /porteus/modules
dont know why its not like that to begin with
while we are here lets
sudo usermod -aG vboxsf $(whoami)
this adds guest to the vboxsf group and will save you time later
4.
Guest addtions
Install a web browser go to porteus.org and download 05 devel and crippled sources .xzm from the kernel part of porteus version and activate those
Go to applications and virtual box
select guest addtions
you have to indeed select download guest additions .iso option to download. and wait for the terminal to blink. at the first stage it takes a while to run the script from the .iso. wait for the prompt to blink then press ok.
should take half a minute
move the new module to /porteus/modules/ and reboot.
then everything should work as it boots the guest addition from the module
got shared clip board, drag and drop and shared folder working.
go to top menu of virtual box and set those to bidirectional those are extreme useful copy paste and drag and drop
next access shared folder as guest (root can access it currently)
5.
Shared folder
In virtual box go to shared folder of the vm
select the folder and below give it a name
select auto mount
boot into porteus
remember before we used
sudo usermod -aG vboxsf $(whoami)
if you didnt do that use that command and reboot
otherwise proceed
your shared folder will be in /media/ unless you auto mounted it to another location
open file explorer and right click near the trash icon and select choose add entry
choose location to /media/ and then give it a name at the top
then you can easily get to it
6. Making a custom iso
Optional if you prefer to boot from an .iso. Create a custom boot .iso.
once you have porteus setup with the right config files.
setup an extramod directory on your .vdi and point to it in your /boot/syslinux/porteus.cfg so you can dump modules into it
cant make those changes after we make the .iso
cd /mnt/mydrive/porteus/
./makeiso.sh porteusmaster.iso #can be any name
drag this to your host pc. if you cant just use a drive like proton or google drive to upload it. or use the shared folder.
retrieve from drive on host.
then you can choose to boot from the .iso in virtualbox you wont be able to edit your default modules thats why we setup the extramod directory before we made the .iso.
best recommendation is dont travel to far into this stuff as it can get confusing very fast.
Lets enable 256 mb of video memory. Exit out of your vm session open cmd terminal in windows as administrator
cd C:\program files\oracle\virtualbox
vboxmanage modifyvm porteus5.1 --vram 256 <---------- replace porteus5.1 with the name of your vm
then when you go to settings in virtualbox you can increase it to 256mb
3d acceleration doesnt work dont use it
virtual box is way behind and doesnt properly support it. regards max 256mb. we dont need it anyway were not going to game just do fun stuff on porteus
I also tried to install the nvidia driver in porteus by compiling it for the kernel and it doesnt work with virtual box
it works with a full install of porteus however
Important usage. do not power off the machine instead send powerdown signal. this prevents the .vdi from becoming corrupt
Also important
Windows has a bunch of features Hyper-V which virtual box doesnt need. Search bar windows features uncheck hyper-v
Type security in windows search bar
device security and go to core isolation
turn off memory integrity
This is very important and the reason why I dislike windows. Why would I want to use a virtual machine and have it perform terribly and possibly make me never want to use one? that setting alone being turned off is absolutely mandatory to use a virtual machine and have it perform properly