|What info are you interested in?
1. I want to install Vista on Ubuntu
Please vote so I can add information that people are looking for!
I bought a Dell Optiplex 745 early 2007 loaded with Vista Ultimate for my research. However, since I am more of a Linux person, I dual booted my computer with Ubuntu 6.10 Edgy Eft. I didn’t upgrade to 7.04 because I wanted to keep using Apache 1.x for my web server (pre-forking support). When I took down my webserver end of last year, I finally updated my Ubuntu to 7.04 and then 7.10. I have not updated to Ubuntu 8.04 Hardy Heron yet.
In any case, I realized I hardly boot up in Vista because it requires a physical reboot and I usually have a bazillion windows and workspaces up in Linux. As I started missing my Windows games and apps, I thought about purchasing another computer, strictly for Windows. But that was too pricey. I had used wine (a Windows emulator on Linux), but that seemed unreliable at times and doesn’t support all Win apps. Then I started investigating about virtual machines, and this article will talk about how I got Vista working in Ubuntu 7.10 using QEMU and then VmWare.
What is a virtual machine?
In short, a virtual machine (VM) is a software implementation of a machine (computer) that executes programs like a real machine. For example, I can run Vista or XP as a VM inside Linux. It also allows me to test out other Linux distros without creating a whole partition for it, since VMs run as a single file in an existing partition. VMs are faster and run more natively then emulators. See the virtual machine wiki page for more info.
Dell Optiplex 745 Core2 Duo 2.13Ghz, 2Gb RAM, 2x250Gb WD HDD, ATI Radeon x1300, Windows 32-bit Vista Ultimate, Ubuntu 7.10, Dell UltraSharp 2407 LCD, Linux Kernel 188.8.131.52
What I Needed:
Microsoft Vista installation DVD
VMWare Workstation or VMWare Player+VMTools
QEMU (I tried this first)
CreativeLabs Soundblaster PCI (ES1371, ES1373) Windows driver
How I got Vista working in Ubuntu 7.10:
This is not a step-by-step path that you should follow if you want to get Vista working on Ubuntu. This is the step-by-step I went through to get it working. You can decide if you need to do them or not. For example, you can go straight to using VMWare software instead of trying open-source software like QEMU. And I’m not sure how much upgrading my BIOS had to do with the process. Maybe it’ll help you if you get stuck.
There are also other ways to getting Windows to work in Linux. Websites such as EasyVMX create virtual machines online for you. However, I have never tried that and don’t know how well they work.
1. Upgraded my BIOS
What led me to upgrading my BIOS was in regards to whether my computer supported virtualization and ACPI (Advanced Configuration and Power Interface) or not. Most tutorials first ask you to turn it on in your BIOS. As I went into my BIOS, the only option I had was to turn on Intel’s Virtualization Technology option. Before going any further, I decided to upgrade my Dell to the latest BIOS. I suggest doing this as it can’t really hurt. I did later find out that my BIOS and computer naturally supports virtualization and there was no need to turn anything on in my BIOS.
Another way to check if your computer supports virtualization, the following command in Linux should be a non-empty result:
grep -E ‘^flags.*(vmx|svm)’ /proc/cpuinfo
2. Install QEMU/KQEMU
Even though I ended up using VMWare software, I still used QEmu (with kqemu as the acceleration driver) along the way to do useful things (such as creating an .img and installing a Vista .iso into it). I also tried just using Qemu for my virtualization. So, go ahead and install QEMU.
- Follow steps 1-9 of the Ubuntu Tutorial – Running WIndows XP under QEMU.
- I also installed qemu, kvm,kqemu-source, kqemu-modules-2.6.22-15-generic and any other dependencies they have.
3. Create a vista.img
In QEMU, the VM will reside in a .img file “drive”. I first created a .img file in my ~username/vm directory. Then I installed a Vista OS into the .img file. The one main option in creating an “empty” .img file is the format, raw or qcow. In raw, you specify a set size that is not expandable. However, you can mount the VM in Linux using ntfs-3g. In qcow, you specify an initial size (Vista requires atleast 6.8Gb minimum), and the VM will expand in 2Gb increments when necessary. However, it is not mountable.
If you are going to use VMWare, I would suggest using the fat format. We will convert the .img file into .vmdk format later anyways, so don’t worry about size now. If you are going to use just QEMU, then you can try the qcow format, but when I tried that, I had a lot more of the errors below than when I used the fat format.
In any case, you create a .img using the following command. What is bold can be changed by you. Then change the permissions to be writable.
qemu-img create -f fat vista.img 9G
chmod 660 vista.img
4. Install Vista into the vista.img file
The next step is to install Vista into the newly created img file. First thing is to have your Vista DVD ready. I used the DELL reinstallation DVD that came with my computer. There are two options here, installing directing from the DVD into the Vista.img file or first create a Vista.iso file. The latter option is faster, since it doesn’t require continuous DVD access. To create an iso file, use the following command:
dd if=/dev/cdrom of=vista.iso
If your cdrom device is not cdrom, just change accordingly. You can check by seeing where it is mounted, or check the /dev directory. My cdrom is mounted in /media/cdrom. Remember, in Linux, cdrom device refers to both cd-rom and dvd-jrom drives.
Now to install the Vista.iso into the Vista.img file, use one of the following commands. I’ve had varying luck with all of them. First a new window opens up that has a progress bar and “Windows loading files” text. Then Vista attempts to load up for installation. If you skipped creating the iso file and want to install directly from dvd, replace vista.iso with /dev/cdrom.
qemu-system-x86_64 -boot d -m 512 vista.img -cdrom vista.iso
- The qemu-system-x86_64 command can be used for 32-bit machines also since kvm does not differentiate between the 32-bit and 64 bit machines.
- The -m specifies how much memory to use.
- I ran into the following errors and was never able to overcome the second error:
- A write to read-only memory blue error screen. This is because the img file does not have write permissions. Use chmod 755 vista.img to allow the current user to write to it.
- A PAGE_FAULT_IN_NONPAGED_AREA blue error screen. An old forum had some ideas regarding this error.
kvm -m 1024 -localtime -net nic,model=rtl8139 -net user,vlan=1 -cdrom vista.iso -boot d vista.img
- -localtime forces QEMU to use the local time of the host Ubuntu computer.
- -net nic,model=rtl8139 sets the networking to the Network Interface Controller (nic) interface, with model of Realtek PCI Fast Ethernet rtl8139 driver
- If you get the following error in your xterm when you run the command, ignore it for now:
open /dev/kvm: No such file or directory
Could not initialize KVM, will disable KVM support
- The troubling thing with this method is I kept getting the PAGE_FAULT_IN_NONPAGED_AREA blue error screen over and over again. If you keep trying, you might get lucky. For some reason, after like 10 tries, it gets past it and the Vista Install Window shows up (see below). I still don’t know why and when it does it. One interesting possibility might be because Vista does not produce valid boot sector information. This person installs XP on the img first, before installing Vista over it. You can try that but since I didn’t have an XP iso available I couldn’t verify it. If you do try and it works, please let me know.
- Go ahead and install Vista now.
qemu -m 384 -localtime -cdrom vista.iso -boot d vista.img
- This command actually had the most luck for me, at least getting into the Vista installation process. However, I still would sometimes get the PAGE FAULT blue error screen when Vista has to reboot during installation. If anyone knows why this happens, please let me know.
5. Run Vista in Ubuntu using QEMU
If you’ve gotten this far, you are almost there. You can actually run Vista in Ubuntu right now. The following command would boot up Vista in barebones QEMU-style:
qemu -localtime -m 512 vista.img
- If you use the following options, you will need to install the drivers for them first.
- -soundhw es1371 emulates the Creative Labs ES1371 sound card.
- -net nic,model=rtl8139 treats your ethernet card as a Realtek PCI Fast Ethernet rtl8139 driver
- -usb -usbdevice tablet treats your mouse like a tablet, so instead of clicking on the Vista window to enact it, you can simply move the mouse into the window.
6. Installing VMWare Player/Workstation
QEMU has some shortcomings that I couldn’t resolve. One was getting the sound to work (although I didn’t try that hard in installing the sound driver). The other was that it only has a VGA graphics adapter, which forces the Vista window to be at max 1280×1024. This was a big deal to me since my LCD native is 1920×1200.
So I moved on to try using VMWare’s free virtualization software, the VMWare Player (and eventually VMWare Workstation). It’s actually a nifty little GUI and tool, but what makes it annoying is that it requires you to load a virtual machine that is created in other VMWare software (all of which are not free). However, this is more of a technalicality, since all it requires is a VM in .vmx and .vmdk formats. We can convert our .img VM to these formats using QEMU’s utilities.
Download VMWare Player from VMWare’s website.
7. Convert vista.img to vista.vmdk
After installing the Player, we have to convert the .img file to vmdk format, which is VMWare’s hard disk format.
qemu-img convert vista.img -O vmdk vista.vmdk
8. Create a Vista.vmx – the VMWare vm configuration file
Finally, we create a vmx file that configures the virtual machine vmdk. We can specifies settings for sound cards, memory, etc in here. However, you can leave the vmx file barebones and use the VMWare GUI to add to the file. Use this link to create a barebones vmx file.
9. Success and Beyond
Once you’ve created the vmx file, it is pretty straightforward at this time. Just start VMWare Player and open the virtual machine specified by your vmx config file. There is plenty of info online on how to customize your virtual machine. Some things you might run into is getting your sound to work. Try rebooting sometimes. I remember nothing working and a simple reboot gave me sound for good. I also had to install the Soundblaster PCI 128 (ES1371) driver directly in Vista. Since that driver is way out of date, you won’t find the link directly from the Create Labs website. You’ll have to search the web for it. I’ll put a link up here when I get around to it.
Additionally, the main reason you want to possibly move up to VMWare Workstation is the VMTools it comes with. The VMTools contains the SVGA graphics adapter driver that allows higher res VMs. Some people have gotten around this by downloading the free trial for the Workstation, using the VMTools, and then downgrading back to Player.
Finally, I list some websites below of related information that might makes things even easier for you.
Please respond to the poll below. Also, let me know if you want more information added to the post. I am always updating old posts. Thanks!
|How helpful was this post
1) not at all
2) a little
4) pretty helpful
5) very helpful