geffers
Posts: 572
Joined: Sun Jun 24, 2012 6:25 am
Location: UK

Virtual Machine Guest

Wed Feb 07, 2018 1:02 pm

Folks,

Has anyone tried running Raspian in a Virtual Machine?

Reason I ask is I have installed VirtualBox onto a Windows 10 machine Toshiba Satellite AMD 6 only 3GB Ram.

Ubuntu 16:04 runs with what appears to be correct resolution but slow so tried Raspian's PC Desktop version, this actually runs well on my machine but displays at 640x480, tried numerous setting changes but can't seem to alter display. the /boot/config.txt file is empty and I've tried adding settings to alter display but no luck.

Ubuntu 16:04 is my main system but runs from an external HD hence trying VirtualBox on a Windoz machine :cry:

So far just happy to experiment but am wondering; has anyone actually run an ARM version in a Virtual Envirinment?

Geffers

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Virtual Machine Guest

Wed Feb 07, 2018 1:17 pm

geffers wrote:
Wed Feb 07, 2018 1:02 pm
Folks,

Has anyone tried running Raspian in a Virtual Machine?

Reason I ask is I have installed VirtualBox onto a Windows 10 machine Toshiba Satellite AMD 6 only 3GB Ram.

Ubuntu 16:04 runs with what appears to be correct resolution but slow so tried Raspian's PC Desktop version, this actually runs well on my machine but displays at 640x480, tried numerous setting changes but can't seem to alter display. the /boot/config.txt file is empty and I've tried adding settings to alter display but no luck.

Ubuntu 16:04 is my main system but runs from an external HD hence trying VirtualBox on a Windoz machine :cry:

So far just happy to experiment but am wondering; has anyone actually run an ARM version in a Virtual Envirinment?

Geffers

Raspbian requires an ARM CPU and therefore not supported in Virtualbox.

If you want to run Debian Stretch with Radpberry Pi Desktop in Virtualbox then you need to install Virtualbox Guest Additions.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

geffers
Posts: 572
Joined: Sun Jun 24, 2012 6:25 am
Location: UK

Re: Virtual Machine Guest

Wed Feb 07, 2018 5:26 pm

Scouring the internet for answers I earlier tried;

Code: Select all

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-x11
This failed with unable to locate package for the former and no installation candidate for the second.

Tried variations on installing your suggestion virtualbox-guest-additions and get unable to locate package.

On my Windows10 machine am running 5.2.6 which has Guest Additions as part of it.

So, still running fine but at 640x480 only.

Geffers

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Virtual Machine Guest

Wed Feb 07, 2018 5:39 pm

geffers wrote:
Wed Feb 07, 2018 5:26 pm
Scouring the internet for answers I earlier tried;

Code: Select all

sudo apt-get install virtualbox-guest-dkms virtualbox-guest-x11
This failed with unable to locate package for the former and no installation candidate for the second.

Tried variations on installing your suggestion virtualbox-guest-additions and get unable to locate package.

On my Windows10 machine am running 5.2.6 which has Guest Additions as part of it.

So, still running fine but at 640x480 only.

Geffers

Guest Additions are installed within Virtualbox, it is somewhere in the menus...
Take what I advise as advice not the utopian holy grail, and it is gratis !!

mikerr
Posts: 2831
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK

Re: Virtual Machine Guest

Wed Feb 14, 2018 1:03 pm

Yes, in Debian Jessie ( Pixel) x86 you could just do:

Code: Select all

sudo apt install virtualbox-guest-dkms virtualbox-guest-x11
Latest version, Debian Stretch with Pi Destop doesn't have guest additions in the repositories,
so install them like this on the guest:

Code: Select all

sudo apt install build-essential module-assistant dkms
sudo m-a prepare
add the vbox additions iso in virtual box ( settings/storage/optical drive - vboxadditons.iso)

Code: Select all

sudo sh /media/cdrom/VBoxLinuxAdditions.run
and reboot
Last edited by mikerr on Wed Feb 14, 2018 6:45 pm, edited 1 time in total.
Android app - Raspi Card Imager - download and image SD cards - No PC required !

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Virtual Machine Guest

Wed Feb 14, 2018 5:23 pm

Take what I advise as advice not the utopian holy grail, and it is gratis !!

geffers
Posts: 572
Joined: Sun Jun 24, 2012 6:25 am
Location: UK

Re: Virtual Machine Guest

Wed Feb 14, 2018 5:31 pm

mikerr wrote:
Wed Feb 14, 2018 1:03 pm
Yes, in Debian Jessie ( Pixel) you could just do:

Code: Select all

sudo apt install virtualbox-guest-dkms virtualbox-guest-x11
Latest version, Debian Stretch doesn't have virtualbox or guest additions in the repositories,
so install them like this:

Code: Select all

sudo apt install build-essential module-assistant dkms
sudo m-a prepare
add the vbox additions iso ( settings/storage/optical drive - vboxadditons.iso)

Code: Select all

sudo sh /media/cdrom/VBoxLinuxAdditions.run
and reboot
I think questions about Virtual Environments can become confusing as to what you are running and on what.

I solved the issue by installing VBoxLinuxAdditions. There appeared to be a menu item for this but all that did was open a file browser. I eventually opened a terminal, CD to the location, then I had to run python3 <name of file> which installed it via command line.

All then worked fine.

Geffers

sarossell
Posts: 34
Joined: Tue Feb 16, 2016 4:09 am

Re: Virtual Machine Guest

Sun Apr 15, 2018 1:13 am

My experience was slightly different. This is what worked for me.
Running VirtualBox v5.2.8 on macOS High Sierra with 2017-11-16-rpd-x86-stretch.iso installed.

Install VirtualBox Guest Additions:
1. Select from VirtualBox menu: Devices > Insert Guest Additons CD image
2. Copy VBoxLinuxAdditions.run file to home directory.

Code: Select all

cp /media/cdrom1/VBoxLinuxAdditions.run ~/VBoxLinuxAdditions.sh
3. Install build functions.

Code: Select all

sudo apt install build-essential module-assistant dkms
sudo m-a prepare
4. Run VBoxLinuxAdditons script.

Code: Select all

sudo sh ~/VBoxLinuxAdditions.sh
5. Reboot. (Just in case)

Code: Select all

sudo reboot
To change resolutions:
In terminal run:

Code: Select all

lxandr
Scott A. Rossell -- Sandy Eggo, California, USA

Herbster
Posts: 8
Joined: Sun May 31, 2015 6:35 pm

Re: Virtual Machine Guest

Thu Jul 26, 2018 3:59 pm

Has any one tried this with the latest Desktop image (2018-06-27-rpd-x86-stretch.iso)? I've installed the Guest Additions, but I'm still not finding that when I resize the VM window that the Pi screen resizes. I've checked and Auto-Resize Guest Display is enabled. Any further tips? Or is there a good clear link for how to get this image running inside a VirtualBox VM?

Thanks

DirkS
Posts: 11066
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Virtual Machine Guest

Thu Jul 26, 2018 4:33 pm

Herbster wrote:
Thu Jul 26, 2018 3:59 pm
Has any one tried this with the latest Desktop image (2018-06-27-rpd-x86-stretch.iso)? I've installed the Guest Additions, but I'm still not finding that when I resize the VM window that the Pi screen resizes. I've checked and Auto-Resize Guest Display is enabled. Any further tips? Or is there a good clear link for how to get this image running inside a VirtualBox VM?
I did nothing special: create a 32-bit Debian VM with the ISO attached. then install and lastly install the guest additions.
I have all the view modes available.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Virtual Machine Guest

Thu Jul 26, 2018 6:22 pm

Herbster wrote:
Thu Jul 26, 2018 3:59 pm
Has any one tried this with the latest Desktop image (2018-06-27-rpd-x86-stretch.iso)? I've installed the Guest Additions, but I'm still not finding that when I resize the VM window that the Pi screen resizes. I've checked and Auto-Resize Guest Display is enabled. Any further tips? Or is there a good clear link for how to get this image running inside a VirtualBox VM?

Thanks
What revision of Virtual Box ?

Host Hardware / Software ?
Take what I advise as advice not the utopian holy grail, and it is gratis !!

User avatar
DougieLawson
Posts: 42889
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Virtual Machine Guest

Thu Jul 26, 2018 6:57 pm

Are you running 5.2.16 with the VBoxGuestAdditions installed on RPD?

Get this ISO https://download.virtualbox.org/virtual ... 5.2.16.iso and attach it to your VM. Then when it's booted navigate to the virtual CDROM and run the shell script to install the additions.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Herbster
Posts: 8
Joined: Sun May 31, 2015 6:35 pm

Re: Virtual Machine Guest

Fri Jul 27, 2018 8:57 am

So yes I'm running VirtualBox 5.2.16 with the VBoxGuestAdditions installed on RPi and this is running on a Dell Win10 laptop, using the latest ISO download as of yesterday.

I can go into the view menu and change to a different resolution and then reboot the Pi and it'll work. But what I don't see happen is that if I resize the window it happens automatically.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: Virtual Machine Guest

Fri Jul 27, 2018 10:55 am

Herbster wrote:
Fri Jul 27, 2018 8:57 am
So yes I'm running VirtualBox 5.2.16 with the VBoxGuestAdditions installed on RPi and this is running on a Dell Win10 laptop, using the latest ISO download as of yesterday.

I can go into the view menu and change to a different resolution and then reboot the Pi and it'll work. But what I don't see happen is that if I resize the window it happens automatically.

Please can you give it correct naming convention as your use of RPi and Pi is confusing:

Debian Stretch with Raspbian Pi Desktop (RPD)


Have you read the User Manual ? as there are some limitations depending on the Host's hardware:

https://www.virtualbox.org/manual/
Take what I advise as advice not the utopian holy grail, and it is gratis !!

Rocket59
Posts: 1
Joined: Thu Jul 04, 2019 5:13 pm

Re: Virtual Machine Guest

Thu Jul 04, 2019 5:20 pm

geffers wrote:
Wed Feb 14, 2018 5:31 pm
mikerr wrote:
Wed Feb 14, 2018 1:03 pm
Yes, in Debian Jessie ( Pixel) you could just do:

Code: Select all

sudo apt install virtualbox-guest-dkms virtualbox-guest-x11
Latest version, Debian Stretch doesn't have virtualbox or guest additions in the repositories,
so install them like this:

Code: Select all

sudo apt install build-essential module-assistant dkms
sudo m-a prepare
add the vbox additions iso ( settings/storage/optical drive - vboxadditons.iso)

Code: Select all

sudo sh /media/cdrom/VBoxLinuxAdditions.run
and reboot
I think questions about Virtual Environments can become confusing as to what you are running and on what.

I solved the issue by installing VBoxLinuxAdditions. There appeared to be a menu item for this but all that did was open a file browser. I eventually opened a terminal, CD to the location, then I had to run python3 <name of file> which installed it via command line.

All then worked fine.

Geffers

[This solution worked for me, Thanks Ron]

Return to “Raspberry Pi Desktop for PC and Mac”