Run windows in a sandbox - VirtualBox

How to make them do what you want, not to rant on about. Slashdot is better for rants anyway.

Run windows in a sandbox - VirtualBox

Postby fusordoug » Wed Jul 14, 2010 10:03 pm

I'm not real fond of this opsys for things that need reliability, but sometimes Wine won't work and what choice do you have?
Here we use VirtualBox and run windows under a linux host, so almost no matter what weird thing it does, we are fine.
I plan to add some tips for that here -- getting USB to work can be a chore, but it's very do-able, despite taking a little extra time in the dox to get it going.
Then you can have it all.

Some other tips that are in the dox, but not easy to find right off:

Make your user (if your host is linux) a member of the vboxusers group, and things like USB will become available to the guest opsys -- even if they don't work in the host!
This only applies to the one you get from the sun/oracle repository. The best way to get that is to go there and follow their directions to add their respository to synapatic and then use that system to get it installed, as then it will also install guest additions, dkms, and be updated when Oracle releases a new version. The full GPL open source version of Virtual Box doesn't allow USB I/O, so you probably want the one that does.

Do install "guest additions" right away (you do this from the vbox GUI while the guest is running, right after installing the guest) -- a lot of stuff, like screen resolutions in the guest work better that way, and get autodetected by the guest (if it's XP) nicely. And things like audio work better -- you can play things from both the host and the guest at the same time and the host audio interface just mixes the audio -- sweet.

You can only fiddle settings when the guest isn't running, and that's where you go set up USB filters for what you want the guest to see. This way you can control things like the two opsys not fighting over stuff meant for guest only. For example, the main or only reason I run windows here at all is because my arbitary waveform generator, my digital oscilloscopes and my mass spectrometer are windows-only devices, no point in having linux access to them -- no drivers there, or the ones that look like a USB serial port -- they fight over ownership otherwise.
Why guess when you can know? Measure!
User avatar
fusordoug
Site Admin
 
Posts: 46
Joined: Wed Jul 14, 2010 1:59 pm

Re: Virtualbox

Postby Doug Coulter » Thu Aug 12, 2010 10:12 am

A few more things I've learned. Make your new "appliance" in about the crummiest machine you have, or it will be hard to move elsewhere. Or be really careful about defaults. For example, if you make it on a machine that has the virtual extensions hardware and try to move it to another that doesn't - you are out of luck. Changing memory on the fly seems to upset at least windows guests (if going down, anyway). Access to any special hardware is a trick. USB isn't too bad if you set it up by adding the devices while the guest isn't running, then check them as there in the guest. Do install the "guest additions" right away -- a lot of things work better with them in, like having the guest resize its graphics when you resized its window in the host etc. With a windows XP host you may not have some of the issues you do with a linux one -- like linux not letting things write willy nilly on your disk (you have to allow it specifically in linux hosts).

You windows issue with the perl/Tk module could also be solved by just getting the source and compiling it on windows. It's just that the Active State distribution of perl assumes you don't have a compiler, and you get what you get from them -- but you aren't limited as a developer if you know how to compile things.

You can set up shared directories, which seem to show up on the guest as a network place -- this is advised, as it makes some things a lot easier to do. You set up the share in Vbox while the guest isn't running (you'll note you can't get to settings while it is), then go find it in the guest and bookmark it.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA

VirtualBox and DHCP

Postby troy » Thu Aug 12, 2010 11:45 am

Under the default configuration, VBox gives the guest an IP along the lines of 10.0.1.xxx. For many, this really messes with sharing and subnets. After some investigation, it turns out that VBox defaults to using NAT. To adjust the settings for your guest such that it DHCPs from your router, with the guest not running, go to Settings->Network and change the drop-down from "NAT" to "Bridged Adapter". Now, your guest will get its IP from your DHCP server.

I got this tidbit (and an alternate way to do this) from here: http://r3dux.org/2009/09/how-to-make-vi ... -in-linux/
troy
 
Posts: 3
Joined: Thu Jul 15, 2010 9:31 am

Re: Run windows in a sandbox - VirtualBox

Postby Doug Coulter » Sat Jan 01, 2011 8:01 pm

Thanks Troy. Since it's so important, here's the download page with the info on how to add the "more real" version to your synaptic repository in Ubuntu. Doing it this way puts it "in the system" so you get updates automatically. The "GPL" version doesn't do USB, so isn't worth it for most people, you need these binaries. Get them while they are hot, as since Oracle bought Sun, and is now suing the world over eye-pee - this may go away soon. They are not known to be nice about free stuff. I'd have to ditto MySql on that as well. No telling what they are going to do with the open source stuff they acquired, but given their track record....I'd be a little worried.

Download page.
Posting as just me, not as the forum owner. Everything I say is "in my opinion" and YMMV -- which should go for everyone without saying.
User avatar
Doug Coulter
 
Posts: 3515
Joined: Wed Jul 14, 2010 7:05 pm
Location: Floyd county, VA, USA


Return to Operating systems

Who is online

Users browsing this forum: No registered users and 2 guests

cron