- dotTech - http://dottech.org -

Virtual Machines, Part Two: Snapshots, guest additions, and shared folders

Posted By Locutus On August 21, 2011 @ 12:20 PM In Tips 'n Tricks | 25 Comments

Now that you’ve gotten either Windows or Ubuntu – or both – installed in VirtualBox [1] it’s time to go further. This article – the second in the series on virtual machines – will teach you how to restoring virtual machines, integrate your mouse (and other guest additions), and even how to create shared folders.

Table of Contents

Taking and restoring Snapshots (Ubuntu and Windows) [2]
Guest Additions (Ubuntu) [3]
Guest Additions (Windows) [4]
Setting up temporary shared folders (Step One, Ubuntu and Windows) [5]
Setting up permanent shared folders (Step One, Ubuntu and Windows) [6]
Accessing shared folders (Ubuntu) [7]
Accessing shared folders (Windows) [8]

Taking and Restoring Snapshots (Ubuntu and Windows)

Snapshots are literally a copy of the virtual machine as it currently is. You can use these to roll back changes, and the virtual operating system will have no idea that anything just happened. To take a snapshot of a virtual machine that is off, open the VirtualBox main window. Click on the operating system that you want to take a snapshot of.

[9]

Click the Snapshots tab.

[10]

Click the button that’s a camera.

[11]

Name it something informative, such as Just Installed or Mess This Up. You can even give it a description.

[12]

Now, the name of your snapshot will appear in the snapshots tab.

[13]

To restore the machine to a snapshot, click the name and then on the little icon with an up arrow.

[14]

Then click Restore. The image will be restored!

VirtualBox guest additions (Ubuntu)

To install the Guest additions- pieces of software such as drivers and things to make integration better- you’ll need to start your VM and log in. Then, from the top menu bar in the VirtualBox window (not in the virtual machine), click Devices>Install Guest Additions.

This will mount an ISO (disc image) that contains the installation files. To install them, you need to use Terminal. To open Terminal, click on Applications>Accessories>Terminal. To get to where the installers are located, type in cd /media/cdrom. Then, type ls to get a list of files. From that list, the file we want is VBoxLinuxAdditions-x86.run, so to get priveges to run it, type “sudo” into the command line, followed by “./VBoxLinuxAdditions-x86.run”.

[15]

Press enter and type in your password. Press enter again.

[16]

Wait a while. This may take some time.

[17]

When it’s done (see above) restart your computer- in the upper right hand corner, click your name and click restart. The computer will restart.

[18]

[19]

Now, you can pass your mouse through one OS to the other. You can also resize the window and even enter full screen and have the virtual machine automatically resize.

Guest Additions (Windows)

Guest additions in Windows are simple and easy.  Start up your virtual machine and from the top menu bar in the VirtualBox window (not in the virtual machine), click Devices>Install Guest Additions.  This will mount an ISO of the installation disc, and from there it’s a regular software install.  Open My Computer, then the disc drive.

[20]

Run through the software install, clicking Next or I Agree to any prompts.  The Unsigned driver window will pop up- just click Continue Anyway.

[21]

Your computer will reboot, and you’ll be able to set up shared folders and use mouse integration!

Setting up  temporary shared folders (Step One, Windows and Ubuntu)

Setting up shared folders is a useful way to transfer files from one operating system to another. To set them up, right click the little folder in the bottom right of the window.

[22]

Click Shared Folders to get a window:

[23]

Then click the little folder in the corner.

[24]

From the dropdown menu, click other.

[25]

This window will pop up. Create a new one or select an existing folder, and click OK.

[26]

For the Folder Name section, it should be automatically filled in with the name of the folder you selected. If you chose a folder with a long name or one with a space, you need to rename it to something WITHOUT A SPACE. Click OK and OK. This will set up a networked drive to the virtual machine. This shared folder will need to be set up every time you start the machine.

Creating Permanent Shared Folders (Step One, Windows and Ubuntu)

To make a shared folder that doesn’t disappear when you turn off thevirtual machine, you have to turn off the virtual machine and open the settings for that machine. Click the Shared Folder area at the bottom left.

[27]

Then click on the new Shared Folder button.

[28]

From there, make a new Shared Folder in the same style as before. Select a folder and name it something without a space. Click OK twice, and then access it using the instructions below.

Accessing Shared Folders (Ubuntu)

To set up the shared connection in Ubuntu, open up Terminal again. Type in sudo mkdir /mnt/[whatyouwantyoursharedfoldertobecalled]. Press enter.

[29]

Type in your password and press enter again. Nothing will appear to have changed. Now, type in sudo mount.vboxsf [nameofsharedfolder] /mnt/[nameyouwantedyoursharedfoldertobecalled].

[30]

Now, when you open up Computer and go to File System, open up mnt. There will be a folder in there called [whatyouwantedyoursharedfoldertobecalled] containing all the files in the folder you’re sharing. You can drag and drop into these folders from both the host and the guest.

Accessing Shared Folders (Windows)

Accessing Shared Folders in Windows seems a lot easier to me.  It may be that I’m used to Windows, but it sure seems a lot simpler. To use them, you’ll need to set up a shared folder all over again- they only are set up for one operating system.  After you have them set up, just open my Network Places from My Computer:

[31]

And click Add a network place under Network Tasks.

[32]

Click next and on “Choose another network location”.  In the box, type \\vboxsvr\[whatyourshareiscalled].

[33]Click “Next”, give it a name, and you’re done!

[34]

Update: Part 3 [35]


Article printed from dotTech: http://dottech.org

URL to article: http://dottech.org/14075/virtual-machines-part-two-snapshots-guest-additions-and-shared-folders/

URLs in this post:

[1] Windows or Ubuntu – or both – installed in VirtualBox: http://dottech.org/tipsntricks/14020

[2] Taking and restoring Snapshots (Ubuntu and Windows): #snapshots

[3] Guest Additions (Ubuntu): #ubuntuguest

[4] Guest Additions (Windows): #windowsguest

[5] Setting up temporary shared folders (Step One, Ubuntu and Windows): #tempshare

[6] Setting up permanent shared folders (Step One, Ubuntu and Windows): #permshare

[7] Accessing shared folders (Ubuntu): #ubuntushare

[8] Accessing shared folders (Windows): #windowsshare

[9] Image: http://dottech.org/wp-content/uploads/2010/01/1.png

[10] Image: http://dottech.org/wp-content/uploads/2010/01/2.png

[11] Image: http://dottech.org/wp-content/uploads/2010/01/3.png

[12] Image: http://dottech.org/wp-content/uploads/2010/01/4.png

[13] Image: http://dottech.org/wp-content/uploads/2010/01/5.png

[14] Image: http://dottech.org/wp-content/uploads/2010/01/6.png

[15] Image: http://dottech.org/wp-content/uploads/2010/01/10.png

[16] Image: http://dottech.org/wp-content/uploads/2010/01/11.png

[17] Image: http://dottech.org/wp-content/uploads/2010/01/12.png

[18] Image: http://dottech.org/wp-content/uploads/2010/01/13.png

[19] Image: http://dottech.org/wp-content/uploads/2010/01/14.png

[20] Image: http://dottech.org/wp-content/uploads/2010/01/121.png

[21] Image: http://dottech.org/wp-content/uploads/2010/01/131.png

[22] Image: http://dottech.org/wp-content/uploads/2010/01/15.png

[23] Image: http://dottech.org/wp-content/uploads/2010/01/16.png

[24] Image: http://dottech.org/wp-content/uploads/2010/01/17.png

[25] Image: http://dottech.org/wp-content/uploads/2010/01/18.png

[26] Image: http://dottech.org/wp-content/uploads/2010/01/19.png

[27] Image: http://dottech.org/wp-content/uploads/2010/01/1new.png

[28] Image: http://dottech.org/wp-content/uploads/2010/01/2new.png

[29] Image: http://dottech.org/wp-content/uploads/2010/01/20.png

[30] Image: http://dottech.org/wp-content/uploads/2010/01/21.png

[31] Image: http://dottech.org/wp-content/uploads/2010/01/151.png

[32] Image: http://dottech.org/wp-content/uploads/2010/01/161.png

[33] Image: http://dottech.org/wp-content/uploads/2010/01/171.png

[34] Image: http://dottech.org/wp-content/uploads/2010/01/181.png

[35] Part 3: http://dottech.org/tipsntricks/14516

© 2008-2012 dotTech.org | All content is the property of its rightful owner.