I came across VirtualBox awhile back and it’s going to be the perfect program for us here since a good chunk of us use Ubuntu but at times need to test things in Windows or use specific programs that are only accessible in Windows. It takes longer just to restart the computer into Windows than it does to test or use the program we need most of the time, so this will save us some time and be way more convenient.
Before I pushed this out on the next image I needed to find a way to copy the virtual machine I created so that my co-workers could use the same base image file and just configure it the way they want from there. I found this blog that is my source for this information but it’s slightly different since he is using the Windows version of VirtualBox.
To copy the image to another computer:
- Close VirtualBox if it’s running.
- Go to your home folder and enable show hidden files through the View menu.
- Find the .VirtualBox folder, go to the HardDisks folder and copy the .vdi file you want to use. In my case I burned the file to a DVD because we have so many people who will be needing to save this in their home directory.
- Now go to the other host computer you want to use that .vdi file on and open VirtualBox if you’ve never opened it on the new host machine before. This will create the .VirtualBox folder. Then paste it in the same place (user’s home directory -> show hidden files -> .VirtualBox -> HardDisks). You might need to create the HardDisks folder yourself.
- Edit the permissions of the file in order for it to work. All I did was right-click on it after moving the file over and give read & write permissions to the owner, which should have your username there. You can change the permissions to the group and others sections if needed later, but that wasn’t necessary for me.
Once you’ve copied the disk image you need to create a new machine and register that hard disk with VirtualBox on the target host machine:
- From the VirtualBox window click the New button. This will open the New Virtual Machine Wizard.
- VM Name and OS Type – Give it a name and pick the type & version of the virtual machine OS.
- Memory – Just leave it as the default. You can change it later if you notice any problems.
- Virtual Hard Disk – This is where you select the hard disk you copied in to the home directory earlier. So click on existing and when the Virtual Media Manager window comes up choose to Add. It should take you to the correct folder so just select the image file and click open, then select.
- You’re done, it’ll take you back to the main window with the new virtual machine you just created based off the existing image file.
If you notice things running slowly you can shut down the machine, go to settings, and change the base memory allocation. It’ll be screaming at you in red or orange text if you’ve allocated too much.