HOWTO LMDE as Virtualbox guest

Archived topics about LMDE 1 and LMDE 2
Locked
olligod

HOWTO LMDE as Virtualbox guest

Post by olligod »

Version Used: LMDE-AMD64-DVD, Dec. 2010, Virtualbox 3.2.8:
(If you use 32-bit, change things accordingly.)

This post is about how to circumvent potential problems by
- manual partitioning of the virtual harddrive
- installing guest additions

This post assumes basic knowledge of
- Virtual Box
- How to launch programs from the commandline in Mint
If somebody has just a quick question about it (even though most can be googled),just ask.

This is a little advice for those who may be new to linux-Mint (and especially Mint-Debian) and might get "stuck" trying to install.

...this is a peace of cake for the more experienced ones of course -
my intention is to enable the curious newbies to try this marvellous distro.


OK, so let's jump right in...
I created a new virtual machine and new virtual hard drive (8 GB).
It occurred to me that it is NOT straight forward to install LMDE on the virtual hard drive (out of the life system):
After launching the installer when it comes to the harddrive and partitioning, it does not recognize the hard drive - AS LONG AS the "virgin" hard drive does not have a partition table at all (even with no entries).

Therefore, I launched gparted (as sudo, from a command line. May work out of the menu as well). I left the installer open in the meantime. in gparted, I created an empty partition table (I also created the partitions to use later - just "/" (root), size 7 GB and swap, rest=1GB). After that, I closed gparted and swiched back to installer.
EDIT: As a file System for "/", use ext4 or ext3 I suggest. The ext2 suggested by default has more issues/potential data loss in the case of a system crash (aka it is "no journalling file system")

I then refreshed the hard drive reading in the installer - and the partitions appeared. I double clicked the one I wanted to assign to "/" and selected accordingly.
Only then could the install continue.

-----

To make full use of virtualbox, one has to install the special drivers: guest-additions.
To do this, from the Virtal machine menus, lanuch "install guest additions". This will "mount a virtual CDROM".

Again, I found it not straight forward to actually launch the installer:
You need to be root (or possibly do it as sudo). I launched from the command line as root

Code: Select all

sh /media/cdrom0/VBoxLinuxAdditions-amd64.run
Remarks:
(1) if you tried it as sudo, you would have to type "sudo" in front of the actual command.
(2) The "sh" seemed necessary, otherwise there was a file permission issue in my case.

EDIT: Occasionally, using the *sudo* method, I have huge display issues (completely garbled guest screen) while installing guest additions in Debian/Ubuntu/Derivative-guests.
After all, a new video driver is installed...
SOOO, if you open a root shell by typing su from the command line, this shell will *not be X enabled*, which means, all commands you do on this shell will do no immediate harm to your display function. That is exactly what we want during the guest additions install. Therefore, I hereby recommend to become root-proper (the command prompt should then be a #) before launching guest additions install script. /EDIT

Guest Additions will then install better video drivers and tools to allow copy/paste and other things between your computer (aka "host") and the virtual machine running inside it.

Reboot and you will have a nice system!

I hope this helps somebody.

To All: Enjoy this great distro!
Merry Christmas.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
tdockery97
Level 14
Level 14
Posts: 5058
Joined: Sun Jan 10, 2010 8:54 am
Location: Mt. Angel, Oregon

Re: HOWTO LMDE as Virtualbox guest

Post by tdockery97 »

Nice tutorial olligod.
Mint Cinnamon 20.1
carltm

Re: HOWTO LMDE as Virtualbox guest

Post by carltm »

Thanks, olligod. I just installed the 32 bit version and thought the same thing.
The one shortcut I noticed is that it is possible to run gparted from a menu
during the partition selection. This would not have been obvious for a newbie.

Have you managed to increase the resolution higher than 1024x768? That's
another thing I wish were a bit more obvious.
carltm

Re: HOWTO LMDE as Virtualbox guest

Post by carltm »

I figured out how to increase the resolution. This example shows how to create a 1440x900 resolution.

Run this to see the current settings. Notice the device (VBOX0) and max resolution (32000x32000) in the command's output.

Code: Select all

xrandr
Run this to generate the Modeline for a 1440x900 display at 60 hertz.

Code: Select all

gtf 1440 900 60
Run this to add the new mode.

Code: Select all

xrandr --newmode "`gtf 1440 900 60 | grep Modeline | sed 's/.*Modeline //'`"
Run this to use the new mode.

Code: Select all

xrandr --output VBOX0 --mode 1440x900_60.00
olligod

Re: HOWTO LMDE as Virtualbox guest

Post by olligod »

carltm wrote:Thanks, olligod. I just installed the 32 bit version and thought the same thing.
The one shortcut I noticed is that it is possible to run gparted from a menu
during the partition selection. This would not have been obvious for a newbie.
Well... there you go, I didn't see it / look for it either (since I launched gparted separately ... so much for the "newbies") ...
carltm wrote: Have you managed to increase the resolution higher than 1024x768? That's
another thing I wish were a bit more obvious.


With the guest additions installed and running inside the guest (after a reboot), you can change the size of the Virtual Machine window at will - and the resolution will resize as well (except during the boot process).
My maximum is 1440x805, which is the physical maximum possible on my laptop minus the task bar of the Desktop of the *host* .


You can keep the Gnome system settings (in the VirtualMachine) open; resize the guest (-window), and see what happens.


On my desktop machine, running dual screen with nominal size, 3200 x something, that works the same way (with other guest-OS at this time). I have not bumped into any resolution limits just yet.

In virtual machines, I've never had to set the resolution manually. This has worked since at least Virtualbox version 3.0
My host-OS in all cases is some derivative of Mint or Ubuntu; guests include everything from Windows to OSX to Mint; They all worked the same way resolution wise;
whether a different *host* makes the resolution topic more compicated - I dunno. Haven't been there.
carltm

Re: HOWTO LMDE as Virtualbox guest

Post by carltm »

One more update...I found that the time was off by 5 hours every time I rebooted. To
fix this, just set the correct time and then run this:

Code: Select all

hwclock --systohw
pythagorean

Re: HOWTO LMDE as Virtualbox guest

Post by pythagorean »

I found that when I installed LDME in a virtual box the size of the vdi expanded to be much larger than even my XP vdi. My Mint vdi is about 4 GB while my LDME vdi is about 8 GB. These are the sizes on the hard drive. So, if you set the original size of vdi at 8 GB you might need to resize you vdi, and here is my little explanation of what to do, which just summarizes the results of googling how to:

http://thomasgarman.wordpress.com/2010/ ... albox-vdi/
olligod

Re: HOWTO LMDE as Virtualbox guest

Post by olligod »

pythagorean wrote:I found that when I installed LDME in a virtual box the size of the vdi expanded to be much larger than even my XP vdi. My Mint vdi is about 4 GB while my LDME vdi is about 8 GB. These are the sizes on the hard drive. So, if you set the original size of vdi at 8 GB you might need to resize you vdi, and here is my little explanation of what to do, which just summarizes the results of googling how to:

http://thomasgarman.wordpress.com/2010/ ... albox-vdi/
Thank you for the information on howto increase VDI size --- BUT why do you have 8GB VDI size from a new LMDE install?
Even including all updates up to today plus language packs for another language plus some browsers and stuff, I get 4,3 GB used space.
VDI File size (seen from the "outside" so to speak) is 5.3 right now (incl swap).
The max. size in my case, as stated in first comment above, is 8 GB incl. swap partition.

Did you set your VDI to "dynamically growing" or to "fixed size", the latter of which sets it to max on disk, right from the beginning?

It does not matter that much EXCEPT - it is not true that LMDE needs 8GB.

Is IS better in that regard, i.e. smaller, than the Windows OSses - especially the newer ones...
Ever done a Win7-64-bit Install ?? :mrgreen:
pythagorean

Re: HOWTO LMDE as Virtualbox guest

Post by pythagorean »

Well, I haven't looked into it too closely so I am not sure why that LMDE vdi ballooned up to 8 GB but it was in the course of updating it that I got the message that the partition was full. I had it set at 8 GB dynamically expanding... The LDME install process seems to work like Fedora in that it automagically creates a HUGE boot partition that takes up half the alotted Hard Disk space.

Compared to Vista Ultimate, it's tiny. I got Windows 7 on a 40 GB partition and I was pretty happy with that. I was just mentioning the resize issue because if you are new and you just click through the installer you are likely going to run into that problem the second or third time you update.
olligod

Re: HOWTO LMDE as Virtualbox guest

Post by olligod »

pythagorean wrote:Well, I haven't looked into it too closely so I am not sure why that LMDE vdi ballooned up to 8 GB but it was in the course of updating it that I got the message that the partition was full.

...
I was just mentioning the resize issue because if you are new and you just click through the installer you are likely going to run into that problem the second or third time you update.

It is probably advisable for those with not-so-much disk space to remove the downloaded packages regularly.... if the system tells you it is going to download 250 MB each time -- they are going to sit somewhere (the packages themselves, after installing them are still there as downloaded)
BUT in this case ...

Code: Select all

sudo apt--get clean
...will help
FBluedevil

Re: HOWTO LMDE as Virtualbox guest

Post by FBluedevil »

Simply want to say many thanks!

I don't think I would have been able to install LMDE on Virtualbox without reading through this post. And that would have been a pity because LMDE appears to be the perfect fit for me.
memilanuk

Re: HOWTO LMDE as Virtualbox guest

Post by memilanuk »

I was fairly surprised... apparently LMDE comes with dkms, build-essential, and the necessary kernel headers already intalled, so nothing to apt-get install before installing the Vbox guest additions? Sweet...
gosa
Level 4
Level 4
Posts: 317
Joined: Mon Nov 01, 2010 5:12 am
Location: Spain

Re: HOWTO LMDE as Virtualbox guest

Post by gosa »

Thanks a lot!

I got a bit worried when I couldn't get VBoxAdditions going as I normally do it... but this thread did the trick.
willie42
Level 7
Level 7
Posts: 1970
Joined: Tue Jun 22, 2010 7:52 pm
Location: Oak Ridge, TN USA

Re: HOWTO LMDE as Virtualbox guest

Post by willie42 »

Very good how too.....very straight forward :D
Comptia A+ Certified Technician
Comptia Network + Certified Technician
You can not have Success without Failures.
olligod

Re: HOWTO LMDE as Virtualbox guest

Post by olligod »

So everybody who benefitted from this must go have a beer with me if they happen to be around the Munich area ... :D
wangsuda

Re: HOWTO LMDE as Virtualbox guest

Post by wangsuda »

You need to be root (or possibly do it as sudo). I launched from the command line as root
CODE: SELECT ALL
sh /media/cdrom0/VBoxLinuxAdditions-amd64.run

Remarks:
(1) if you tried it as sudo, you would have to type "sudo" in front of the actual command.
(2) The "sh" seemed necessary, otherwise there was a file permission issue in my case.
This is a life saver! You are a genius! I searched everywhere for this line of code! Thanks!
olligod

Re: HOWTO LMDE as Virtualbox guest

Post by olligod »

You need to be root (or possibly do it as sudo). I launched from the command line as root

sh /media/cdrom0/VBoxLinuxAdditions-amd64.run

Remarks:
(1) if you tried it as sudo, you would have to type "sudo" in front of the actual command.
(2) The "sh" seemed necessary, otherwise there was a file permission issue in my case.
... just for the records: Since VirtualBox 4.x, there is no distinction btw 32bit and 64bit guest additions.
The command is now:

Code: Select all

sh /media/cdrom0/VBoxLinuxAdditions.run
... for either system.
I have since upgraded Virtualbox from 3.x to 4.x with no problems whatsoever. That (4.0.4) is also the current version offered on the Virtualbox Web site as of today.
Fandangio

Re: HOWTO LMDE as Virtualbox guest

Post by Fandangio »

Great guide, many thanks.
Locked

Return to “LMDE Archive”