On 4/15/19 6:23 AM, Programmingkid wrote:
> 
>> On Apr 15, 2019, at 5:54 AM, Stefan Hajnoczi <stefa...@gmail.com> wrote:
>>
>> On Sun, Apr 14, 2019 at 07:33:17PM -0400, Programmingkid wrote:
>>> Hi I was wondering if anyone has been able to boot from a bootcamp 
>>> partition inside of QEMU. I know this partition can be used in QEMU but my 
>>> own attempts at booting Windows 7 on my bootcamp partition did not work. I 
>>> always see "A disk read error occurred". Has anyone else been successful at 
>>> this? 
>>
>> Hi,
>> It's difficult to help without more information:
>> 1. What is your QEMU command-line?
> 
> sudo qemu-system-x86_64 -name "Windows 7" -hda "/dev/disk0s4" -boot "c" -m 
> 3000 
> 
>> 2. What is the partition table on the disk?
> 
> The bootcamp partition is this: /dev/disk0s4
> 

(Are you trying to boot a partition as an entire block device ...?)

>> General problems with booting Windows are usually caused by a guest
>> configuration that doesn't match the hardware configuration that Windows
>> was installed under.  Can you check that the AHCI bus address of the
>> disk and partition numbering matches what Windows expected?
> 
> How would someone do this?
> 
>> It may also be useful to enable tracing (see docs/devel/tracing.txt) to
>> see what the ahci_* trace event log says.  I have CCed John Snow, one of
>> the few people who can read this log :).
> 
> I'm guessing you believe the problem is the partition can't be read in QEMU. 
> I know for sure it can. I attached this partition to another QEMU VM and was 
> able to see it on the Desktop. 
>

Well, we don't know what the problem is. From the command line above it
looks like it'd be using the legacy IDE emulation instead of the newer
SATA emulation, though. I'd wager that the Windows boot loader here is
not expecting to use IDE.

"disk read error" could mean a lot of things from the POV of a guest,
but having disk emulation tracing would show us what the guest is trying
to do, at least.

> My guess is the computer is using an EFI firmware and QEMU uses the 
> traditional BIOS firmware (SeaBIOS).  So I think trying UEFI in QEMU might 
> work.
> 

Try using -M q35 which will engage SATA and AHCI emulation, and try
using UEFI, yes.

Reply via email to