LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   qemu-kvm on a real partition (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/qemu-kvm-on-a-real-partition-947162/)

commx 05-27-2012 08:11 PM

qemu-kvm on a real partition
 
Earlier this day I've tried to boot a existing partition on a external hard disk, which didn't work. Now I'd like to find out why.

My disk layout is like:
  • /dev/sdb: Arch Linux
  • /dev/sdc: External Hard Disk

On /dev/sdc1 I have a Data partition. Of course this partition doesn't have any bootable files, but I just tried to find out if qemu-kvm is even able to boot from existing partitions rather than converting them into a raw file for example.

So I ran
Code:

qemu-kvm /dev/sdc1
which resulted into a black screen. The computer didn't respond anymore so I did a hard reset. Afterwards my Linux system wasnt able to boot anymore:

Code:

Booting the kernel.
mount: only root can do that (effective uid 1000)
mount: only root can do that (effective uid 1000)
mount: only root can do that (effective uid 1000)
mount: only root can do that (effective uid 1000)
ERROR: device '' not found. Skipping fsck.
ERROR: Unable to find root device ''. You are being dropped to a recovery shell.

I booted the Arch Live CD, chrooted into my partitions and regenerated the kernel image using mkinitcpio, but that didn't help. The log files on the root partition list several Segmentation faults, even on init at the time qemu-kvm was executed. What has happened when running qemu-kvm? Btw: I'm pretty sure that I have *not* specified the wrong partition, I even re-checked that twice by dumping the partition table of /dev/sdc before executing that command.

This case has been already solved, but I'd like to find out whats wrong with that.
Thanks for any hints.

jefro 05-28-2012 03:12 PM

There are some docs that tell how to boot or access a physical partition. I don't think this is close to correct. "qemu-kvm /dev/sdc1"

I don't think this has changed.

"Hard disks
Hard disks can be used. Normally you must specify the whole disk (/dev/hdb instead of /dev/hdb1) so that the guest OS can see it as a partitioned disk. WARNING: unless you know what you do, it is better to only make READ-ONLY accesses to the hard disk otherwise you may corrupt your host data (use the -snapshot command line option or modify the device permissions accordingly). "

commx 05-29-2012 09:34 PM

It seems that I've run into a qemu-kvm bug, no idea if its QEMU or even libvirtd being the problematic part. Some minutes ago I tried to start a CentOS VM instance and the system crashed immediately. No log entries. After reboot I was able to start the VM without problems.


All times are GMT -5. The time now is 10:31 PM.