LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-24-2008, 09:54 PM   #1
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Rep: Reputation: 30
Qemu (KVM) and WINDOWS Vista.


Qemu (KVM) and Vista.

I wrote this article nearly a year ago, but never got around to finishing it. I have added the driver ISO, but otherwise it is little changed. I used the Kernel Virtual Machine (KVM) rather than QEMU itself, but what works for KVM, will usually work for QEMU, as KVM has QEMU as its foundation. If time permits, I will add a section on which CPUs are KVM capable and how to compile the latest version of KVM. Until then, I will point you to:

http://kvm.qumranet.com/kvmwiki and
http://fabrice.bellard.free.fr/qemu/

Copy your Vista installation disk to an iso image with:

dd if=/dev/cdrom of=vista.iso

Create a raw image with:

/usr/local/kvm/bin/qemu-img create -f raw vista.img 10G

The reason for using the raw format is that you can use ntfs-3g to mount the image. This makes copying files into the image a breeze. However, do not boot the image when it is mounted, or mount it when booted, as this will probably fry it.

You need one of the following kvm kernel modules:

/sbin/modprobe kvm-amd
/sbin/modprobe kvm-intel

Vista does not produce valid boot sector information, so partition and format the image, vista.img, with XP or Linux. For example, use:

qemu-system-x86_64 -boot d -m 512 vista.img -cdrom xp.iso

to format the image using an XP install disk (xp.iso). Stop after the partition is formated (with NTFS).

KVM doesn't make a distinction between i386 and x86_64 so, even in i386, you should use qemu-system-x86_64. If your system cannot find qemu-system-x86_64, you might need to use the full path:

/usr/local/kvm/bin/qemu-system-x86_64.

Now install Vista with:

qemu-system-x86_64 -boot d -m 512 vista.img -cdrom vista.iso

The installation runs much faster from the iso image, but, you can also install from the CD with:

qemu-system-x86_64 -boot d -m 512 vista.img -cdrom /dev/cdrom

Now mount vista.img and copy the drivers into the image:

mount -t ntfs-3g -o loop,offset=$((63*512)) vista.img /1
mkdir /1/drivers; cp -r ES1370 RTL8029 /1/drivers

$((63*512)) = 32256, 63 sectors of 512 bytes. Or, use the tiny iso image, drivers.iso:

bunzip2 drivers.iso.bz2
qemu-system-x86_64 -m 512 -soundhw es1370 -usb -usbdevice tablet vista.img -cdrom drivers.iso

The option -soundhw es1370 has qemu emulate an Ensoniq AudioPCI ES1370 sound card.

The default network hardware -net nic,model=ne2k_pci is a Realtek 8029 PCI Ethernet Card.

Drivers for both, are on drivers.iso. Install them by right-clicking on the .inf files and choosing install from the menu.

The complete default network option is -net nic,model=ne2k_pci -net user. The -net user option sets up a SLIRP connection (since it is modeled on the earlier SLIRP connections). It allows you to get on the internet and is naturally fire-walled. It is not a true network connection, e.g., ping does not work.

Qemu can also emulate a Realtek 8139 Ethernet Card, which Vista does have a driver for, however, this does not recognize the SLIRP connection, the DHCP server, or the tap devices (so is essentially useless to you).

To use the Realtek 8139 card use the option -net nic,model=rtl8139.

Kvmwiki claims that rtl8139 now works with recent versions of KVM. You apparently need, the 0.9.0-cvs version of QEMU (check, e.g., kvm-58/qemu/VERSION). If you are still using QEMU 0.9.0, then you will need the rtl8029 driver. It should be noted, that the rtl8139 driver, always "worked", you just couldn't connect to the internet, or do anything useful, with it.

Now run Vista with the command:

qemu-system-x86_64 -m 512 -localtime -soundhw es1370 -usb -usbdevice tablet vista.img

The -usb -usbdevice tablet option allows your mouse to escape from Vista to Linux by just moving outside the Vista window (without this, you have to press Ctrl-Alt to escape the mouse).

The -m 512 option allocates 512 MB of RAM to KVM.

Using the -no-acpi option can result in much faster installation and performance. However, I am told that Vista does not work with this option?

Last edited by jtshaw; 04-03-2008 at 06:29 AM. Reason: Removed certain links...
 
Old 01-26-2008, 04:23 AM   #2
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
The complete default network option is -net nic,model=ne2k_pci -net user. It allows you to get onto the internet and is naturally fire-walled. The -net user part sets up a SLIRP connection. It is not a true network connection, e.g., ping does not work. The SLIRP connection comes with its own DHCP server. Setting a static IP address will cause things not to work.
 
Old 01-26-2008, 03:37 PM   #3
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Does anyone know if Vista works with the -no-acpi option?
 
Old 01-27-2008, 05:00 PM   #4
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Please; Does anyone know if Vista works with the -no-acpi option?
 
Old 01-28-2008, 07:44 PM   #5
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Does anyone actually read these threads?
 
Old 01-29-2008, 06:54 PM   #6
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Why doesn't someone humor me and reply? Just to prove that at least one person has read (at least) some of this thread.
 
Old 01-31-2008, 12:08 AM   #7
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Why doesn't someone humor me and reply? A good question.
 
Old 01-31-2008, 12:21 PM   #8
teddyt
Member
 
Registered: Dec 2007
Location: US
Distribution: Slackware 12.1
Posts: 119

Rep: Reputation: 15
I think you turned us all off with your use of 'Vista' in the title: it's an ugly, obscure OS, the door of whom only the most self-hating among us dares to knock.

No idea. But this is a reply.
 
Old 01-31-2008, 12:29 PM   #9
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
Quote:
Originally Posted by ComputerGreek View Post
Why doesn't someone humor me and reply? A good question.
Gee, man, I think you've got your reply. No, nobody knows if vista works with -no-acpi
 
Old 02-01-2008, 05:13 PM   #10
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Thanks Ted, and here's me thinking that Vista might attract attention.
 
Old 02-01-2008, 06:35 PM   #11
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,193

Rep: Reputation: 159Reputation: 159
Quote:
Originally Posted by ComputerGreek View Post
Thanks Ted, and here's me thinking that Vista might attract attention.
Vista is really the last thing you want to to run in kqemu (most of us don't even have the hardware for it )

As far as I know, Vista needs acpi support to install it.
I never managed to run it qemu for this reason (acpi support in qemu is new and buggy).
 
Old 02-02-2008, 03:12 AM   #12
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by jens View Post
Vista is really the last thing you want to to run in kqemu (most of us don't even have the hardware for it )
It runs OK, except for anything that involves heavy graphics.

XP Office extra run fine.

And by the way, not kqemu, but Qemu and KVM.

You use kqemu if you cannot run the kernel virtual machine (KVM).
 
Old 02-08-2008, 12:31 AM   #13
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Original Poster
Rep: Reputation: 30
By the way, run XP, not Vista, if at all possible.

XP is all-round better.
 
Old 02-08-2008, 12:46 AM   #14
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,193

Rep: Reputation: 159Reputation: 159
Quote:
Originally Posted by ComputerGreek View Post
By the way, run XP, not Vista, if at all possible.

XP is all-round better.
I'm still interested in knowing if Vista will work in Qemu (I use kqemu since Debian comes with a 2.6.18 kernel).

I tried the instructions you posted above, but it still gives me the same old acpi error when booting...

Did you try it in both kvm and qemu (and what 64 version are you using?)?
 
Old 02-08-2008, 10:46 AM   #15
teddyt
Member
 
Registered: Dec 2007
Location: US
Distribution: Slackware 12.1
Posts: 119

Rep: Reputation: 15
Quote:
Originally Posted by jens View Post
I'm still interested in knowing if Vista will work in Qemu (I use kqemu since Debian comes with a 2.6.18 kernel).
I'm not sure it matters - while I don't remember the exact policy, it violates the license to run at least some versions of Vista virtualized.
 
  


Reply

Tags
bsod, kqemu, kvm, qemu, vista


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris 10 guest endless reboot under KVM/Qemu green_dood Linux - Software 6 12-13-2009 01:20 AM
fedora/vista dual boot - partimage: restored vista - vista won't let me log on redmoon zero Linux - General 1 12-31-2007 07:21 PM
LXer: Using kvm, or kqemu, to speed up qemu LXer Syndicated Linux News 0 08-25-2007 01:21 AM
LXer: Linux: Improved KVM Performance, Vista Support LXer Syndicated Linux News 0 05-06-2007 01:46 PM


All times are GMT -5. The time now is 05:49 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration