Skip to contentSkip to conversation

windows 2008 "falling asleep" under KVM

DISCUSSION Nikola Ciprich 3 participants 15 messages Jul 11, 2013 – Jul 18, 2013 KVM

lore
Share & tools
lore
#0 lore raw

Hello,

I'm trying to solve strange issue with windows2008 VM under KVM. It seems to be somehow "falling asleep" after some time, becoming unreachable over network. However connecting to qemu VNC immediately makes windows reachable again...

I wonder whether this is the same issue?

http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02278.html

I've tried disabling HPET, same result. I'm using qemu-kvm 1.4.0, seabios 1.7.2.2, kernel 3.0.82 with kvm-kmod-3.8, x86_64 centos6.

Any idea what should I check?

Thanks a lot in advance

with best regards

nikola ciprich

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#1 lore raw
Quoted 9 lines · Nikola Ciprich

Hello,

I'm trying to solve strange issue with windows2008 VM under KVM. It seems to be somehow "falling asleep" after some time, becoming unreachable over network. However connecting to qemu VNC immediately makes windows reachable again...

I wonder whether this is the same issue?

Quoted 9 lines

http://lists.nongnu.org/archive/html/qemu-devel/2013-03/msg02278.html

I've tried disabling HPET, same result. I'm using qemu-kvm 1.4.0, seabios 1.7.2.2, kernel 3.0.82 with kvm-kmod-3.8, x86_64 centos6.

Any idea what should I check?

Thanks a lot in advance

Is Window configured to suspend itself after a timeout?

--
Gleb.

#2 lore raw

Hello Gleb,

well, I'm not windows expert at all, but it shouldn't be. same instalation on different host works without problem... what could be worth noting is that CPU usage of qemu process drops to zero when this happens, otherwise windows guests eat quite a lot of CPU time even when "idle". Maybe I should somehow check what the process is doing? (how?)

BR

nik

Quoted 5 lines

Is Window configured to suspend itself after a timeout?

--
Gleb.

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#3 lore raw
Quoted 4 lines · Nikola Ciprich

Hello Gleb,

well, I'm not windows expert at all, but it shouldn't be. same instalation on different host works without problem...

AFAIK this is default Windows2008 behaviour in case S3 is supported by the platform. But KVM supports S3 for Windows2008 guests only with QXL display, so this raises the question: what is qemu command line on the machine that it happens to and on the host where it does not happen.

Quoted 4 lines

what could be worth noting is that CPU usage of qemu process drops to zero when this happens, otherwise windows guests eat quite a lot of CPU time even when "idle". Maybe I should somehow check what the process is doing? (how?)

That does look like S3 suspend. Can you run "info status" command on qemu monitor when it happens?

--
Gleb.

#4 lore raw
Quoted 4 lines

AFAIK this is default Windows2008 behaviour in case S3 is supported by the platform. But KVM supports S3 for Windows2008 guests only with QXL display, so this raises the question: what is qemu command line on the machine that it happens to and on the host where it does not happen.

machine with the problem:
/usr/bin/qemu-system-x86_64 -machine accel=kvm -name vmtop09 -S -machine pc-i440fx-1.4,accel=kvm,usb=off -m 4096 -smp 1,sockets=1,cores=1,threads=1 -uuid 1a858074-e30d-11e2-b1d7-002590968776 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vmtop09.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-hpet -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/dev/vgshared/vmtop09-1,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=18,id=hostnet0,vhost=on,vhostfd=25 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:16:3e:18:09:00,bus=pci.0,addr=0x3 -device usb-tablet,id=input0 -vnc 0.0.0.0:24109 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

macine without the problem:
(please note that there's currently newer qemu there, but it was OK even with 1.4.0)

/usr/bin/qemu-system-x86_64 -machine accel=kvm -name vmwts02 -S -machine pc-i440fx-1.5,accel=kvm,usb=off -m 4096 -smp 1,sockets=1,cores=1,threads=1 -uuid 1e501300-dc48-11df-a690-00304834195b -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vmwts02.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/dev/vgshared/vmwts02-1,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw,cache=none -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=27,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:16:3e:61:01:00,bus=pci.0,addr=0x3 -device usb-tablet,id=input0 -vnc 0.0.0.0:30802 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

Quoted 2 lines

That does look like S3 suspend. Can you run "info status" command on qemu monitor when it happens?

I'll check, however I don't have it in this state atm, so I'll report in few hours..

BR

nik

Quoted 5 lines

--
Gleb.

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#5 lore raw
Quoted 7 lines · Nikola Ciprich
Quoted 4 lines

AFAIK this is default Windows2008 behaviour in case S3 is supported by the platform. But KVM supports S3 for Windows2008 guests only with QXL display, so this raises the question: what is qemu command line on the machine that it happens to and on the host where it does not happen.

machine with the problem:
/usr/bin/qemu-system-x86_64 -machine accel=kvm -name vmtop09 -S -machine pc-i440fx-1.4,accel=kvm,usb=off -m 4096 -smp 1,sockets=1,cores=1,threads=1 -uuid 1a858074-e30d-11e2-b1d7-002590968776 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vmtop09.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-hpet -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/dev/vgshared/vmtop09-1,if=none,id=drive-virtio-disk0,format=raw,cache=none -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev tap,fd=18,id=hostnet0,vhost=on,v

hostfd=25 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:16:3e:18:09:00,bus=pci.0,addr=0x3 -device usb-tablet,id=input0 -vnc 0.0.0.0:24109 -vga cirrus -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

Quoted 1 line

This is cirrus, not qxl. This makes my S3 theory to be highly unlikely.

--
Gleb.

#6 lore raw
Quoted 1 line

This is cirrus, not qxl. This makes my S3 theory to be highly unlikely.

OK, finally I got it hung again:

virsh # qemu-monitor-command vmtop09 --hmp "info status" VM status: running

nik

Quoted 8 lines

--
Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#7 lore raw
Quoted 7 lines · Nikola Ciprich
Quoted 1 line

This is cirrus, not qxl. This makes my S3 theory to be highly unlikely.

OK, finally I got it hung again:

virsh # qemu-monitor-command vmtop09 --hmp "info status" VM status: running

So confirmed, this is not S3, but still possible that Windows disabled the device to save power. Can you try do the following steps and see if it helps (they are for windows 7 but 8 should be similar)

Disable device powersave:
- Control Panel -> Network & Internet -> Network Connections
- Right-click on desired interface, and select "Properties"
- Click the "Configure" button on the interface properties
- Under the "Advanced" tab, look for power-saving related options and set to "Disabled"
- Under the "Power Management" tab, uncheck "Allow computer to turn off this device to save power"
- Save & Reboot

In addition:
- Control Panel -> Hardware & Sound -> Power Options
- Select "High performance"
- By the selected power profile, select "Change Plan Settings"
- In the "Edit Plan Settings", select "Change advanced power settings"
- See if there is something relevant to network connection there and if yes change it to not sleep
- Save & Reboot

--
Gleb.

#8 lore raw

Hello Gleb,

please note, it's windows 2008, not windows8, not sure whether there's some significant difference, though..

Quoted 9 lines

Disable device powersave:
- Control Panel -> Network & Internet -> Network Connections
- Right-click on desired interface, and select "Properties"
- Click the "Configure" button on the interface properties
- Under the "Advanced" tab, look for power-saving related options and set to "Disabled"
- Under the "Power Management" tab, uncheck "Allow computer to turn off this device to save power"
- Save & Reboot

I forgot to mention that, I'm using virtio network driver, and it doesn't seem to support any power managemt (which is not surprising I guess)

Quoted 3 lines

In addition:
- Control Panel -> Hardware & Sound -> Power Options

there's no sound card there..

Quoted 1 line

- Select "High performance"

done already.

Quoted 4 lines

- By the selected power profile, select "Change Plan Settings"
- In the "Edit Plan Settings", select "Change advanced power settings"
- See if there is something relevant to network connection there and if yes change it to not sleep

everything was already disabled...

Quoted 1 line

- Save & Reboot

maybe I should try using realtek network device instead of virtio?

BR

nik

Quoted 5 lines

--
Gleb.

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#9 lore raw
Quoted 5 lines · Nikola Ciprich

Hello Gleb,

please note, it's windows 2008, not windows8, not sure whether there's some significant difference, though..

Heh, indeed. I wonder where I get this windows8 thing from. Windows 2008 is a server OS so much less tuned to save power, so probably it is not power related after all.

Quoted 16 lines
Quoted 9 lines

Disable device powersave:
- Control Panel -> Network & Internet -> Network Connections
- Right-click on desired interface, and select "Properties"
- Click the "Configure" button on the interface properties
- Under the "Advanced" tab, look for power-saving related options and set to "Disabled"
- Under the "Power Management" tab, uncheck "Allow computer to turn off this device to save power"
- Save & Reboot

I forgot to mention that, I'm using virtio network driver, and it doesn't seem to support any power managemt (which is not surprising I guess)

Quoted 1 line
Quoted 3 lines
Quoted 2 lines

In addition:
- Control Panel -> Hardware & Sound -> Power Options

there's no sound card there..

It is sound and _hardware_ not sure why MS separated sound from HW :)

Quoted 8 lines
Quoted 2 lines

- Select "High performance"

done already.

Quoted 4 lines

- By the selected power profile, select "Change Plan Settings"
- In the "Edit Plan Settings", select "Change advanced power settings"
- See if there is something relevant to network connection there and if yes change it to not sleep

Quoted 6 lines

everything was already disabled...

Quoted 1 line

- Save & Reboot

maybe I should try using realtek network device instead of virtio?

Try it and see if it changes anything. When you say it becomes unreachable over network what does it mean? Network share disappears or you could ping it before but cannot any more?

--
Gleb.

#10 lore raw

Hi,

Quoted 1 line

It is sound and _hardware_ not sure why MS separated sound from HW :)

OK, I'll check it

Quoted 3 lines

Try it and see if it changes anything. When you say it becomes unreachable over network what does it mean? Network share disappears or you could ping it before but cannot any more?

OK, I'll report the results. unreachable means I'm not even able to ping it unless I open VNC connection which causes "waking" the machine..

we'll see whether changing network device changes something..

so far thanks for Your time!

BR

nik

Quoted 4 lines

--
Gleb.

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#11 lore raw

Does the host system support constant_tsc? Check /proc/cpuinfo. It could be that too many ticks are being lost in the guest.

-Peter

Quoted 23 lines · Nikola Ciprich

Hi,

Quoted 1 line

It is sound and _hardware_ not sure why MS separated sound from HW :)

OK, I'll check it

Quoted 3 lines

Try it and see if it changes anything. When you say it becomes unreachable over network what does it mean? Network share disappears or you could ping it before but cannot any more?

OK, I'll report the results. unreachable means I'm not even able to ping it unless I open VNC connection which causes "waking" the machine..

we'll see whether changing network device changes something..

so far thanks for Your time!

BR

nik

Quoted 3 lines

--
Gleb.

#12 lore raw
Quoted 3 lines · Peter Kieser

Does the host system support constant_tsc? Check /proc/cpuinfo. It could be that too many ticks are being lost in the guest.

Window2008 will not use TSC as a time source while running as a guest.

Quoted 28 lines

-Peter

Quoted 23 lines · Nikola Ciprich

Hi,

Quoted 1 line

It is sound and _hardware_ not sure why MS separated sound from HW :)

OK, I'll check it

Quoted 3 lines

Try it and see if it changes anything. When you say it becomes unreachable over network what does it mean? Network share disappears or you could ping it before but cannot any more?

OK, I'll report the results. unreachable means I'm not even able to ping it unless I open VNC connection which causes "waking" the machine..

we'll see whether changing network device changes something..

so far thanks for Your time!

BR

nik

Quoted 3 lines

--
Gleb.

--
Gleb.

#13 lore raw

Hi,

just to let You know, with realtek instead of virtio-net, it seems to be reachable for almost three days.. I'd give it another day, then we can be pretty sure it's virtio related...

BR

nik

Signature · 13 lines
-------------------------------------
Ing. Nikola CIPRICH
LinuxBox.cz, s.r.o.
28.rijna 168, 709 00 Ostrava

tel.:   +420 591 166 214
fax:    +420 596 621 273
mobil:  +420 777 093 799
www.linuxbox.cz

mobil servis: +420 737 238 656
email servis: [email protected]
-------------------------------------
#14 lore raw
Quoted 6 lines · Nikola Ciprich

Hi,

just to let You know, with realtek instead of virtio-net, it seems to be reachable for almost three days.. I'd give it another day, then we can be pretty sure it's virtio related...

Thanks. Interesting. Copying virtio-net expert.

--
Gleb.