LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-24-2012, 12:18 PM   #1
yugi_u
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Rep: Reputation: Disabled
Urgently, Please, need help with qemu!!


Hi all,

I would like to ask about an emulator which is called "QEMU"

I have a machine which contains in its hard drive 2 OS.

1- Ubuntu 11.10
2- Windows 7

The question is, how to use this emulator as a virtual machine to load the windows from the Linux environment?

But, I don't want to setup or install a new windows.

What I need is to boot my windows7 from the Linux machine using QEMO.

I used this command:


$sudo qemu -hda /dev/sda

but when i choose the windows7 to boot, i got the blue screen!

I need your support.
 
Old 06-24-2012, 01:48 PM   #2
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
'qemu' is a virtual machine emulator. It means that you can install an OS in qemu (primarly to check a few things or to do some things that you do not want to do on a production machine). In short you cannot boot a windows partition using qemu.
What boots mulitple machines (OSs) is the bootloader. Linux comes with lilo and grub. My guess is you are using grub if you have installed Ubuntu.
 
1 members found this post helpful.
Old 06-24-2012, 02:11 PM   #3
yugi_u
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by honeybadger View Post
'qemu' is a virtual machine emulator. It means that you can install an OS in qemu (primarly to check a few things or to do some things that you do not want to do on a production machine). In short you cannot boot a windows partition using qemu.
What boots mulitple machines (OSs) is the bootloader. Linux comes with lilo and grub. My guess is you are using grub if you have installed Ubuntu.
Thanks honeybadger, I am new to Linux but I think I am already using grub.

Second, I am not with you in you opinion and if so, how to use QEMU to boot an installed version via it??

What I mean is that, they use QEMU first to install os and then, use it to boot the installed version.

The only difference in my case that, I do have a physical partition that contains an installed version.

That's all.
 
Old 06-24-2012, 02:11 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
It is possible to use a physical drive or partition within some virtual machines. Qemu can do it. The problem is not with qemu but the windows. It will require you to correct the hal and to most likely re-activate it. It may not be possible to run some OEM windows under qemu as you won't be able to activate it.
Another issue is that it seems like you are trying to mount or use both OS's hard drive. It is almost impossible to mount the hosts drive and use it under qemu.

Why do you want to do this anyway? Please don't use terms like urgent.
 
Old 06-24-2012, 02:20 PM   #5
yugi_u
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
It is possible to use a physical drive or partition within some virtual machines. Qemu can do it. The problem is not with qemu but the windows. It will require you to correct the hal and to most likely re-activate it. It may not be possible to run some OEM windows under qemu as you won't be able to activate it.
Another issue is that it seems like you are trying to mount or use both OS's hard drive. It is almost impossible to mount the hosts drive and use it under qemu.

Why do you want to do this anyway? Please don't use terms like urgent.
Thanks for your reply.

I need to do this because I want to use QEMU as a VM and run another OS.

What I really want is to run a guest os which is Windows under a host os which is Linux.

But I don't want to install a new image or to make a virtual one as I have a physical one already.

About the Urgent term, I am sorry but I need to have a solution very urgently.

That's all.
 
Old 06-24-2012, 09:00 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
I think you'd be better off either using a P2V application to change it from a physical installation to a virtual format or use some tool like clonezilla or dd to raw file and use it in qemu. Good P2V apps fix the hal but not sure if there are any for qemu. Might be. Any sort of other use would require some hal being changed or fixed. Again you would have to contact microsoft to activate it as the amount of hardware would be changed too much.
 
Old 06-24-2012, 11:54 PM   #7
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
Ok this is my idea. A script that parses every post title and replaces "urgent" with "pink bunnies".
 
Old 06-25-2012, 04:24 AM   #8
yugi_u
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by fogpipe View Post
Ok this is my idea. A script that parses every post title and replaces "urgent" with "pink bunnies".
Woooooooow, what a great idea, But I think you should KEEP IT FOR YOURSELF ONLY
 
Old 06-25-2012, 04:33 AM   #9
yugi_u
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
I think you'd be better off either using a P2V application to change it from a physical installation to a virtual format or use some tool like clonezilla or dd to raw file and use it in qemu. Good P2V apps fix the hal but not sure if there are any for qemu. Might be. Any sort of other use would require some hal being changed or fixed. Again you would have to contact microsoft to activate it as the amount of hardware would be changed too much.
Thanks for your care, I tried to think in something like that.
I will try to do it.
 
Old 06-25-2012, 11:42 AM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
OK, hope you get it working.

Two issues you have is the hal problem and the other is trying to mount the hosts drive in qemu. It will corrupt your data if you do it.
 
Old 06-25-2012, 12:37 PM   #11
honeybadger
Member
 
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
Hey Jefro, thanks for clearin this out. I did not know that qemu could boot an installed partition. I have suddenly found a new respect for the qemu guys. BTW does qemu has this abilities or could we use something like Virtual Box doing this too.
 
Old 06-25-2012, 12:38 PM   #12
yugi_u
LQ Newbie
 
Registered: Jun 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
OK, hope you get it working.

Two issues you have is the hal problem and the other is trying to mount the hosts drive in qemu. It will corrupt your data if you do it.
Thanks jefro, but i didn't get it.

Can you suggest something direct for me to do?
 
Old 06-25-2012, 05:24 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,981

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
First is any VM that can use a partition. Some of them can but almost all state some warning. There are a few web pages on making your own .vmx file and making a phony vmdk I think to run vmware. Sure virtualbox has a hack to that too.


Qemu tends not to be one of the choices when you use a P2V application. Microsoft offers a free tool that can change an install to at least their virtual machine. That might be imported but we are back to the very basic nature of qemu.
VMware has a tool and there are plenty of other tools out there that can convert a physical machine to some form of virtual machine. I know of none but maybe someone else knows of some app to do that for qemu.

If it were me and we assumed a few things. I might be tempted to try a few ways. One is to use windows backup for sure to make a copy saved off to some remote media. A second copy of that might be used to convert or use as qemu. I have also used tools like ghost and dd and clonezilla and such to copy off drive to later load on a virtual machine.

If you insist then it might be possible to boot to a partition but it is more trouble than it would be worth in this case.
 
1 members found this post helpful.
  


Reply



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
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM
qemu: hardware error: qemu: could not load PowerPC bios 'openbios-ppc' Skaperen Linux - Virtualization and Cloud 8 06-09-2011 07:15 AM
Error while installing qemu (qemu-kvm-0.13.0) in rhel 5.3 birla.sunil Linux - Virtualization and Cloud 2 10-19-2010 03:56 AM
On qemu-kvm, qemu-ifup script not found on Slackware 13 AndrewGaven Linux - Virtualization and Cloud 14 01-29-2010 03:36 AM
After qemu-img, qemu is not capable to detect the C drive (empty) frenchn00b Linux - General 3 10-18-2009 05:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:47 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration