Advice for using virtualbox on a *new* system

This is for discussing general topics about how to use VirtualBox.
Post Reply
kmicinski
Posts: 5
Joined: 2. Aug 2010, 03:03
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Not sure yet

Advice for using virtualbox on a *new* system

Post by kmicinski »

Hey all. I've looked around a bit but haven't been able to find the answers to all of these questions in one place.

I recently put in an order for parts and I'm building a new machine with a 500gb hd, 6 GB ram, and a 6 core Phenom II x6 Processor (planning to overclock it to a little over 3.0-3.2 Ghz).

I'm an open source developer (well.... I soon will be again after ending a short job with MS for the summer, haha...) and usually use Linux as my main runtime environment.

Buuut I have copies of windows 7 and vs2010, etc... which I'd also like to run, just because some of the things I work on for school and related require things like the CLI and .NET stuff.

Ideally, I want to run Windows, Snow Leopard (I *know* this isn't standard! But I've heard it can be done, advice? Hints? I've read tutorials so I know people have done it before, but I'm not completely sold yet), and Linux side by side.

I'm not sure which I will be using the most day to day, and would like the ability to be able to switch in between all of them fairly easily (the AMD chip does have AMD-V hardware virtualization with shadow page tables, so I think in theory this should run near natively, but I haven't tried before too much).

My questions are:
1) What do you reccomend as the host operating system between Windows and Linux:
Aside from the ethical concerns, where I could see you would be more inclined to run Linux host and Windows Guest. Performance wise is there more significant performance difference on windows guest running linux host or linux guest running windows host?
2) A litte on the advice for snow leopard, is this something I should think is possible? Or should I count it only as a slight "possibility" with enough tweaking (I'm a EE, and so tweaking isn't out of the question, but if it's almost impossible I'd like to know)?
3) How do dual monitors work on virtualbox. I've read:
http://forums.virtualbox.org/viewtopic.php?p=23604
But I'm interested to know if other people have had good experience. Perhaps running virtualbox in windows host would make it easier to use dual monitors (don't know why I think this, but windows is a little bit more standard than the many many Xorg and Xservers out there, I suppose that's why?)??? I am absolutely excited to have my dual monitor support with new desktop, and this was actually one of the reasons I got my desktop. I'm running both monitors off the same card (integrated chipset, but I don't do any graphics work, *other* than just playing movies. However, I do like to be able to have some prettiness going on, for example, I usually run development builds of Enlightenment 17 as a desktop shell in Linux, but I'm switching over to XMonad, buut, I digress.)


I spose that's all for now.

Just to recap:
1) I bought a new machine
2) I'm looking to run Linux (probably primary), Windows, and Snow Leopard all
3) Trying to pick a host (getting OSX to run on arbitrary hardware is difficult :(, so that's out)
4) Wondering performance of other two based using each host
5) Wondering about dual monitor support

Thanks!
-- Kris

EDIT: I've given up on the mac idea just because of the legal and hardware issues, so you can disregard that.
Last edited by kmicinski on 2. Aug 2010, 21:55, edited 1 time in total.
dmcgraw
Volunteer
Posts: 808
Joined: 24. Jun 2008, 17:16
Primary OS: Ubuntu 8.10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP, Ubuntu 9.10
Location: St. Louis, MO, USA

Re: Advice for using virtualbox on a *new* system

Post by dmcgraw »

kmicinski wrote:2) A litte on the advice for snow leopard, is this something I should think is possible? Or should I count it only as a slight "possibility" with enough tweaking (I'm a EE, and so tweaking isn't out of the question, but if it's almost impossible I'd like to know)?
This is not supported or discussed here.
kmicinski
Posts: 5
Joined: 2. Aug 2010, 03:03
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Not sure yet

Re: Advice for using virtualbox on a *new* system

Post by kmicinski »

dmcgraw wrote:
kmicinski wrote:2) A litte on the advice for snow leopard, is this something I should think is possible? Or should I count it only as a slight "possibility" with enough tweaking (I'm a EE, and so tweaking isn't out of the question, but if it's almost impossible I'd like to know)?
This is not supported or discussed here.
Please don't just blow me off because I mentioned this issue. I simply saw that Virtualbox had an option to virtualize OS X as one of it's runtimes in the dialog box. If the intent was *not* to discuss it or squash comments on the topic, I would have assumed it would not be supported in their software. It is never my intent to pirate any software, and after reading that this is unauthorized by the apple's runtime EULA I am willing to drop that want.

But my question still stands: will it be better to virtualize linux on windows, or windows on linux? Will there be any noticable performance or configuration differences between the two, what should I use in making my decision.
fuUser
Posts: 14
Joined: 17. Jun 2009, 22:13
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP SP3

Re: Advice for using virtualbox on a *new* system

Post by fuUser »

The performance between different Host OS's is almost not existent. You should always choose a 64 Bit OS.

You should consider what you can't do in a Guest, which is inconvenient in a Guest OS, or what benefit an virtual OS can provide compared to a "real" one.
Also whatever you choose, there is nothing which prevents you to have the same OS as an VM.
Some examples I encountered:

a) 3D & entertainment - no matter how fare we have come lately, anything involving 3D graphics works far better directly on the host. Even though you can watch and listen to "media" in guests it is far more convenient to do it on the host. This is especially true for "protected" digital outputs (HDMI), surround audio and HD content in general.
If you plan on playing any game, use Itunes, or watch HD content choose Windows.

b) Immutable images & easy deployment - The option to reset the guest OS HDD on power up (which is somewhat broken in VBox atm) and the ability to simply copy virtual HDDs comes in very handy, if you need to get a new "clean" system up and running. And as a programmer you know you do :) . Crashing the kernel is also better be done in guests. You can also use it for security reasons. I run a virtual machine just for Microsoft Office. It has an immutable disk and combined with installing all the windows and office updates and Microsofts AV its almost safe to use!

c) Your very own productivity in the host OS - When programming I am more productive in an UNIX environment. Although it is possible to develop in guests (which I do when it has to be Java EE or ASP.Net *stuff*), I find it less hassle to develop on the host and only test and debug in guests.

On my desktop I run Windows and host multiple Guest OS's, because I play some games once in a while - On my notebook I run Fedora Linux and the same guests as on the desktop.
Guest are Windows 7 32 bit, 7 64 bit, XP, Debian 5, Fedora 13, CentOS 4 and the "other OS".
When I develop software I usually do it directly on the notebook, which is more productive, even though the machine is much slower (Core2Quad 2,7 vs Core2Duo 1,8; both 8 GB RAM: both connected to same screen/keyboard etc). The typical try-and-error-tests are performed on the host as well, but when I get some milestone I test it on the guest machines.

I have not tested a multi monitor setup jet. I don't need that for testing and debugging. For programming its very handy, but I do that on the hosts.

Hope this helps.
kmicinski
Posts: 5
Joined: 2. Aug 2010, 03:03
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Not sure yet

Re: Advice for using virtualbox on a *new* system

Post by kmicinski »

Thanks a lot for the advice. As I really do care almost nothing about video I will probably stick to linux as my main host. I have heard Windows "does not like" to be virtualized. Not saying that MS made it intentionally (they don't have enough coders here to do that on "purpose" :) hard, but just that the way the system is designed some parts are not too great. I do plan to do a lot of development of Linux, and also plan to do enough on Windows to perhaps justify the following scenario:

1) Windows and Linux dual boot, where I switch between them using hibernate / reboot (I like to be able to switch between the two in perhaps 40 seconds, maybe a minutes). The main reason to do this is not immediate switching (such as writing apps on windows and then testing on linux, I don't do that too often) but for "saving" my session as I usually fairly long uptimes.
2) Virtualize the additional OSs I wish to run: for example, I want to experiment with BSD and a few other kernels. Is it possible to boot an arbitrary kernel off a virtual system? For example, is it possible to build an arbitrary linux kernel and run it on VB, how about random kernels such as Coyotos or the Hurd (this is probably answered elsewhere so don't feel obligated, but I thought I might throw it out there, I'm pretty sure the answer is no)?

This is helpful, thanks.

Kris
fuUser
Posts: 14
Joined: 17. Jun 2009, 22:13
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP SP3

Re: Advice for using virtualbox on a *new* system

Post by fuUser »

I don't really see how Windows behaves any different in a VM compared to some other OS in a VM. The only real hassle is the Windows activation if you move the VM HDD around, but there is a workaround for that (see Windows as a Guest SubForum). Otherwise it is fine.

I found that Dual Boot never really works. I don't think you can use hibernate and then switch the OS. In my experience I just stopped dual booting at some point. No point in closing all applications shutdown, restart, forgetting to select the other OS, restarting again, booting the right OS, forgetting something you have no access to, rebooting... etc when you can just boot it virtualized.

And yes, you can run almost anything in a VM. The only drawback in an unsupported OS is the missing Guest Extensions. This results in poor graphics performance (even poor 2D, not every resolution works), no easy file sharing between host and guest and no mouse keyboard integration. For some simple testing it is usable, but if you want working with them full time you most likely have to stick to the supported OS's.

New/custom Kernels in supported OS are no problem. You maybe have to reinstall the Guest Extensions, but that's it.
kmicinski
Posts: 5
Joined: 2. Aug 2010, 03:03
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Not sure yet

Re: Advice for using virtualbox on a *new* system

Post by kmicinski »

fuUser wrote: I found that Dual Boot never really works. I don't think you can use hibernate and then switch the OS. In my experience I just stopped dual booting at some point. No point in closing all applications shutdown, restart, forgetting to select the other OS, restarting again, booting the right OS, forgetting something you have no access to, rebooting... etc when you can just boot it virtualized.
This is my point. Sorry, that wasn't so much of a question, as we do dual boot and switch via hibernation at work as to not lose all of our work. But I still agree virtualization maybe be a better alternative. The main I reason I would like to do this is that I do some pretty heavy compilation jobs (commonly compiling something like the linux kernel, GCC, Clang, or LLVM) and don't want to have a lot of Windows OS using up RAM in the background if I didn't have to. But at least I'll try it out first before deciding what to do.

I'm not sure what you mean by new/custom kernels in a supported OS. Perhaps this means, for example, that I could run a new kernel (for example, the Hurd has a Debian version) in a distribution such as Ubuntu? Typically for experimenting with OSs, the goal wouldn't really be to actually do sound or video work, but rather testing so you didn't have to risk another machine / keep a test machine around.
joseph1962smith
Posts: 25
Joined: 16. Oct 2009, 21:27
Primary OS: openSUSE
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: openSUSE, Red Hat, CentOS, Solaris, Windows XP, Windows 7, Ubuntu, Mandriva

Re: Advice for using virtualbox on a *new* system

Post by joseph1962smith »

I agree that the performance between different Host OS's is almost not existent. What does need to be considered (regardless of your choice of Host OS) is what overhead additional services on the host imposes on the overall use of system resources.

If your intent is to squeeze every ounce of processing power out of your available resources, one of your goals should be in minimizing unnecessary services/applications/operations your host might perform. If not ... your host's uses of resources will reduce the overall availability of resources to your guest systems.

You state your wish to 'switch between them fairly easily' which I take to imply you would like to have each of your guest OS's running concurrently. Something as simple for example as locating your VDI's (if that's what you are using) on separate physical HDs can reduce hardware overhead of the drive-head seeking all over creation for VMs that are disk I/O bound.

I currently run VirtualBox instances on Windows Hosts, Linux Hosts (openSuse 11.1) and Mac OS X (snow leopard) hosts.

In my experience, I have found it easier to minimize the number of extraneous services that run on Linux based host environments than on Windows based and Mac based host environments.
fuUser
Posts: 14
Joined: 17. Jun 2009, 22:13
Primary OS: Fedora other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP SP3

Re: Advice for using virtualbox on a *new* system

Post by fuUser »

kmicinski wrote: I'm not sure what you mean by new/custom kernels in a supported OS. Perhaps this means, for example, that I could run a new kernel (for example, the Hurd has a Debian version) in a distribution such as Ubuntu?
I mean installing some well supported Linux Distribution like Fedora or Ubuntu which ship with... lets say Kernel 2.6.32.x and updating it to the latest and greatest Kernel Release Candidate.

I don't see much benefit for dual booting when you only want to do "heavy compilation jobs". The only thing you really loose is RAM and its not like you see much difference between 4 GB and 8 GB while compiling the kernel. At work we (sometimes) compile really huge binaries (one single 1,5 GB executable [with debugging symbols]) and while compiling the machines never use more than around 4 GB. Also RAM is so cheap these days.
I would try first, if it is worth the effort of rebooting.

If you are concerned about the "burden" of the host i would suggest using a bare metal hypervisor.
kmicinski
Posts: 5
Joined: 2. Aug 2010, 03:03
Primary OS: Debian Lenny
VBox Version: OSE other
Guest OSses: Not sure yet

Re: Advice for using virtualbox on a *new* system

Post by kmicinski »

Thanks a lot for the advice. This is exactly what I mean. I want to be able to take Fedora / Ubuntu and switch to the latest kernels. I also like compiling a lot of stuff "by hand."

After I've thought about it for a while, I think I'm going to go with running linux as a main distrobution and then virtualizing windows on top of that. I just wanted to be able to build my own kernel, etc...

So I'll plan on this and go from there.
Post Reply