You are not logged in.

#1 2009-03-23 21:26:25

fabiop
Member
Registered: 2009-03-23
Posts: 9

qemu-kvm on real partition

Hello,

I am a new user of Archlinux coming from  Gentoo. I know also a little bit FreeBSD  and I am appreciating Archlinux that has the flexibility of Gentoo and the cleaning of FreeBsd structure.
After a successufull Archlinux install, I am trying to run with qemu-kvm a Linux distro (Gentoo) installed on another partition of my hard-disk as explained in Qemu page in Archlinux wiki (paragraph "Using any real partition as the single primary partition of a hard disk image"), but the virtualizer Qemu starts and hangs.
I am not sure about the command used to create the raid device and format it.
There is anyone that has already tried this configuration and can post the exact command line used to format the raid device and create also the bootloader ?
Take into account that qemu-kvm is rightly installed because it is working with a Windows7, Wxp and Ubuntu guests.

Thanks for your help, fabio

Offline

#2 2009-03-23 21:50:13

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: qemu-kvm on real partition

If you use a hardware partition, even a sofware raid array, you will have to run qemu as root in order to have permission to access the device.

Why do you want to do it the way in you mentioned in the wiki anyway?
"qemu-kvm /dev/sda4" will use that partition as the harddrive.


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#3 2009-03-23 21:55:58

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

I run qemu-kvm under root.
The command I used is:
qemu-kvm  -soundhw all -m 1024 -hda /dev/md0 -boot c
because you have to start the raid partition md0 as explained in the wiki.
Do you know other wiki ?

Offline

#4 2009-03-23 22:04:39

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: qemu-kvm on real partition

Is there a specific reason you need to use the method in the wiki?
Otherwise there in no need for a raid array.


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#5 2009-03-23 22:12:48

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

I think that is the only method to start another operating system installed in a real partition, otherwise you have to create a qemu-compatible disk (qcow type etc.).
I don not think that I can start another installed distro with a command "qemu-kvm /dev/sdx"
This method could be very useful to maintain other distro installtion without shutdown-reboot everytime.

Offline

#6 2009-03-23 22:15:59

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

I tried in any case the command "qemu-kvm /dev/sda6" and i received the error "GRUB geom error" inside the emulator window.

Offline

#7 2009-03-23 22:16:47

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: qemu-kvm on real partition

Ok, so you have gentoo already installed.

If you have an entry for that gentoo installation in your main, real, grub menu, you can just use your entire harddrive as the haddrive for qemu (ie /dev/sda) and select your gentoo installation when you reach grub.

Otherwise, just add an entry for it.

Last edited by Odysseus (2009-03-23 22:20:03)


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#8 2009-03-23 22:20:41

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

I have a separate partition for grub files, includes menu.lst.
I am not sure to understand what you mean: do you suggest to start grub via qemu and after select gentoo ? In wich way i can use qemu to start grub ? Please, may you write such a command and I will try ?
Thanks, fabio

Offline

#9 2009-03-23 22:24:10

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: qemu-kvm on real partition

1) qemu-kvm /dev/sda
2) Boot gentoo.


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#10 2009-03-23 22:29:07

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

Command no. 1) in effect boot the grub menu, but I am unable to move with the arrow to choose the gentoo line (I have several coiche included Archlinux, Gentoo, Windows etc..
Probably I have to add some option to qemu command line because the grub windows is not X ?

Offline

#11 2009-03-23 22:49:07

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

With Odysseus's last suggestion I am able to start Window WXP that is the default entry in menu.lst but I am not able to choose other entry because the up-down arrow seems not to work inside the qemu window (program is not hanged because the "e" command is working).
Tomorrow I will try to go ahead in this way.
Thanks a lot in any case, Odysseus; I will keep informed you on the forum my  next steps. Good night, fabio

Offline

#12 2009-03-23 23:08:23

Odysseus
Member
Registered: 2009-02-15
Posts: 141

Re: qemu-kvm on real partition

I know what the problem is. I have it too.  Specify your keyboard layout like so: qemu-kvm -k en-us /dev/sda


I'm the type to fling myself headlong through the magical wardrobe, and then incinerate the ornate mahogany portal behind me with a Molotov cocktail.

Offline

#13 2009-03-24 07:13:55

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

Thankyou very much Odysseus, I will try tonight (I am italian and now it's time to go to work ...).
I will inform you on successfull story, if it's a working solution.
Good bye,
fabio

Offline

#14 2009-03-24 21:00:15

fabiop
Member
Registered: 2009-03-23
Posts: 9

Re: qemu-kvm on real partition

IT'S WORKING |||
I have some problem with assignment of right /dev/sdx in grub entry because Gentoo inverted hw-disk /dev/sda with /dev/sdb, but this method it's perfectly working with Ubuntu and Windows-XP.
Someone should amend the Qemu wiki pages inserting the method suggested by Odysseus that, by the way, it seems to me closer to archlinux-style-of-life (kiss) instead of the complicated md-array.
Thanks a lot, Odysseus; I will continuiing to explore Archlinux.
fabio

Offline

Board footer

Powered by FluxBB