AidanMontareDotNet

You are on the old part of aidanmontare.net, which I am no longer maintaining. Newer versions of some of this content can be found on the active part of my site, which you can reach from my homepage.

VirtualBox

(last updated

Secure Web Browsing with VirtualBox

1. Don’t use Internet Explorer!

So starts most advice on secure web browsing. But since I tend to do a lot of browsing all over the internet, I wanted to be extra careful.

So using VirtualBox, I created a Ubuntu VM specifically for general web browsing. After I configured the VM and installed the VirtualBox guest additions, I created a snapshot of the VM state. When I am done browsing, I reset the VM to this snapshot. This way, anything that managed to hack my VM would be lost between browsing sessions.

When Ubuntu alerts me that there are new package updates, I finish the browsing I am doing, revert to the snapshot I saved, update the packages, and save a new snapshot. Thus, even after updates, the VM is as if it had just been installed.

Note: I use the shared clipboard to copy and paste links that I need to save for future access. However, the way I work, most of my tabs are research on a specific topic and I never need to see them again once I am done.

Browsing to Sites I Trust

I have another VM, similar to the one above, that I don’t reset after each session. This one only ever accesses sites that I trust. Those are either sites that I must login to, or places where I want to download files. This VM, unlike the other one, has shared folders enabled, so I can move files I download back and forth. However, I usually scan everything I download with the VirusTotal online antivirus scanner to keep my computer safe. And if the distributor gives checksums or GPG keys (get mine), I check those too (I wish all software had these).

Telling All Those VMs Apart

Since I do a lot of my working inside virtual machines, it becomes difficult to see which system I am typing in. Thus I recommend opening your desktop environment’s settings in each VM and picking a different color scheme for each VM so you can tell them apart.

Managing Passwords

It can quickly become a mess to have to keep track of all the passwords for your virtual machines. To keep yourself sane (and make it easy to use strong passwords), I recommend using the KeePass Password Manager.

Unfortunately, the KeePass 2 series does not work with VirtualBox, so make sure to download the most recent 1.X version. The KeePass developers are aware of the substantial differences between the versions, and will continue to support both for a long time.

Warning

Do not try to save the state of a VirtualBox VM and try to close KeePass while VirtualBox is working. For whatever reason, this causes VirtualBox to stall and refuse to finish saving the VM state to disk. Your only option will be to kill the VirtualBox process and then boot the VM again. This can lead to lost work.

Dummy Password

You may find that even when using KeePass 1.X, the first time you try to auto-type a password after unlocking KeePass always seems to fail. This is a rather strange problem, but to fix it, simply create a dummy password and auto-type it into nothingness (or NotePad, or whatever) before trying to use KeePass to enter your real passwords. Doing this helps reduce the chances of your real passwords being kept by whatever KeePass sent its mistypes into (computers accidentally keeping passwords in system files is actually a major problem with most operating systems).

Bugs and Things To Know

Not everything always works so great with virtualbox. Be warned.

Nice Seamless Mode

Seamless mode makes it less awkward to have several virtual machines running at once. However, not all Linux desktop environments seem to work well with seamless mode (notably Unity, the default desktop environment of Ubuntu). Here are the ones I know of:

  • KDE
  • Gnome
  • LXDE

I currently use KDE or LXDE for all of my Linux VMs. You can even resize the task bar in order to fit several of them on a single screen (I use this to switch between my different browsing and work VMs).

Ubuntu Guest Has a Tiny Window Size

With an Ubuntu 14.10 Guest, installing virtualbox-guest-dkms and restarting should fix your problems.
one of the people who gave this solution

Shared Clipboard Stops Working

Annoying, but it occasionally happens. Run the following in the guest to fix the problem:
pkill VBoxClient ; VBoxClient --display ; VBoxClient --seamless ; VBoxClient --clipboard
Your mileage may vary. Sometimes the shared clipboard works for days on end, then it will break and need to be reset with the above every time you try to copy something.

Shared Folders Don’t Mount

Automatic mounting of shared folders does not always work. You can mount them manually using sudo mount [location], replacing [location] with the path of your shared folder (generally /media/sf_[something]). If this does not work, try mounting the folder as described in the VirtualBox manual: sudo mount -t vboxsf [sharename] [location], with [sharename] generally being the same as [location] but without the sf_.

Crashes After Loading a Saved Machine

VirtualBox has the handy feature of saving a VM to a snapshot, effectively pausing the machine. You can reload this snapshot at a later time (even after rebooting the host) and pick up exactly where you left of.
Sometimes this doesn’t work. VirtualBox appears to be reloading the VM, but when it should be finished, it instead gives an error like this:

The instruction at [location] referenced memory at 0x00000000. The memory could not be read.
Click OK to terminate the program.

Very frustrating.

Reports of Similar Errors in the Wild

https://www.virtualbox.org/ticket/13379
https://www.virtualbox.org/ticket/13837
https://www.virtualbox.org/ticket/14430
https://www.virtualbox.org/ticket/14363
https://forums.virtualbox.org/viewtopic.php?f=6&t=5785&start=0
https://forums.virtualbox.org/viewtopic.php?f=2&t=64853
https://ubuntuforums.org/showthread.php?t=959367&p=6037218&mode=linear#post6037218
https://ubuntuforums.org/showthread.php?p=6036989&mode=threaded

Fix “Instruction at referenced memory could not be read”


https://superuser.com/questions/697241/oracle-vm-virtualbox-instruction-at-0x806d58e2-referenced-memory-at-0x00000000