Mailing List Archive

Windows DomU: Network Issues
Hi everybody,

I am a novice Xen user. I recently started to set up my home server (file server, print server, media server, TV backend etc.) using Xen based VMs installed on a Debian 10 dom0. I mostly followed the steps laid out in https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide. The linux domUs worked like a charm right from the beginning.

I then wanted to install Windows Server 2012 on a domU for the TV backend (MediaPortal). Following the steps in the above mentioned guide, I could install the Windows system alright. I could solve most of the obvious issues (like mouse pointer off, keyboard layout not correct etc.). However, I utterly failed to get a decent network connection. Transfer speed while copying a large file from a Samba file server on one of the Debian domUs to the Windows Server 2012 domU remained around 1-3 Mbit/s. I of course installed the Windows PV drivers from https://xenproject.org/windows-pv-drivers/, tried different options in the config file, added the GplPv option to the boot options (as described in https://wiki.xenproject.org/wiki/Xen_Windows_GplPv/Installing), but nothing helped. The slow connection made it pointless to use the Windows Server DomU as a media/TV server. Also, there was a persistent error on Windows Update so I couldn't install any updates. I tried a fresh install, but with the same result. I gave up and installed VDR on another Debian DomU which works o.k.

But now it turns out my wife is not happy with the Kodi frontend, so I am forced to give Windows another try. This time, I installed Windows 10, but the results are the same (except for the Windows Update, which now works). Now I am lost. Any help for pinpointing the error and/or finding a solution (besides the obvious one, to replace my wife ;-) would be very much appreciated. Or is this in the end the maximum network speed to be expected on a HVM domU like Windows?

Further observations from Windows 10 device manager on the domU:
- There is one device without a driver (yellow triangle), the device is called XSC000 XENVIF 0
- The system devices XenServer PV Interface, XenServer PV Bus (twice), and XenServer PV Network Class seem to be installed correctly
- The NIC installed is shown as Realtek RTL8139C+ Fast Ethernet NIC

Xen config file for the Windows domU:

kernel = "/usr/lib/xen-4.0/boot/hvmloader"
type='hvm'
memory = 4096
vcpus=4
name = "windows"
vif = ['bridge=xenbr0']
disk = ['phy:/dev/vg0/windows,hda,w']
device_model_version = 'qemu-xen'
boot="c"
hdtype = 'ahci'
acpi = 1
apic = 1
xen_platform_pci = 1
vendor_device = 'xenserver'
stdvga = 1
device_model_version = 'qemu-xen'
boot = "d"
sdl = 0
pae = 1
serial = 'pty'
usb = 1
usbdevice = 'tablet'
keymap = 'de'
vnc = 1
vnclisten = "0.0.0.0"
vncpasswd = ""

xl info:

host : xxx
release : 4.19.0-14-amd64
version : #1 SMP Debian 4.19.171-2 (2021-01-30)
machine : x86_64
nr_cpus : 4
max_cpu_id : 3
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 1992.095
hw_caps : bfebfbff:77faf3ff:2c100800:00000121:0000000f:009c6fbf:00000000:00000100
virt_caps : hvm hvm_directio
total_memory : 32542
free_memory : 18773
sharing_freed_memory : 0
sharing_used_memory : 0
outstanding_claims : 0
free_cpus : 0
xen_major : 4
xen_minor : 11
xen_extra : .4
xen_version : 4.11.4
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset :
xen_commandline : placeholder dom0_mem=1024M,max:1024M xen-pciback.hide=(01:00.0)
cc_compiler : gcc (Debian 8.3.0-6) 8.3.0
cc_compile_by : pkg-xen-devel
cc_compile_domain : lists.alioth.debian.org
cc_compile_date : Fri Dec 11 21:33:51 UTC 2020
build_id : 6d8e0fa3ddb825695eb6c6832631b4fa2331fe41
xend_config_format : 4

Logs from /var/log/xen didn't show errors, but can of course be provided if needed.

Best regards,

Paul
Re: Windows DomU: Network Issues [ In reply to ]
Am Donnerstag, 6. Mai 2021, 21:47:29 CEST schrieb Paul Leiber:
> pae = 1
just shot into the dark: did not work a lot with HVM, but is your Win10 setup
really pae (not full x64)?

--
---
Niels Dettenbach
Syndicat IT & Internet
https://www.syndicat.com
PGP: https://syndicat.com/pub_key.asc
---
AW: Windows DomU: Network Issues [ In reply to ]
> Gesendet: Freitag, 7. Mai 2021 10:53
>
> Am Donnerstag, 6. Mai 2021, 21:47:29 CEST schrieb Paul Leiber:
> > pae = 1
> just shot into the dark: did not work a lot with HVM, but is your Win10 setup
> really pae (not full x64)?

Windows version ix x86. I commented that out, no improvement in network connection speed.

Thank you anyway!

Paul
Re: Windows DomU: Network Issues [ In reply to ]
On Thu, May 06, 2021 at 07:47:29PM +0000, Paul Leiber wrote:
> Hi everybody,
>
> I am a novice Xen user. I recently started to set up my home server (file server, print server, media server, TV backend etc.) using Xen based VMs installed on a Debian 10 dom0. I mostly followed the steps laid out in https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide. The linux domUs worked like a charm right from the beginning.
>
> I then wanted to install Windows Server 2012 on a domU for the TV backend (MediaPortal). Following the steps in the above mentioned guide, I could install the Windows system alright. I could solve most of the obvious issues (like mouse pointer off, keyboard layout not correct etc.). However, I utterly failed to get a decent network connection. Transfer speed while copying a large file from a Samba file server on one of the Debian domUs to the Windows Server 2012 domU remained around 1-3 Mbit/s. I of course installed the Windows PV drivers from https://xenproject.org/windows-pv-drivers/, tried different options in the config file, added the GplPv option to the boot options (as described in https://wiki.xenproject.org/wiki/Xen_Windows_GplPv/Installing), but nothing helped. The slow connection made it pointless to use the Windows Server DomU as a media/TV server. Also, there was a persistent error on Windows Update so I couldn't install any updates. I tried a fresh install, but with the same result. I gave up and installed VDR on another Debian DomU which works o.k.

It is a while since I spun up a Windows VM but I vaguely remember having to disable checksum offloading in the guest to solve some performance issues... From what I can find "IPv4 Checksum Offload", "UDP Checksum Offload (IPv4)" and "TCP Checksum Offload (IPv4)" specifically. There are similar IPv6 settings if you have that enabled.

James

>
> But now it turns out my wife is not happy with the Kodi frontend, so I am forced to give Windows another try. This time, I installed Windows 10, but the results are the same (except for the Windows Update, which now works). Now I am lost. Any help for pinpointing the error and/or finding a solution (besides the obvious one, to replace my wife ;-) would be very much appreciated. Or is this in the end the maximum network speed to be expected on a HVM domU like Windows?
>
> Further observations from Windows 10 device manager on the domU:
> - There is one device without a driver (yellow triangle), the device is called XSC000 XENVIF 0
> - The system devices XenServer PV Interface, XenServer PV Bus (twice), and XenServer PV Network Class seem to be installed correctly
> - The NIC installed is shown as Realtek RTL8139C+ Fast Ethernet NIC
>
> Xen config file for the Windows domU:
>
> kernel = "/usr/lib/xen-4.0/boot/hvmloader"
> type='hvm'
> memory = 4096
> vcpus=4
> name = "windows"
> vif = ['bridge=xenbr0']
> disk = ['phy:/dev/vg0/windows,hda,w']
> device_model_version = 'qemu-xen'
> boot="c"
> hdtype = 'ahci'
> acpi = 1
> apic = 1
> xen_platform_pci = 1
> vendor_device = 'xenserver'
> stdvga = 1
> device_model_version = 'qemu-xen'
> boot = "d"
> sdl = 0
> pae = 1
> serial = 'pty'
> usb = 1
> usbdevice = 'tablet'
> keymap = 'de'
> vnc = 1
> vnclisten = "0.0.0.0"
> vncpasswd = ""
>
> xl info:
>
> host : xxx
> release : 4.19.0-14-amd64
> version : #1 SMP Debian 4.19.171-2 (2021-01-30)
> machine : x86_64
> nr_cpus : 4
> max_cpu_id : 3
> nr_nodes : 1
> cores_per_socket : 4
> threads_per_core : 1
> cpu_mhz : 1992.095
> hw_caps : bfebfbff:77faf3ff:2c100800:00000121:0000000f:009c6fbf:00000000:00000100
> virt_caps : hvm hvm_directio
> total_memory : 32542
> free_memory : 18773
> sharing_freed_memory : 0
> sharing_used_memory : 0
> outstanding_claims : 0
> free_cpus : 0
> xen_major : 4
> xen_minor : 11
> xen_extra : .4
> xen_version : 4.11.4
> xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
> xen_scheduler : credit
> xen_pagesize : 4096
> platform_params : virt_start=0xffff800000000000
> xen_changeset :
> xen_commandline : placeholder dom0_mem=1024M,max:1024M xen-pciback.hide=(01:00.0)
> cc_compiler : gcc (Debian 8.3.0-6) 8.3.0
> cc_compile_by : pkg-xen-devel
> cc_compile_domain : lists.alioth.debian.org
> cc_compile_date : Fri Dec 11 21:33:51 UTC 2020
> build_id : 6d8e0fa3ddb825695eb6c6832631b4fa2331fe41
> xend_config_format : 4
>
> Logs from /var/log/xen didn't show errors, but can of course be provided if needed.
>
> Best regards,
>
> Paul
>
AW: Windows DomU: Network Issues [ In reply to ]
> Von: Xen-users <xen-users-bounces@lists.xenproject.org> Im Auftrag von
> Paul Leiber
> Gesendet: Donnerstag, 6. Mai 2021 21:47
>
> Also, there was a persistent error on
> Windows Update so I couldn't install any updates.

Solution: This issue was totally unrelated to Xen, it is a Windows Update issue. I needed to manually download and install update KB2937636 (https://www.microsoft.com/de-DE/download/details.aspx?id=43434).

> Further observations from Windows 10 device manager on the domU:
> - There is one device without a driver (yellow triangle), the device is called
> XSC000 XENVIF 0
> - The system devices XenServer PV Interface, XenServer PV Bus (twice), and
> XenServer PV Network Class seem to be installed correctly
> - The NIC installed is shown as Realtek RTL8139C+ Fast Ethernet NIC

Solution: It turned out that I had to manually install the drivers for the unknown devices, (in device manager, select to install driver from disk, then select one of the pv drivers). In this way, I got both Windows Server 2012 and Windows 10 working. I had to use trial and error to find the correct setup, but most stuff seems to work fine. The network speed is more than sufficient. I didn't even need to disable checksum offloading.

The PCI passthrough device seems to get lest in the domU, but that seems to be a different matter (IRQ conflict?) which I will try to follow up in the next steps.

Thanks everybody,

Paul
AW: Windows DomU: Network Issues [ In reply to ]
> Von: James Dingwall <james-xen@dingwall.me.uk>
> Gesendet: Montag, 10. Mai 2021 10:41
>
> On Thu, May 06, 2021 at 07:47:29PM +0000, Paul Leiber wrote:
> > Hi everybody,
> >
> > I am a novice Xen user. I recently started to set up my home server (file
> server, print server, media server, TV backend etc.) using Xen based VMs
> installed on a Debian 10 dom0. I mostly followed the steps laid out in
> https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide. The linux
> domUs worked like a charm right from the beginning.
> >
> > I then wanted to install Windows Server 2012 on a domU for the TV
> backend (MediaPortal). Following the steps in the above mentioned guide, I
> could install the Windows system alright. I could solve most of the obvious
> issues (like mouse pointer off, keyboard layout not correct etc.). However, I
> utterly failed to get a decent network connection. Transfer speed while
> copying a large file from a Samba file server on one of the Debian domUs to
> the Windows Server 2012 domU remained around 1-3 Mbit/s. I of course
> installed the Windows PV drivers from https://xenproject.org/windows-pv-
> drivers/, tried different options in the config file, added the GplPv option to
> the boot options (as described in
> https://wiki.xenproject.org/wiki/Xen_Windows_GplPv/Installing), but
> nothing helped. The slow connection made it pointless to use the Windows
> Server DomU as a media/TV server. Also, there was a persistent error on
> Windows Update so I couldn't install any updates. I tried a fresh install, but
> with the same result. I gave up and installed VDR on another Debian DomU
> which works o.k.
>
> It is a while since I spun up a Windows VM but I vaguely remember having to
> disable checksum offloading in the guest to solve some performance issues...
> From what I can find "IPv4 Checksum Offload", "UDP Checksum Offload
> (IPv4)" and "TCP Checksum Offload (IPv4)" specifically. There are similar IPv6
> settings if you have that enabled.

As I have written in my reply to my own message, after manually installing the correct drivers, network speed is more than sufficient. I therefore didn't change any checksum offload options, so I can't really say anything about the effect of the respective settings.

Thank you anyhow!

Paul
Re: AW: Windows DomU: Network Issues [ In reply to ]
On 2021-05-10 1:55 p.m., Paul Leiber wrote:
>> Von: Xen-users<xen-users-bounces@lists.xenproject.org> Im Auftrag von
>> Paul Leiber
>> Gesendet: Donnerstag, 6. Mai 2021 21:47
>>
>> Also, there was a persistent error on
>> Windows Update so I couldn't install any updates.
> Solution: This issue was totally unrelated to Xen, it is a Windows Update issue. I needed to manually download and install update KB2937636 (https://www.microsoft.com/de-DE/download/details.aspx?id=43434).
>
>> Further observations from Windows 10 device manager on the domU:
>> - There is one device without a driver (yellow triangle), the device is called
>> XSC000 XENVIF 0
>> - The system devices XenServer PV Interface, XenServer PV Bus (twice), and
>> XenServer PV Network Class seem to be installed correctly
>> - The NIC installed is shown as Realtek RTL8139C+ Fast Ethernet NIC
> Solution: It turned out that I had to manually install the drivers for the unknown devices, (in device manager, select to install driver from disk, then select one of the pv drivers). In this way, I got both Windows Server 2012 and Windows 10 working. I had to use trial and error to find the correct setup, but most stuff seems to work fine. The network speed is more than sufficient. I didn't even need to disable checksum offloading.
>
> The PCI passthrough device seems to get lest in the domU, but that seems to be a different matter (IRQ conflict?) which I will try to follow up in the next steps.
>
> Thanks everybody,
>
> Paul
>
Glad to hear you got it sorted.

The Beginner's Guide could use an update in spots. If you noticed
anything in particular I'd appreciate hearing about it. I did some
editing on the page last year and planned to make a few more
improvements but got caught up in other things.  At a quick glance, I
can see some things could be fixed up, like what the windows.cfg file
should look like once Windows has completed installation.

I'm no xen-pert but a couple of things in your cfg file made me wonder a
bit. Is it a combination of two files or is half of it meant to be
commented out? For example you have repeats of "boot=" and
"device_model_version = " and I'm pretty sure you don't need/want the
"kernel=" line once installation is complete.

I also suggest you have a look at SPICE (see
https://wiki.xenproject.org/wiki/SPICE_support_in_Xen and
www.spice-space.org) and consider using it in place of vnc. At least on
my system, it does a better job of mouse handling, USB passthrough and
video performance generally.

David
AW: AW: Windows DomU: Network Issues [ In reply to ]
> Von: Xen-users <xen-users-bounces@lists.xenproject.org> Im Auftrag von
> David Hill
> Gesendet: Mittwoch, 12. Mai 2021 23:45
>
> On 2021-05-10 1:55 p.m., Paul Leiber wrote:
> >> Von: Xen-users<xen-users-bounces@lists.xenproject.org> Im Auftrag
> von
> >> Paul Leiber
> >> Gesendet: Donnerstag, 6. Mai 2021 21:47
> >>
> >> Further observations from Windows 10 device manager on the domU:
> >> - There is one device without a driver (yellow triangle), the device is called
> >> XSC000 XENVIF 0
> >> - The system devices XenServer PV Interface, XenServer PV Bus (twice),
> and
> >> XenServer PV Network Class seem to be installed correctly
> >> - The NIC installed is shown as Realtek RTL8139C+ Fast Ethernet NIC
> > Solution: It turned out that I had to manually install the drivers for the
> unknown devices, (in device manager, select to install driver from disk, then
> select one of the pv drivers). In this way, I got both Windows Server 2012 and
> Windows 10 working. I had to use trial and error to find the correct setup, but
> most stuff seems to work fine. The network speed is more than sufficient. I
> didn't even need to disable checksum offloading.
> >
> >
> Glad to hear you got it sorted.
>
> The Beginner's Guide could use an update in spots. If you noticed
> anything in particular I'd appreciate hearing about it. I did some
> editing on the page last year and planned to make a few more
> improvements but got caught up in other things.  At a quick glance, I
> can see some things could be fixed up, like what the windows.cfg file
> should look like once Windows has completed installation.

Sounds like a good idea! I gladly will try to sum up my experience to help you.

I just checked the howto again, it seems mostly pretty good to me. It helped me to set up the Xen system very well without a lot of knowledge, at least the PV guest part. Even the HVM section worked insofar as the Windows installation generally worked. The only real issues that I had was that (1) I needed to enable usbdevice = 'tablet' or the mouse pointer would be off in VNCViewer and that (2) the keyboard layout was not correct (it took me quite some time to figure out why I couldn't login via Windows Remotedesktop after finalizing the installation in VNCViewer: The password I entered in Remotedesktop was not correct because the keymap in VNCViewer was partly wrong, hence I entered a password during installation that didn't match the intended password). These two parts could be adapted. However, I don't know if instead adapting the howto to using SPICE would make these changes unnecessary (see your comment below)?

What really was outdated was the section on the PV drivers for windows (as well as other sites in the wiki, e. g. https://wiki.xenproject.org/wiki/Xen_Windows_GplPv/Installing, which seems to be completely obsolete). Here, a link to the Xen Project site https://xenproject.org/windows-pv-drivers/ would be helpful instead of the outdated links in the howto. Also, a comment that installation of some of the drivers needs to be done manually (as loosely described by me above) in the Windows device manager would have saved me a lot of time. Additionally, a note on how to switch off driver signature checking in Windows would help as long as the drivers are not signed.

BTW, should my experience with the Windows PV drivers be mentioned to the driver developers somehow? I guess it should be possible to make an automatic install work again, and there seems to be active development on the drivers?

> I'm no xen-pert but a couple of things in your cfg file made me wonder a
> bit. Is it a combination of two files or is half of it meant to be
> commented out? For example you have repeats of "boot=" and
> "device_model_version = " and I'm pretty sure you don't need/want the
> "kernel=" line once installation is complete.

Yes, you are right, there are duplicate entries stemming from copy-pasting. I corrected that, the file now looks like this:

kernel = "/usr/lib/xen-4.0/boot/hvmloader"
type='hvm'
memory = 4096
vcpus=4
name = "windows"
vif = ['bridge=xenbr0']
disk = ['phy:/dev/vg0/windows,hda,w']
device_model_version = 'qemu-xen'
boot="c"
hdtype = 'ahci'
acpi = 1
apic = 1
xen_platform_pci = 1
vendor_device = 'xenserver'
stdvga = 1
sdl = 0
serial = 'pty'
usb = 1
usbdevice = 'tablet'
keymap = 'de'
vnc = 1
vnclisten = "0.0.0.0"
vncpasswd = ""

To be honest, I played around with the config file (trial and error, with some documentation reading) until it seemed to work. I don't know the exact meaning of some of these entries (e.g. sdl, kernel). For example, there was another reply to my initial message regarding the pae option which I took out of the config file without any noticable effect. The official documentation (e.g. https://xenbits.xen.org/docs/unstable/man/xl.cfg.5.html#Direct-Kernel-Boot) is not easy to understand for me in some parts. I would appreciate it if you could explain (or point out the part in the documentation) if you would advise to make further changes in the cfg?

> I also suggest you have a look at SPICE (see
> https://wiki.xenproject.org/wiki/SPICE_support_in_Xen and
> www.spice-space.org) and consider using it in place of vnc. At least on
> my system, it does a better job of mouse handling, USB passthrough and
> video performance generally.

Thank you for this hint, I will try this out next time!
AW: AW: Windows DomU: Network Issues [ In reply to ]
> Von: Xen-users <xen-users-bounces@lists.xenproject.org> Im Auftrag von
> David Hill
> Gesendet: Mittwoch, 12. Mai 2021 23:45

> I also suggest you have a look at SPICE (see
> https://wiki.xenproject.org/wiki/SPICE_support_in_Xen and
> www.spice-space.org) and consider using it in place of vnc. At least on
> my system, it does a better job of mouse handling, USB passthrough and
> video performance generally.

I got SPICE up and running in the meantime, it indeed works much better than VNC. Thank you for the hint!

If you are still looking for improvements for the how-to: It took me quite some time to figure out that I need to enter the IP address of the Dom0 in the Remote Viewer and not the address of the DomU. Adding that piece of information could help other people save time.

Take care,

Paul