1

I am currently running Windows 7, and am attempting to set up an Ubuntu installation in VirtualBox. The purpose of my installation is educational - I would very much like to "learn" linux.

Unfortunately, I am encountering various problems with the installation that I'm finding hard to pin down. I have tried to look for similar threads with solutions, but as I understand very little of what is going on it's hard to know what is relevant. I would very much appreciate a guiding hand to point me to things that I should know, and make sure I'm doing nothing "wrong".

Story so far:

  • First (naive) attempt to install - successful, but extremely slow (installed overnight). There was an extreme lag problem (all programs, and mouse input were lagging). The lag problem was fixed by switching the "Enable IO APIC" option to ON. At this point, Ubuntu was running, and seemed fully functional. However, since I had only allocated 8Gb of disk space I very quickly ran out (I immediately attempted to install full TeX support, which is quite space-hungry!). The internet made increasing disk space look like a particularly nasty chore, so I decided the easiest way would be to do a full reinstall, with 40Gb space. I deleted the functional Virtual Machine, not expecting any problems with a reinstall (retrospectively a mistake).

  • Several unsuccessful attempts. According to all internet sources, my Linux install should take around 40 minutes. However, the installation keeps getting stuck at different points, for hours (each time, I waited up to ~5 hours before closing and trying again). For example, one time it was stuck at something that sounded like "post-installation trigger software-center", and my current attempt is stuck at "configuring hardware".

  • After each new attempt, I must delete the partition and allocate a new, clean one, else the install hangs immediately, a couple of screens after the initial "install" button. I systematically enable the IO APIC option, otherwise the installation proceeds extremely slowly, as before.

A couple of things I have noticed, and don't understand/am worried about

  • Only 12Mb of "Video Memory" have been allocated. I'm not sure whether this is the same thing, but my host OS has access to 1Gb dedicated Video RAM.

  • After deleting partitions, the free space does not seem to be recognised by my host OS. (In Windows Explorer, the free space displayed next to my C: drive decreases by 2Gb after each attempt). Perhaps this problem will solve itself? (I believe Windows 7 schedules automatic defragmentation).

Specs/Relevant information

Ubuntu version: 12.10
VirtualBox version: 4.2.6
Host OS: Windows 7 Home Edition (Service Pack 1)
Hardware: Aspire 5755G laptop,
6GB RAM (1GB allocated to guest OS)
500GB HDD (40GB allocated during unsuccessful attempts)
Intel Core i7-2670QM, 2.2GHz
NVIDIA GeForce GT630M, 1GB Dedi VRAM

Thank you in advance for your valuable time! Please don't hesitate to ask for additional information.

JoshP
  • 13
  • 1
  • 1
  • 3
  • See our guide here or read the Virtual Box Manual for more details. If you want to learn Ubuntu, let me recommend you install 12.04 LTS (which is better supported from Virtual Box). – Takkat Feb 21 '13 at 20:43
  • I'll try 12.04 and see if it works any better. Thank you! – JoshP Feb 21 '13 at 21:33
  • You may also find these Q&A helpful: http://askubuntu.com/questions/256792/how-do-i-enable-hardware-virtualization-technology-vt-x-for-use-in-virtualbox and http://askubuntu.com/questions/33649/guest-has-mini-freezes-on-virtual-box. In addition updating ubuntu after installation can solve issues. – Takkat Feb 22 '13 at 07:09

1 Answers1

1

VirtualBox creates a file on your Host OS within which VMs are installed. The Guest OS (Ubuntu in this case) thinks it has a hard drive, but in reality it's just accessing that large file.

With VirtualBox, you have a choice of formats for this file, but you'll usually use the VDI file format unless you've a good reason not to. The default setting is for VirtualBox to expand the file as necessary up to its maximum permitted size.

If significant additional space is being used after each installation, I think you may be doing one of two things.

  1. You may be creating new VDI files for each installation without removing the old ones. Please check the Virtual Media Manager and delete any VM images you no longer require.
  2. You may be using the same VDI image for each installation. I don't know how this will play out with the automatic image expansion in terms of reclaiming space. I would advise that you delete the image and create a fresh one.

"Reinstalls" from the same media should work in the same manner as before. If you're having trouble, just start over with a fresh VM container and disk image (i.e., create a new VM rather than overwrite an old one). Make sure any data you need is backed up.

With regard to the paltry 12Mb of VRAM; I also recently installed 12.10 on a Win7 box (I think it took ~ 30 minutes), and chose to "go wild" and increase it to 25Mb. I think the most you can assign is 256Mb. You can happily try increasing it to this level. This setting can always be adjusted later.

Note that you may also want to enable 3D acceleration (which should improve performance), and also install Guest Additions, which besides other things gives you VM window resizing.

Unfortunately, Unity is quite heavy on graphics requirements out-of-the-box. You may choose to install a different desktop environment, such as XFCE, Cinnamon, MATE etc, in order to improve the VM's responsiveness. Note that there are alternative distributions which come with these by default, such as Mint, which uses Cinammon. I'm by no means trying to dissuade you from using Ubuntu, but I merely highlight that there is a large ecosystem of software available for the whole hardware spectrum.

Finally, 1GB is a reasonably conservative amount of RAM for an Ubuntu+Unity installation. You may find that better performance is achieved with 1.5-2GB, although you'll obviously have to determine whether you can spare it from the Host OS.

  • Lubuntu would be the lightest distribution for a VM (just saying because it was not mentioned). – Takkat Feb 21 '13 at 20:35
  • Thank you for your response, and in particular for the link to the Virtual Media Manager, which answers my concerns about disk space very neatly. I will experiment with tweaking the various parameters that you have highlighted, and perhaps venture into a couple of other distributions, if Ubuntu proves hopeless. Please forgive me if I do not accept your answer straight away, as I found your comment very useful, and am intrigued as to what else people might have to say! – JoshP Feb 21 '13 at 21:19