[Spice-devel] BSOD when booting Win7 Pro with spice
Alon Levy
alevy at redhat.com
Sun Jan 30 13:39:51 PST 2011
On Sun, Jan 30, 2011 at 10:29:29PM +0100, Julian Sikorski wrote:
> W dniu 30.01.2011 12:11, Alon Levy pisze:
> > On Sat, Jan 29, 2011 at 06:15:10PM +0100, Julian Sikorski wrote:
> >> W dniu 29.01.2011 13:36, Alon Levy pisze:
> >>> On Sat, Jan 29, 2011 at 01:29:13PM +0100, Julian Sikorski wrote:
> >>>> W dniu 29.01.2011 12:50, Alon Levy pisze:
> >>>>> On Sat, Jan 29, 2011 at 12:30:14PM +0100, Julian Sikorski wrote:
> >>>>>> W dniu 29.01.2011 12:15, Alon Levy pisze:
> >>>>>>> On Sat, Jan 29, 2011 at 12:06:23PM +0100, Julian Sikorski wrote:
> >>>>>>>> W dniu 29.01.2011 11:02, Alon Levy pisze:
> >>>>>>>>> On Sat, Jan 29, 2011 at 10:56:16AM +0100, Julian Sikorski wrote:
> >>>>>>>>>> W dniu 2011-01-29 10:47, Alon Levy pisze:
> >>>>>>>>>>> On Fri, Jan 28, 2011 at 09:54:37PM +0100, Julian Sikorski wrote:
> >>>>>>>>>>>> W dniu 28.01.2011 21:06, Alon Levy pisze:
> >>>>>>>>>>>>> On Fri, Jan 28, 2011 at 08:48:06PM +0100, Julian Sikorski wrote:
> >>>>>>>>>>>>>> W dniu 28.01.2011 15:32, Alon Levy pisze:
> >>>>>>>>>>>>>>> On Fri, Jan 28, 2011 at 12:45:07AM +0100, Julian Sikorski wrote:
> >>>>>>>>>>>>>>>> Hi,
> >>>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>>> I wanted to try spice on Fedora 14. I have a Win7 Pro 32bit image which
> >>>>>>>>>>>>>>>> was created with virt manager. I later added virtio network and drive to
> >>>>>>>>>>>>>>>> it, installing drivers in the guest as well.
> >>>>>>>>>>>>>>>> The problem is that if I try to use this machine as per F14 wiki, i.e.:
> >>>>>>>>>>>>>>>> qemu /var/lib/libvirt/images/windows.img -usbdevice tablet -soundhw ac97
> >>>>>>>>>>>>>>>> -vga qxl -spice port=5930,password=asd -enable-kvm
> >>>>>>>>>>>>>>>> the windows guest will BSOD during boot (note that I need to do this as
> >>>>>>>>>>>>>>>> su due to the way how virt-manager sets permissions).
> >>>>>>>>>>>>>>>> Is this issue known? What info could I provide to help resolving this?
> >>>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> So which version do you have, 0.7.2?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I tried both the version from f14 updates and from f14 preview repo.
> >>>>>>>>>>>>>> Neither of them works.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>> does the vm boot normally when booting without spice?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> Yes, I can boot the machine via the virt-manager just fine.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> does the vm have qxl driver installed already?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> IIRC it does not. Where I can downlad such driver, and would it be OK to
> >>>>>>>>>>>>>> install it while booted via virt-manager with no spice?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>> If you didn't install it it wouldn't have, the driver isn't part of win7
> >>>>>>>>>>>>> install or available via updates or something. But actually I don't want you
> >>>>>>>>>>>>> to install it, I mean it might help (so you might want to try that - it's
> >>>>>>>>>>>>> available at http://www.spice-space.org/download.html) but this means the
> >>>>>>>>>>>>> problem is with the qxl device vga emulation. (I still have no clue)
> >>>>>>>>>>>>
> >>>>>>>>>>>> I'm not sure how to install the driver with the device not present I'm
> >>>>>>>>>>>> afraid...
> >>>>>>>>>>>
> >>>>>>>>>>> My bad, I souldn't have suggested that, I didn't understand. I don't know either
> >>>>>>>>>>> btw, wish I did.
> >>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>>> can you give the bsod screenshot (from monitor in qemu you can do screendump <filename.ppm>)?
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> http://belegdol.fedorapeople.org/spicebsod.png
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> How much memory do you give the vm? it seems like you are giving it the default. Could you try enlarging that? I'm just saying this because
> >>>>>>>>>>>>> http://support.microsoft.com/kb/326679
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> Looks like you were right. In virt-manager I gave it 1 GB, which was
> >>>>>>>>>>>> enough. But when I added -m 1596 to the command line spice also started
> >>>>>>>>>>>> to work. Unfortunately, it brought the machine to crawl since I only
> >>>>>>>>>>>> have 2 GB physical ram in this laptop.
> >>>>>>>>>>>
> >>>>>>>>>>> I run win7 32 bit win7 vm's with -m 1024. I'm not running F14, but git (actually
> >>>>>>>>>>> some strange hybrid), so I can't be sure it's exactly the same.
> >>>>>>>>>>
> >>>>>>>>>> I will try with the packages from the virt-preview repo maybe that will
> >>>>>>>>>> help.
> >>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>> By the way, is the configuration made with virt-manager respected when
> >>>>>>>>>>>> you run qemu from the command line? To me it seemed like virtio harddisk
> >>>>>>>>>>>> was gone since windows was looking for a driver for a qemu harddrive or
> >>>>>>>>>>>> something along these lines.
> >>>>>>>>>>> It shouldn't be. I'm not even sure where virt-manager keeps it's configuration.
> >>>>>>>>>>
> >>>>>>>>>> IIRC it keeps it in the domain xml file wherever that is stored. In that
> >>>>>>>>>> case, what would be the command line to enable virtio disk and network?
> >>>>>>>>> Just run virt-manager, then ps xaw | grep qemu and pick it from there :)
> >>>>>>>>>
> >>>>>>>>> I think this is correct, but I'm no expert on these parameters: (i.e.
> >>>>>>>>> this is what I'm running)
> >>>>>>>>>
> >>>>>>>>> "-net nic,macaddr=00:00:11:11:22:00,model=virtio"
> >>>>>>>>> '-drive file="%(image)s",index=0,media=disk,cache=writeback,if=virtio'
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>> OK, it seems like I hit another issue. I updated to libvirt from
> >>>>>>>> virt-preview repo and qemu from bug 664192. Then I edited the domain xml
> >>>>>>>> to enable qxl graphics and spice (xml attached for convenience).
> >>>>>>> It isn't. Your previous emails didn't have attachments as well. Maybe
> >>>>>>> they are being stripped somewhere along the way?
> >>>>>>
> >>>>>> Erm, I just forgot to attach it. My bad.
> >>>>>>
> >>>>>>>
> >>>>>>>> The problem - virsh start windows attempts to add -spice
> >>>>>>>> port=5900,addr=127.0.0.1,disable-ticketing, which fails due to wrong
> >>>>>>>> addr parameter. I take that out, getting:
> >>>>>>>>
> >>>>>>>> QEMU_AUDIO_DRV=spice /usr/bin/qemu-kvm -S -M fedora-13 -enable-kvm -m
> >>>>>>>> 1024 -smp 1,sockets=1,cores=1,threads=1 -name windows -uuid
> >>>>>>>> a5a9cf48-603e-5795-ba0f-b5692ce2d93d -nodefconfig -nodefaults -chardev
> >>>>>>>> socket,id=monitor,path=/var/lib/libvirt/qemu/windows.monitor,server,nowait
> >>>>>>>> -mon chardev=monitor,mode=control -rtc base=localtime -boot c -drive
> >>>>>>>> if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
> >>>>>>>> ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
> >>>>>>>> file=/var/lib/libvirt/images/windows.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
> >>>>>>>> -device
> >>>>>>>> virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0
> >>>>>>>> -netdev tap,fd=42,id=hostnet0 -device
> >>>>>>>> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:6a:d1:82,bus=pci.0,addr=0x4
> >>>>>>>> -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device
> >>>>>>>> usb-tablet,id=input0 -spice port=5900,disable-ticketing -vga qxl -device
> >>>>>>>> AC97,id=sound0,bus=pci.0,addr=0x5 -device
> >>>>>>>> virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
> >>>>>>>>
> >>>>>>>> and qemu starts, but when I connect to it using
> >>>>>>>>
> >>>>>>>> spicec -h localhost -p 5900
> >>>>>>>>
> >>>>>>>> all I can see is black screen.
> >>>>>>>
> >>>>>>> This sounds like missing vgabios. Try running without -spice (but with -vga qxl)
> >>>>>>> , is it still black? you can workaround this by adding "-L <qemu_dir>/pc-bios"
> >>>>>>> and making sure that directory contains vgabios-qxl.bin
> >>>>>>
> >>>>>> I tried
> >>>>>>
> >>>>>> QEMU_AUDIO_DRV=spice /usr/bin/qemu-kvm -S -M fedora-13 -enable-kvm -m
> >>>>>> 1024 -smp 1,sockets=1,cores=1,threads=1 -name windows -uuid
> >>>>>> a5a9cf48-603e-5795-ba0f-b5692ce2d93d -nodefconfig -nodefaults -chardev
> >>>>>> socket,id=monitor,path=/var/lib/libvirt/qemu/windows.monitor,server,nowait
> >>>>>> -mon chardev=monitor,mode=control -rtc base=localtime -boot c -drive
> >>>>>> if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device
> >>>>>> ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive
> >>>>>> file=/var/lib/libvirt/images/windows.img,if=none,id=drive-virtio-disk0,boot=on,format=raw
> >>>>>> -device
> >>>>>> virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0
> >>>>>> -netdev tap,fd=42,id=hostnet0 -device
> >>>>>> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:6a:d1:82,bus=pci.0,addr=0x4
> >>>>>> -chardev pty,id=serial0 -device isa-serial,chardev=serial0 -usb -device
> >>>>>> usb-tablet,id=input0 -vga qxl -device AC97,id=sound0,bus=pci.0,addr=0x5
> >>>>>> -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
> >>>>>>
> >>>>>> but it failed even worse:
> >>>>>>
> >>>>>> char device redirected to /dev/pts/7
> >>>>>> qemu-kvm: -netdev tap,fd=42,id=hostnet0: TUNGETIFF ioctl() failed: Bad
> >>>>>> file descriptor
> >>>>>> TUNSETOFFLOAD ioctl() failed: Bad file descriptor
> >>>>>> spice_server_add_interface: SPICE_INTERFACE_QXL
> >>>>>> red_worker_main: begin
> >>>>>> red_init: ASSERT init_data->num_renderers > 0 failed
> >>>>>>
> >>>>>> Przerwane (core dumped)
> >>>>>>
> >>>>>> Should I try to get the backtrace? Adding -L /usr/share/qemu/ did not
> >>>>>> change anything (that's where the vga bios resides)
> >>>>>
> >>>>> Regarding -L, did you make sure there is actually a vgabios-qxl.bin there?
> >>>>> Regarding backtrace, it isn't really neccessary, the ASSERT says the problem,
> >>>>> It is a bug though, I think Gerd wanted to make sure -vga qxl can work without
> >>>>> -spice.
> >>>>
> >>>> $ rpm -ql qemu-system-x86 | grep qxl
> >>>> /usr/share/qemu/vgabios-qxl.bin
> >>>
> >>> An ls would have done. Actually, this is less then ls, the file might not
> >>> be there. Anyway, assuming ls shows it there (I'm not that much of a skeptic),
> >>> maybe I didn't understand you correctly - is the black screen from the start,
> >>> i.e. including the BIOS stage? No idea otherwise, maybe make sure the qxl
> >>> vgabios file is correct (checksum and compare to upstream I guess). But it
> >>> would be bizzare if it weren't.
> >>
> >> Well, the checksums actually do differ:
> >>
> >> $ sha1sum /usr/share/qemu/vgabios-qxl.bin
> >> 480009bd0bb71248d4bd2ad23e34e803284f21d8 /usr/share/qemu/vgabios-qxl.bin
> >> $ sha1sum Pulpit/vgabios-qxl.bin
> >> 4cdecf92aace747feb9af9d61763f777b9dce7d5 Pulpit/vgabios-qxl.bin
> >>
> >> The latter is something I downloaded from qemu git. It does not seem to
> >> change anything after I use it to replace the one that came with the
> >> rpm, though. Here is the qemu spec file, looks like the package replaces
> >> the bios with something else:
> >> http://pkgs.fedoraproject.org/gitweb/?p=qemu.git;a=blob;f=qemu.spec;h=c9313a8f5dad2f44c2345fd284bf6bacfafd3ae0;hb=HEAD
> >>
> >
> > I don't think this means anything. Can you try attaching gdb to the running qemu
> > when it black screen's and giving the stacktrace for each thread?
> > thread apply all bt
> >
> > Thanks,
> >
> > Alon
>
> (gdb) thread apply all bt
>
> Thread 3 (Thread 0x7f1d6b890700 (LWP 20676)):
> #0 0x0000003db26352fd in sigtimedwait () from /lib64/libc.so.6
> #1 0x0000000000427e9f in kvm_main_loop_wait (env=0x17dfca0,
> timeout=<value optimized out>)
> at /usr/src/debug/qemu-kvm-0.13.0/qemu-kvm.c:1361
> #2 0x000000000042a8cd in kvm_main_loop_cpu (_env=0x17dfca0)
> at /usr/src/debug/qemu-kvm-0.13.0/qemu-kvm.c:1498
> #3 ap_main_loop (_env=0x17dfca0)
> at /usr/src/debug/qemu-kvm-0.13.0/qemu-kvm.c:1541
> #4 0x0000003db2e06d5b in start_thread () from /lib64/libpthread.so.0
> #5 0x0000003db26e4a7d in clone () from /lib64/libc.so.6
>
> Thread 2 (Thread 0x7f1d69e4f700 (LWP 20677)):
> #0 0x0000003db26e4fe3 in epoll_wait () from /lib64/libc.so.6
> #1 0x00000034d0031438 in red_worker_main (arg=<value optimized out>)
> at red_worker.c:10271
> #2 0x0000003db2e06d5b in start_thread () from /lib64/libpthread.so.0
> #3 0x0000003db26e4a7d in clone () from /lib64/libc.so.6
>
> Thread 1 (Thread 0x7f1d6ba9e980 (LWP 20675)):
> #0 0x0000003db26dceb3 in select () from /lib64/libc.so.6
> #1 0x00000000004196d4 in main_loop_wait (nonblocking=<value optimized out>)
> ---Type <return> to continue, or q <return> to quit---
> at /usr/src/debug/qemu-kvm-0.13.0/vl.c:1291
> #2 0x000000000042b067 in kvm_main_loop ()
> at /usr/src/debug/qemu-kvm-0.13.0/qemu-kvm.c:1710
> #3 0x000000000041a51e in main_loop (argc=<value optimized out>,
> argv=<value optimized out>, envp=<value optimized out>)
> at /usr/src/debug/qemu-kvm-0.13.0/vl.c:1343
> #4 main (argc=<value optimized out>, argv=<value optimized out>,
> envp=<value optimized out>) at /usr/src/debug/qemu-kvm-0.13.0/vl.c:3097
>
> I am not sure why glibc backtraces are not showing up, I have
> glibc-debuginfo installed here.
>
This looks like perfectly normal behavior for a qemu process (sorry, listened
to h2g2 recently). But it still does. So I'm going to ask if you can eradicate parts
of the qemu command line, or better yet do the reverse, start from the minimal
command line with -vga qxl -spice port=5920,disable-ticketing and see if it still
gives the screen. Another thing is if you can give the spicec.log file from your client,
it's at $HOME/.spicec/spicec.log.
> Julian
> >>>
> >>>>
> >>>>>>>
> >>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>> I hope this will make it more clear what I am trying to accomplish, or
> >>>>>>>>>>>>>> show where I am doing the wrong thing.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> It certainly helps, thanks for taking the time to report this.
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> No problem.
> >>>>>>>>>>>>
> >>>>>>>>>>>> Cheers,
> >>>>>>>>>>>> Julian
> >>>>>>>>>>
> >>>>>>>>
> >>>>>>
> >>>>>
> >>>>>> <domain type='kvm'>
> >>>>>> <name>windows</name>
> >>>>>> <uuid>a5a9cf48-603e-5795-ba0f-b5692ce2d93d</uuid>
> >>>>>> <memory>1048576</memory>
> >>>>>> <currentMemory>1048576</currentMemory>
> >>>>>> <vcpu>1</vcpu>
> >>>>>> <os>
> >>>>>> <type arch='x86_64' machine='fedora-13'>hvm</type>
> >>>>>> <boot dev='hd'/>
> >>>>>> </os>
> >>>>>> <features>
> >>>>>> <acpi/>
> >>>>>> <apic/>
> >>>>>> <pae/>
> >>>>>> </features>
> >>>>>> <clock offset='localtime'/>
> >>>>>> <on_poweroff>destroy</on_poweroff>
> >>>>>> <on_reboot>restart</on_reboot>
> >>>>>> <on_crash>restart</on_crash>
> >>>>>> <devices>
> >>>>>> <emulator>/usr/bin/qemu-kvm</emulator>
> >>>>>> <disk type='file' device='cdrom'>
> >>>>>> <driver name='qemu' type='raw'/>
> >>>>>> <target dev='hdc' bus='ide'/>
> >>>>>> <readonly/>
> >>>>>> <address type='drive' controller='0' bus='1' unit='0'/>
> >>>>>> </disk>
> >>>>>> <disk type='file' device='disk'>
> >>>>>> <driver name='qemu' type='raw'/>
> >>>>>> <source file='/var/lib/libvirt/images/windows.img'/>
> >>>>>> <target dev='vda' bus='virtio'/>
> >>>>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
> >>>>>> </disk>
> >>>>>> <controller type='ide' index='0'>
> >>>>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
> >>>>>> </controller>
> >>>>>> <interface type='network'>
> >>>>>> <mac address='52:54:00:6a:d1:82'/>
> >>>>>> <source network='default'/>
> >>>>>> <model type='virtio'/>
> >>>>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
> >>>>>> </interface>
> >>>>>> <serial type='pty'>
> >>>>>> <target port='0'/>
> >>>>>> </serial>
> >>>>>> <console type='pty'>
> >>>>>> <target type='serial' port='0'/>
> >>>>>> </console>
> >>>>>> <input type='tablet' bus='usb'/>
> >>>>>> <input type='mouse' bus='ps2'/>
> >>>>>> <graphics type='spice' autoport='yes'/>
> >>>>>> <sound model='ac97'>
> >>>>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
> >>>>>> </sound>
> >>>>>> <video>
> >>>>>> <model type='qxl' vram='9216' heads='1'/>
> >>>>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
> >>>>>> </video>
> >>>>>> <memballoon model='virtio'>
> >>>>>> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
> >>>>>> </memballoon>
> >>>>>> </devices>
> >>>>>> </domain>
> >>>>>
> >>>>
> >>
>
More information about the Spice-devel
mailing list