HOWTO LMDE as Virtualbox guest

Write tutorials here
More tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please, Before you post please read this

HOWTO LMDE as Virtualbox guest

Postby olligod on Fri Dec 24, 2010 9:09 am

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 olligod on Sat Jan 15, 2011 5:21 am, edited 2 times in total.
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Linux Mint is funded by ads and donations.
 

Re: HOWTO LMDE as Virtualbox guest

Postby tdockery97 on Fri Dec 24, 2010 9:16 am

Nice tutorial olligod.
Image

HP Pavilion 17 Notebook, 8GB DDR3, 2.5GHZ A10-APU, Radeon HD 8650G
User avatar
tdockery97
Level 13
Level 13
 
Posts: 4893
Joined: Sun Jan 10, 2010 8:54 am
Location: Salem, Oregon

Re: HOWTO LMDE as Virtualbox guest

Postby carltm on Sun Dec 26, 2010 5:11 am

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
Level 1
Level 1
 
Posts: 4
Joined: Sun Dec 26, 2010 4:58 am

Re: HOWTO LMDE as Virtualbox guest

Postby carltm on Sun Dec 26, 2010 6:11 am

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
carltm
Level 1
Level 1
 
Posts: 4
Joined: Sun Dec 26, 2010 4:58 am

Re: HOWTO LMDE as Virtualbox guest

Postby olligod on Sun Dec 26, 2010 6:51 am

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 Windoze 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.
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Re: HOWTO LMDE as Virtualbox guest

Postby carltm on Sun Dec 26, 2010 8:02 am

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
carltm
Level 1
Level 1
 
Posts: 4
Joined: Sun Dec 26, 2010 4:58 am

Re: HOWTO LMDE as Virtualbox guest

Postby pythagorean on Sun Dec 26, 2010 8:27 am

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/
pythagorean
Level 3
Level 3
 
Posts: 150
Joined: Tue Mar 23, 2010 2:36 am
Location: Chicago

Re: HOWTO LMDE as Virtualbox guest

Postby olligod on Mon Dec 27, 2010 11:41 am

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 windoze OSses - especially the newer ones...
Ever done a Win7-64-bit Install ?? :mrgreen:
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Re: HOWTO LMDE as Virtualbox guest

Postby pythagorean on Mon Dec 27, 2010 4:05 pm

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.
pythagorean
Level 3
Level 3
 
Posts: 150
Joined: Tue Mar 23, 2010 2:36 am
Location: Chicago

Re: HOWTO LMDE as Virtualbox guest

Postby olligod on Sun Jan 02, 2011 12:32 pm

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
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Re: HOWTO LMDE as Virtualbox guest

Postby FBluedevil on Tue Jan 04, 2011 5:00 pm

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.
FBluedevil
Level 1
Level 1
 
Posts: 16
Joined: Tue Jan 04, 2011 4:09 pm

Re: HOWTO LMDE as Virtualbox guest

Postby memilanuk on Sat Jan 08, 2011 6:17 pm

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...
memilanuk
Level 1
Level 1
 
Posts: 31
Joined: Sat Dec 04, 2010 5:27 pm

Re: HOWTO LMDE as Virtualbox guest

Postby gosa on Wed Jan 12, 2011 4:48 pm

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.
gosa
Level 4
Level 4
 
Posts: 304
Joined: Mon Nov 01, 2010 5:12 am
Location: Spain

Re: HOWTO LMDE as Virtualbox guest

Postby willie42 on Wed Jan 12, 2011 8:40 pm

Very good how too.....very straight forward :D
Comptia A+ Certified Technician
Comptia Network + Certified Technician
You can not have Success without Failures.
User avatar
willie42
Level 7
Level 7
 
Posts: 1977
Joined: Tue Jun 22, 2010 7:52 pm
Location: Oak Ridge, TN USA

Re: HOWTO LMDE as Virtualbox guest

Postby olligod on Sat Jan 15, 2011 4:55 am

So everybody who benefitted from this must go have a beer with me if they happen to be around the Munich area ... :D
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Re: HOWTO LMDE as Virtualbox guest

Postby wangsuda on Mon Apr 04, 2011 3:54 am

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!
"I like my software rough." - Brett Larson, ICT instructor
Registered Linux User #487360
User avatar
wangsuda
Level 3
Level 3
 
Posts: 106
Joined: Sun Apr 03, 2011 11:42 pm
Location: Bangkok, TH

Re: HOWTO LMDE as Virtualbox guest

Postby olligod on Thu Apr 21, 2011 4:49 pm

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.
olligod
Level 3
Level 3
 
Posts: 148
Joined: Wed Feb 11, 2009 6:29 am
Location: Munich, Germany

Re: HOWTO LMDE as Virtualbox guest

Postby Fandangio on Mon Sep 05, 2011 1:23 am

Great guide, many thanks.
AMD Phenom (tm) II x4 965 | 4GB DDR3 | NVIDIA GTS 450 4GB DDR3 | ASUS M4A88T-M
User avatar
Fandangio
Level 4
Level 4
 
Posts: 368
Joined: Fri Dec 10, 2010 2:20 am
Location: Manchester, UK

Linux Mint is funded by ads and donations.
 

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests