1

I'm running a Debian Jessie machine with kvm and libvirt installed. Linux guests are working fine but I have some problems to get a windows machine running. I do not have any GUI installed. So the setup is made through virt-install.

Here is the command for creating the guest:

virt-install \
--name=win1 \
--memory 2048 \
--os-type=windows \
--os-variant=win2k8 \
--network bridge=br0 \
--disk pool=data,size=8 \
--cdrom /data/windows.iso \
--graphics vnc,password=testpw

I can start the vnc session. I also see the windows setup loading files. But after booting, I only get a black screen. I have already tried it with spice but it's also not working.

Probably, there is a problem with emulating the graphics?

Any ideas where the problem is?

Update 30/09/2016

I just tried the virt-manager to create a windows guest and everything works fine. So i wondered what's the difference between my own virt-install command and the command executed by virt-manager. I have compared the guest logfile located at /var/log/libvirt/qemu/win1.log

Full CMD form virt-manager:

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=spice /usr/bin/kvm -name win2k8 -S -machine pc-i440fx-2.1,accel=kvm,usb=off -cpu Opteron_G4 -m 4096 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 9fd58d92-1926-4df3-8ec5-c8f2d5ebe358 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win2k8.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-reboot -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/data/vserver/win2k8.qcow2,if=none,id=drive-ide0-0-0,format=qcow2 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/data/windows.iso,if=none,id=drive-ide0-0-1,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=1 -netdev tap,fd=24,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:65:f8:d8,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -chardev spicevmc,id=charredir2,name=usbredir -device usb-redir,chardev=charredir2,id=redir2 -chardev spicevmc,id=charredir3,name=usbredir -device usb-redir,chardev=charredir3,id=redir3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on

Full CMD form virt-install:

LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin QEMU_AUDIO_DRV=spice /usr/bin/kvm -name win2k8 -S -machine pc-i440fx-2.1,accel=kvm,usb=off -cpu Opteron_G4 -m 4096 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 4513688e-f1ef-4bad-a0db-b7c0d3e0f6ea -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/win2k8.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-reboot -boot strict=on -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x5.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x5 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x5.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x5.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x6 -drive file=/data/vserver/win2k8.qcow2,if=none,id=drive-ide0-0-0,format=qcow2 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -drive file=/data/windows.iso,if=none,id=drive-ide0-0-1,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=1,drive=drive-ide0-0-1,id=ide0-0-1,bootindex=1 -netdev tap,fd=25,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:d8:52:9d,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=0.0.0.0,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -chardev spicevmc,id=charredir2,name=usbredir -device usb-redir,chardev=charredir2,id=redir2 -chardev spicevmc,id=charredir3,name=usbredir -device usb-redir,chardev=charredir3,id=redir3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on

There are two differences:

Difference 1:
virt-manager: -netdev tap,fd=24,id=hostnet0
virt-install: -netdev tap,fd=25,id=hostnet0

Difference 2:
virt-manager: -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1
virt-install: (missing)

What are these options?

2
  • Maybe try specifying a video card, such as --video=vga. On my older install, --video=qxl worked but I've never tried with 2K8. Sep 16, 2016 at 12:37
  • I've also tried it with other ISOs. Unfortunately, --video=vga and --video=qxl are not working. It's still the same problem.
    – Vince
    Sep 16, 2016 at 13:51

1 Answer 1

0

Don't use virtio devices without their drivers for Windows. By start you can try install Windows on that VM:

virt-install \
--name=win1 \
--memory 2048 \
--os-type=windows \
--os-variant=win2k8 \
--network bridge=br0,model=e1000 \
--disk pool=data,size=8,bus=ide \
--cdrom /data/windows.iso \
--video=vga \
--graphics vnc,password=testpw

You can try install VM on virtio devices, but you have to add virtio drivers to windows at srart of Windows installation.

Drivers you can get from http://www.linux-kvm.org/page/WindowsGuestDrivers/Download_Drivers

2
  • I assume, the drivers can be loaded through the windows setup. But I even can't get until the setup. After the boot process, I only get a black screen.
    – Vince
    Sep 21, 2016 at 6:01
  • After installing KVM on Fedora instead of Debian, it is working. I used the same command and it's properly working. That's strange..
    – Vince
    Sep 21, 2016 at 6:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .