QEMU (still) hangs on Windows 7 install
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| QEMU |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
I'm trying to install Windows 7 as guest, but the machine still hangs (more precisely, the windows icon keeps flashing, but never goes past this stage).
I think this is a different bug from https:/
Specifically, its happens when the OVMF BIOS is used, and I can't find any workaround (in the above bug, by changing the display, the installation doesn't hang).
The most minimal commandline that reproduces the issue is (generic format):
$QEMU_BINARY \
-drive if=pflash,
-drive if=pflash,
-enable-kvm \
-m $QEMU_MEMORY \
-display std \
-cpu host,kvm=off -smp 4,sockets=1,cores=4 \
-cdrom $QEMU_WINDOWS_7_CD \
;
I'm using `OVMF_15214.fd` as BIOS.

I'll assume "OVMF_15214.fd" is from <http:// www.tianocore. org/ovmf/>. It's an ancient build of OVMF (older than two and half years). The binary packaged in that ZIP file isn't even a split one, it's a unified binary that is unsuitable for the command line that you've given above.
Please either grab the most recent OVMF build from your distribution, or a bleeding edge build from <https:/ /www.kraxel. org/repos/> (recommended). Then create a copy of the varstore template, to be used as the VM's own private variable store. Also, fix the "-display std" command line option, as in "-vga std". It will just work then.
Below I'll specify the commands that I just re-tested. Note that I'm also renaming the QEMU_BIOS and QEMU_BIOS_TMP variables (whose names are quite inappropriate) to FIRMWARE_BINARY and VARIABLE_STORE.
# this binary corresponds to upstream git cc9a366d3b16, BINARY= /opt/qemu- installed/ bin/qemu- system- x86_64
# dated "Thu Sep 29 00:34:20 2016 +0100"
QEMU_
# these files are from package ovmf-x64- 0-20160929. b2144.g84bc72f. noarch" , installed BINARY= /usr/share/ edk2.git/ ovmf-x64/ OVMF_CODE- pure-efi. fd STORE_TEMPLATE= /usr/share/ edk2.git/ ovmf-x64/ OVMF_VARS- pure-efi. fd STORE=/ tmp/guest1- vars.fd
# "edk2.git-
# from kraxel.org
FIRMWARE_
VARIABLE_
VARIABLE_
# Windows 7 installer disk WINDOWS_ 7_CD=en_ windows_ 7_enterprise_ n_with_ sp1_x64_ dvd_u_677704. iso
QEMU_
# other settings MEMORY= 2048
QEMU_
# create empty variable store from pristine template if the varstore doesn't STORE_TEMPLATE" "$VARIABLE_STORE"
# exist yet, or has been lost for some reason
if ! [ -e "$VARIABLE_STORE" ]; then
cp -v -- "$VARIABLE_
fi
$QEMU_BINARY \ format= raw,readonly, file="$ FIRMWARE_ BINARY" \ format= raw,file= "$VARIABLE_ STORE" \
-drive if=pflash,
-drive if=pflash,
-enable-kvm \
-m $QEMU_MEMORY \
-vga std \
-cpu host,kvm=off -smp 4,sockets=1,cores=4 \
-cdrom $QEMU_WINDOWS_7_CD