PDA

View Full Version : Teach me about virtualization


MRD
09-01-07, 05:26 PM
Ok, I've never done this before, but thought it might be fun to try. I have a few questions about it.

First, what's the best app for virtualization? I know of Qemu, but that won't compile on my box (gcc 4.1.1 won't compile it supposedly). I could hack something with gcc 3.x, but I'd rather not. Are there alternatives, or should I try to make it work? Or even get a binary package and install it?

Second, what does it run virtualized? Can I make it boot another partition or drive on my system and run that, or does it need a file containing a disk image? For example, say I want to virtualize win 2k in Gentoo, can I just point it to my Win 2K partition, or do I need to set aside space inside my Gentoo partition?

thideras
09-01-07, 05:29 PM
/subscribed

I want to know the answer too :D

Shelnutt2
09-01-07, 07:47 PM
You have two options (assuming you want FOSSware..which is all I care about)

Xen and then QEMU+KVM.

Right now Xen is still the better choice, although it requires you to use a different kernel.

Xen allows you to do anything, full and paravirtulization.

Running your win2k partition from gentoo is possible. Thats it. Its possible. I don't think anyone has done it yet, its way too big of a hassle. In order to do it, you'd have to set windows up with two separate driver configurations. 1 for the real deal, and one for when your running it virtualized.

I've run xen before when I was running debian. I followed a few guides, which I'll go grab the links to, but gentoo is different, as I'm not sure if the tools are in portage. I ran windows XP inside xen. It was native speed, and acted just like windows. The only thing is there is no 3d acceleration.

I had a discussion on the xen dev maillist and it came down to that for 3d acceleration someone either had to write a completely new graphic driver for both windows and xen kernel in order, or the GFx needed to get mimo..i.e. virtulization support...which thanks to directx10 was suppose to happen..unfortunately Nvidia skipped out and the 8x00 series doesn't have it. Now its no longer required for dx10...but the ati 2x00 series has virtulization. I have not been reading the xen maillist for a while, so I don't know if anything has been done with the new ATI cards..but seeing the lack of support for the card in linux, I doubt xen has added support for it.

So besides 3d acceleration you can do almost anything in a virtualized windows. I never could get the internet to work, but that was because I can't seem to set up a network/mac bridge in linux.

DomainO = Host OS
DomainU = Guest (virtualized) OS

Guides I followed:
http://wolfgang.lonien.de/?p=79
http://www.xensource.com/files/xen_install_windows.pdf


http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo
http://www.gentoo.org/doc/en/xen-guide.xml

telexen
09-01-07, 11:02 PM
VMWare can boot existing drives

There's also VirtualBox, which is open source. It's very similar to VMWare, but not as feature rich...and I don't think it had support for booting from existing drives. No USB support either.

MRD
09-01-07, 11:13 PM
VMWare is commercial/proprietary?

telexen
09-01-07, 11:44 PM
it is a commercial product, unfortunately. Licenses are about $200

MRD
09-01-07, 11:56 PM
Ok, so I guess virtualization is currently not going to do what I want. I need to wait for qemu or xen to get to the point where one of them can boot a drive. I also want 3d acceleration.

ihrsetrdr
09-02-07, 12:06 AM
You can get VMware Server (http://info.vmware.com/content/GLP_VMwareServer?urlcode=AMER_Google_Proliferation _Server&src=PaidSearch_07Q3_VMW_Google_AMER_Google_Prolife ration_Server&ossrc=PaidSearch_07Q3_VMW_Google_AMER_Google_Proli feration_Server&gclid=CMODqPb_o44CFREhggod3GbSYg) for free.

telexen
09-02-07, 12:10 AM
Ok, so I guess virtualization is currently not going to do what I want. I need to wait for qemu or xen to get to the point where one of them can boot a drive. I also want 3d acceleration.

In the future, Xen will be the best bet for that...though not necessarily for Windows. MS seems pretty set against the idea of running native Windows with full virtualization directly from another OS.

And VMServer is free ... it will allow you to boot pre-installed guest OS's ready to boot (some light distros offer such downloads), but not install them. Not what you want.

Neuromancer
09-02-07, 12:15 AM
In the future, Xen will be the best bet for that...though not necessarily for Windows. MS seems pretty set against the idea of running native Windows with full virtualization directly from another OS.

And VMServer is free ... it will allow you to boot pre-installed guest OS's ready to boot (some light distros offer such downloads), but not install them. Not what you want.

Ist that what vanderpool and the other thing where supposed to do? Make virtualizational completely hardware level so that the guest OS had no idea? Do they not do that? Or is it thatthe software does not take advantage of hte virtualization yet?

subscribed..

telexen
09-02-07, 12:23 AM
Ist that what vanderpool and the other thing where supposed to do? Make virtualizational completely hardware level so that the guest OS had no idea? Do they not do that? Or is it thatthe software does not take advantage of hte virtualization yet?

subscribed..

Definitely for the CPU, but I never researched it enough to know if ALL hardware (meaning specifically video/audio devices) do as well. My assumption is it would take similar instructions in those devices.

However, even with the the CPU - my understanding is that Windows doesn't work as a guest like that with Xen. I'm sure I've also read articles that they've intentionally disabled the possibility of it in Vista (maybe just 3rd party - you know MS). There are plenty of other OS's (linux,bsd,others) that do take advantage of these CPU instruction sets and will perform at very near native speeds as a guest OS.

Shelnutt2
09-02-07, 07:52 AM
Definitely for the CPU, but I never researched it enough to know if ALL hardware (meaning specifically video/audio devices) do as well. My assumption is it would take similar instructions in those devices.

However, even with the the CPU - my understanding is that Windows doesn't work as a guest like that with Xen. I'm sure I've also read articles that they've intentionally disabled the possibility of it in Vista (maybe just 3rd party - you know MS). There are plenty of other OS's (linux,bsd,others) that do take advantage of these CPU instruction sets and will perform at very near native speeds as a guest OS.

You are correct, only the CPU takes advantage of the vanderpool, other devices, do not and really can't until a version is rolled out for them.

MDR, what you want, can happen. You can boot windows from your existing partition, I'll go see if I can pull up the discussions on it, its just not point and click..but being a gentoo user I don't think that matters much to you does it?

3D acceleration is not to far in the future, but its still in the future. If your willing to get a new ATI card, and start hacking, you might be able to get it to work, I don't know..




!!!!!!!!!!!!!!!!!!!!!!!!!!!!
http://www.cs.toronto.edu/~andreslc/xen-gl/


:D:D:soda:

OK its only openGL and its not as good as native speed, but still. There is limited 3d acceleration.

MRD
09-02-07, 01:59 PM
It would have to be nvidia, I don't buy ATI and won't until their linux support improves.

Shelnutt2
09-02-07, 02:11 PM
It would have to be nvidia, I don't buy ATI and won't until their linux support improves.

improve support..and actually support the R600 cards..I mean since may the cards have been out an nooo drivers still..just like with the R500..

MRD
09-02-07, 05:53 PM
Yeah, if it's possible, ATI's linux support may actually be getting worse.

Misfit138
09-02-07, 06:12 PM
Yeah, if it's possible, ATI's linux support may actually be getting worse.

What a shame. I really liked ATI, and preferred them over nVIDIA before I started using Linux. (One of the reasons I was slow in adapting to Linux was my distaste for the poor driver support which I mistakenly attributed to poor quality on the part of distros.)
I really like AMD and prefer it to Intel, I just wish AMD/ATI/whomever would get on board with some better driver support.

TimP
09-02-07, 08:16 PM
Right now VMware Fusion on OS X is the only product that has usable 3D acceleration in VMs.

MRD
09-02-07, 08:20 PM
MS seems pretty set against the idea of running native Windows with full virtualization directly from another OS.

As far as legality, I should be fine with Win 2K I think... They can't go back and retroactively change the EULA I agreed to when I first installed Win 2K, and there's nothing in it about virtualization (there was no virtualization back then). However, they may make it against the EULA for newer versions of Windows like Vista, and they may try to make it harder to virtualize the newer versions.

What a shame. I really liked ATI, and preferred them over nVIDIA before I started using Linux. (One of the reasons I was slow in adapting to Linux was my distaste for the poor driver support which I mistakenly attributed to poor quality on the part of distros.)
I really like AMD and prefer it to Intel, I just wish AMD/ATI/whomever would get on board with some better driver support.

I was always an nvidia fan, since my first geforce 2 gts back in 2000. I bought one ATI one time (actually it was a gift from my parents), hated it, and returned it, and then bought an nvidia.

I'm an AMD fan as well, and since those two are now merged, it's rather hard to get AMD/nvidia laptops and such. I still love AMD, but I won't touch ATI until they really get their act together with regards to linux.

th3
09-03-07, 02:20 PM
Right now VMware Fusion on OS X is the only product that has usable 3D acceleration in VMs.

Theres an experimental driver also for VMWare Workstation, can run OpenGL and DirectX8.1. Without DX9 support its pretty useless to me, only briefly tested it and confirmed it works as it should. Works but useless, thats about all there is to it =) Is the Fusion driver DX9 compatible?

!!!!!!!!!!!!!!!!!!!!!!!!!!!!
http://www.cs.toronto.edu/~andreslc/xen-gl/
That one is actually performing very well i heard, but being limited to running OpenGL on a Linux guest on a Linux host it doesnt do much good for anyone who isnt programming/debugging Linux OpenGL apps.

Captain Newbie
09-04-07, 11:44 AM
it is a commercial product, unfortunately. Licenses are about $200

VMWare Fusion is good and cheap, but you have to have a shiny, expensive Macintosh on which to run it :( Fusion successfully boots a Boot Camp partition, uses VTX, runs DX8 applications, and lots of other cool stuff. (The cards in most recent Macs can handle DX9, if I recall correctly — so DX9 support might not be far off, although I suspect that the "DX8 support" is nothing but ABI translation: translating DX system calls into OpenGL/Quartz. I don't have anything with which to confirm this suspicion, however.)

Microsoft has a relatively poor attitude towards virtualization. Why, I couldn't tell you, but they do.

VTX and the incompatible standard from AMD (Pacifica) provides facilities that virtualize the entire CPU. Certain instructions are guarded instructions that, if executed by the guest operating system, are intercepted and handled, without detection, by the host OS. VTX and Pacifica are supposed to be 100% transparent; whether or not they actually are is another question.

MRD
09-04-07, 11:46 AM
Microsoft has a relatively poor attitude towards virtualization. Why, I couldn't tell you, but they do.

Microsoft really never likes the idea of recognizing the existence of non-MS os's, and certainly not making them easier to access or use.

Shelnutt2
09-04-07, 02:02 PM
although I suspect that the "DX8 support" is nothing but ABI translation: translating DX system calls into OpenGL/Quartz. I don't have anything with which to confirm this suspicion, however.)

Well it is a funny how WINE also has almost 100% support for Directx8 (I will not say 100% because I'm sure you can find one game that doesn't run right). DX9 support is not all there yet. Also funny how WINE translates Direct 3D calls into OpenGL calls, ;).

splat
09-04-07, 07:07 PM
the easiest way is qemu. you can download disk images and run them directly using qemu. the disk images are virtualized drives that are stored as a file on your host computer, they are sometimes compressed so that a 10gb virtual drive won't actually take up 10gb of space. You might be aware that the Linux kernel had KVM (kernel virtual machine) added to it, which is supposed to increase the speed of virtualizing. There are a few articles out there that test teh speed of linux+kvm+qemu vs Xen, and I think in some instances they were very close in speed/responsiveness. Basically i think you can use KVM if your processor has Virtualization hooks in it, like a lot of the Core 2 Duos do (make sure it's turned on in the bios).

i was first introduced to qemu when i downloaded DSL (damn small linux) and they had the "embedded" distro where you would run it in Qemu right in windows. You didn't need to know anything about qemu, you just clicked the batch file they had and up it went. I use Qemu sometimes in Linux to test out other distros and other OS's.

now, the xbox 360 virtualizes the old Xbox for backwards compatibility. I believe it does this thru a hypervisor. And there was an article not long ago saying dell might start selling computers that have a hypervisor built in to the mobo to allow more direct access to the hardware for each virtualized OS. They were saying that the hypervisor might run a type of VMWare or Xen to set up the guest drives. But anyway, i just thru that in there to say that "virtualization" doesn't get a straight "this is it" answer.

at any rate, qemu is very easy to set up, and i know it might seem like a hassel to emerge gcc3 and build qemu with it, but it's not really that big a deal.

http://kvm.qumranet.com/kvmwiki
http://www.oszoo.org/wiki/index.php/Main_Page
http://gentoo-wiki.com/HOWTO:_Qemu