Implementing SR-IOv failover for Windows guests during live migration

Yan Vugenfirer
Yan VugenfirerCEO at Daynix Computing LTD
Implementing SR-IOV Failover for
Windows Guests During Migration
Annie Li - Principal Software Engineer, Oracle
Yan Vugenfirer - CEO, Daynix
http://github.com/virtio-win/
Agenda
• Virtio-win drivers
• Windows guest terminology
• The problem
• Different solutions
• Failover solution with virtio-net on Windows
guest
• Upstream: https://github.com/virtio-win/kvm-guest-
drivers-windows/
• Drivers for the major virtio devices:
• virtio-net
• virtio-blk, virtio-scsi
• virtio-balloon, virtio-serial, virtio-vsock, virtio-input,
virtio-rng
• Panic, fw-cfg
• INF files (pci-serial, sm-bus on Q35)
Drivers for Windows
• WDF drivers for the “simple” devices
• Miniport architecture for network and
storage
• NDIS
• Storport
• Scsiport
VirtIO Drivers for Windows
• Supported OS
• Windows XP, Vista, 7, 8, 8.1, 10 (up to
recent builds)
• Widows Server 2003, 2008, 2008R2,
2012, 2012R2, 2016, 2019
VirtIO Drivers for Windows
• Send PRs - https://github.com/virtio-
win/kvm-guest-drivers-windows/
pulls
• Code changes should pass WHQL
• We are running WHQL CI on
upstream (HCK-CI)
How to Contribute
Contributors
• And others
NDIS (Network Driver Interface Specification) Architecture
NotifyObject
Network	
configuration	
subsystem
HW	device HW	device
Protocol	drivers	
Protocol	
Driver
Miniport	Drivers
Network	Device
Miniport	driver
Miniport	edge
Protocol	edge
Intermediate	
drivers
	Protocol	driver
Intermediate	driver
	Protocol	driver
Miniport	driver
NDIS
User	space
• NDIS miniport driver
• Basic driver package:
• INF file – installation description
• SYS file – driver binary
• PDB file – symbols for debugging
• CAT file - package digital signature
Virtio-net (NetKVM) Driver for Windows
The Problem – Live Migration and SR-IOV
Overview of SR-IOV Migration Solutions
• Previous efforts and vendor specific HW
solutions
• Hyper-V and Windows
• Linux and VirtIO
Previous Efforts
• KVM Forum 2015 Live Migration with SR-IOV
Pass-through - Weidong Han, Huawei
• KVM Forum 2018 - Live Migration Support for
GPU with SR-IOV - Zheng Xiao, Alibaba
Cloud; Jerry Jiang & Ken Xue, AMD
• KVM Forum 2020 (parallel session) - Device
Keepalive State for Local Live Migration and
VMM Fast Restart - Jason Zeng, Intel
Overview of Software Solutions
• Windows NIC Teaming
• Windows MUX Intermediate driver
• Hyper-V Solution
Windows NIC Teaming
• Similar to bond in Linux
• Provides failover capability
• Configured through GUI or Powershell
Cmdlets in user space
Windows MUX Intermediate Driver
• Kernel space solution with various models
• One-to-two model for SR-IOV live
migration
Windows MUX Intermediate Driver
TCPIP
VF	miniport	
driver
					
NotifyObject
Open	Adapter1 Open	Adapter2
Network	
configuration	
subsystem
VirtIO	network	
device
Virtual	Function	
network	device
Protocol	driver	
Protocol	
Driver
Miniport	Driver
Network	Device
Virtual	Adapter
NetKVM
Miniport	edge
Protocol	edge
One-to-Two	MUX	
Intermediate	
Driver
Internal	Binding
Other	Protocols
ndisndis
ndis
ndis
ndis
• Netkvm	is	Open	Source	driver	code	for	VirtIO	network	 • VF	miniport	driver	is	provided	by	vendor
NDIS(Kernel	Space)
User	space
Network Binding of NIC Teaming or MUX
Hyper-V VM Network
• Network virtual service client(NetVSC )
• Synthetic data path
• SR-IOV data path
• Two Installation files(INF)
• Share same driver binary
Hyper-V SR-IOV VF Failover
TCPIP Other	
Protocols
VF	Miniport	
Driver
					Hyper-V	NetVSC	Driver
Hyper-V	NetVSC	
Miniport	Driver
Hyper-V	NetVSC	
Protocol	Driver
Miniport	Driver 1:1	
binding
Hyper-V	Virtual	
Network	Device
Virtual	Function	
Device
Virtual	Network	
Device
Protocol	Driver	
Protocol	
Driver
ndisvf
ndisvf
• No	Bond/Teaming	
• No	NotifyObject	
• No	new	Virtual	Adapter
NDIS(Kernel	space)
Network Binding in Hyper-V
Comparison Summary
• MUX Driver model:
• Complicated, New virtual adapter,
Restore offload, NotifyObject.
• Hyper-V model:
• Simplified, Appropriate for Hyper-V
• 2-netdev model in KVM
Windows Network of VirtIO and VF
TCPIP Other	Protocols
VF	Miniport	
Driver
NetKVM	
Miniport	Driver
VirtIO	Network	
Device
Virtual	Function	
Device
Protocol	Driver
Miniport	Driver
Virtual	Network	
Device
ndis
ndis
NDIS(Kernel	sapce)
TCPIP Other	Protocols
VF	Miniport	
Driver
					VirtIO	NetKVM	Driver
NotifyObject
Network	
configuration	
subsystem
Virtual	Function	
Device
Protocol	Driver
Miniport	Driver
Virtual	Network	
Device
1:1	
binding ndis
ndis
ndis
ndis
VirtIO SR-IOV VF Failover
VirtIO	Network	
Device
VirtIO	Protocol	
Driver
NetKVM	Miniport	
Driver
User	Space
NDIS	in	Kernel	Space
• Netkvm	is	Open	Source	driver	code	for	VirtIO	network	 • VF	miniport	driver	is	provided	by	vendor
Protocol Driver in 2-netdev Model
• Behaves like a bridge
• VF adapter is coupled to VirtIO adapter
with the same MAC address
• Handling TX/RX network data
• Object identifiers(OIDs) are wrapped and
forwarded, offloads are propagated
Network Binding of VirtIO SR-IOV
Known Issues
• DHCP issue
• Only happens in specific scenario
• Statistics is missing
• NetKVM driver needs to keep the statistics of packets sent to
or received from VF driver
• Old Windows system
• Windows Server 2003 and Windows XP
• Need to add VF PNP to Notification Object code or to the
registry
• Possible race during boot?
VirtIO and SR-IOV Failover
• VirtIO specification specifics
• Feature bit called
VIRTIO_NET_F_STANDBY. It is
appropriate for 3-netdev model in Linux,
but not for Windows 2-netdev model.
Installation
• Before
• INF for Miniport
• After
• INF for Miniport
• INF for Protocol
driver definition
and Notify Object
• Not part of the guest tools installer: https://github.com/virtio-win/virtio-win-guest-tools-installer
WHQL Certification
• Before
• Certification of
miniport
• Automatic review
• After
• Two steps
certification
• Automatic review for
miniport
• Manual review of
protocol driver and
the final package
Performance
From	VM	to	Remote	Host(NetPerf,	32	vcpus,	32	TCP	Streams,	MTU=9000)
0
25
50
75
100
Default	Default 16k	32k 16k	128k 32k	64k 32k		256k 64k	128k 128k	128k 256k	256k
VF 2-netdev NetKVM
• x	axis:	“TX/RX	Buffer	size”	and	“TX/RX	Socket	Buffer	size” • y	axis:	Network	throughput	from	0	to	100G
Performance
From	Remote	Host	to	VM(NetPerf,	32	vcpus,	32	TCP	Streams,	MTU=9000)
0
25
50
75
100
Default	Default 16k	32k 16k	128k 32k	64k 32k		256k 64k	128k 128k	128k 256k	256k
VF 2-netdev NetKVM
• x	axis:	“TX/RX	Buffer	size”	and	“TX/RX	Socket	Buffer	size” • y	axis:	Network	throughput	from	0	to	100G
Performance
From	VM	to	VM	on	Remote	Host	(NetPerf,	32	vcpus,	32	TCP	Streams,	MTU=9000)
0
25
50
75
100
Default	Default 16k	32k 16k	128k 32k	64k 32k		256k 64k	128k 128k	128k 256k	256k
VF 2-netdev NetKVM
• x	axis:	“TX/RX	Buffer	size”	and	“TX/RX	Socket	Buffer	size” • y	axis:	Network	throughput	from	0	to	100G
annie.li@oracle.com yan@daynix.com
Links – source code
• virtio-win drivers source code:
• https://github.com/virtio-win/kvm-guest-drivers-
windows
• MiniPort and Protocol driver:
• https://github.com/virtio-win/kvm-guest-drivers-
windows/tree/master/NetKVM
• Notification object:
• https://github.com/virtio-win/kvm-guest-drivers-
windows/tree/master/NetKVM/NotifyObject
Links – download binary drivers
• https://docs.fedoraproject.org/en-US/quick-docs/
creating-windows-virtual-machines-using-virtio-
drivers/index.html
Links – related presentations
• KVM Forum 2015 Live Migration with SR-IOV Pass-through - Weidong Han,
Huawei
• https://www.youtube.com/watch?v=vnwEnzVp9Zo
• https://www.linux-kvm.org/images/9/9a/03x07-Juniper-Weidong_Han-
LiveMigrationWithSR-IOVPass-through.pdf
• KVM Forum 2018 - Live Migration Support for GPU with SR-IOV - Zheng Xiao,
Alibaba Cloud; Jerry Jiang & Ken Xue, AMD
• https://events19.linuxfoundation.org/wp-content/uploads/2017/12/Live-
Migration-Support-for-GPU-with-SRIOV-Challenges-and-Solution-Zheng-Xiao-
Alibaba-Cloud-Jerry-Jiang-Ken-Xue-AMD.pdf
• KVM Forum 2020 (parallel session) - Device Keepalive State for Local Live
Migration and VMM Fast Restart - Jason Zeng, Intel
• https://sched.co/eE3W
Implementing SR-IOv failover for Windows guests during live migration
1 of 37

Recommended

QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan... by
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...
QEMU Development and Testing Automation Using MS HCK - Anton Nayshtut and Yan...Yan Vugenfirer
5.2K views49 slides
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko... by
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers - Kostiantyn Ko...Yan Vugenfirer
88 views41 slides
Windows guest debugging presentation from KVM Forum 2012 by
Windows guest debugging presentation from KVM Forum 2012Windows guest debugging presentation from KVM Forum 2012
Windows guest debugging presentation from KVM Forum 2012Yan Vugenfirer
15.6K views82 slides
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers (KVM Forum 2021) by
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers (KVM Forum 2021)HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers (KVM Forum 2021)
HCK-CI: Enabling CI for Windows Guest Paravirtualized Drivers (KVM Forum 2021)KostiantynKostiuk
68 views41 slides
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ... by
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...
Building “old” Windows drivers (XP, Vista, 2003 and 2008) with Visual Studio ...Yan Vugenfirer
6.3K views20 slides
Advanced NDISTest options by
Advanced NDISTest optionsAdvanced NDISTest options
Advanced NDISTest optionsYan Vugenfirer
1.6K views39 slides

More Related Content

What's hot

XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems by
XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE SystemsXPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems
XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE SystemsThe Linux Foundation
1.2K views38 slides
LFNW2014 Advanced Security Features of Xen Project Hypervisor by
LFNW2014 Advanced Security Features of Xen Project HypervisorLFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project HypervisorThe Linux Foundation
2.9K views66 slides
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin... by
XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...The Linux Foundation
708 views11 slides
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ... by
XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...The Linux Foundation
956 views25 slides
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ... by
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...The Linux Foundation
9K views33 slides
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE by
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSEXPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSEThe Linux Foundation
668 views17 slides

What's hot(20)

XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems by The Linux Foundation
XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE SystemsXPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems
XPDS16: The OpenXT Project in 2016 - Christopher Clark, BAE Systems
LFNW2014 Advanced Security Features of Xen Project Hypervisor by The Linux Foundation
LFNW2014 Advanced Security Features of Xen Project HypervisorLFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project Hypervisor
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin... by The Linux Foundation
XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...XPDS16:  Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Hypervisor-based Security: Vicarious Learning via Introspektioneerin...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ... by The Linux Foundation
XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ... by The Linux Foundation
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
XPDS16: A Paravirtualized Interface for Socket Syscalls - Dimitri Stiliadis, ...
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE by The Linux Foundation
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSEXPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
Virtunoid: Breaking out of KVM by Nelson Elhage
Virtunoid: Breaking out of KVMVirtunoid: Breaking out of KVM
Virtunoid: Breaking out of KVM
Nelson Elhage20.7K views
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix by The Linux Foundation
XPDS16:  CPUID handling for guests - Andrew Cooper, CitrixXPDS16:  CPUID handling for guests - Andrew Cooper, Citrix
XPDS16: CPUID handling for guests - Andrew Cooper, Citrix
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei by The Linux Foundation
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, HuaweiXPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei
XPDS16: Xen Scalability Analysis - Weidong Han, Zhichao Huang & Wei Yang, Huawei
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A... by The Linux Foundation
XPDS16:  AMD's virtualization memory encryption technology - Brijesh Singh, A...XPDS16:  AMD's virtualization memory encryption technology - Brijesh Singh, A...
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
Evolution of ota_update_in_the_io_t_world by Stefano Babic
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_world
Stefano Babic456 views
Kernel Recipes 2015: Kernel packet capture technologies by Anne Nicolas
Kernel Recipes 2015: Kernel packet capture technologiesKernel Recipes 2015: Kernel packet capture technologies
Kernel Recipes 2015: Kernel packet capture technologies
Anne Nicolas2.8K views
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC by The Linux Foundation
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGICXPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
XPDS16: Hypervisor Enforced Data Loss Prevention - Neil Sikka, A1LOGIC
Rootlinux17: An introduction to Xen Project Virtualisation by The Linux Foundation
Rootlinux17:  An introduction to Xen Project VirtualisationRootlinux17:  An introduction to Xen Project Virtualisation
Rootlinux17: An introduction to Xen Project Virtualisation
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi... by The Linux Foundation
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora... by The Linux Foundation
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...
XPDS16: Xen Live Patching - Updating Xen Without Rebooting - Konrad Wilk, Ora...

Similar to Implementing SR-IOv failover for Windows guests during live migration

DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin... by
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...Jim St. Leger
3.8K views22 slides
Windows server 8 and hyper v by
Windows server 8 and hyper vWindows server 8 and hyper v
Windows server 8 and hyper vSusantha Silva
956 views33 slides
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016) by
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)iXsystems
2.4K views20 slides
RMLL / LSM 2009 by
RMLL / LSM 2009RMLL / LSM 2009
RMLL / LSM 2009Franck_Villaume
433 views25 slides
Rmll Virtualization As Is Tool 20090707 V1.0 by
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0guest72e8c1
506 views25 slides
Unikernels: Rise of the Library Hypervisor by
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorAnil Madhavapeddy
10.5K views42 slides

Similar to Implementing SR-IOv failover for Windows guests during live migration(20)

DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin... by Jim St. Leger
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
DPDK Summit - 08 Sept 2014 - Futurewei - Jun Xu - Revisit the IP Stack in Lin...
Jim St. Leger3.8K views
Windows server 8 and hyper v by Susantha Silva
Windows server 8 and hyper vWindows server 8 and hyper v
Windows server 8 and hyper v
Susantha Silva956 views
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016) by iXsystems
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
iXsystems2.4K views
Rmll Virtualization As Is Tool 20090707 V1.0 by guest72e8c1
Rmll Virtualization As Is Tool 20090707 V1.0Rmll Virtualization As Is Tool 20090707 V1.0
Rmll Virtualization As Is Tool 20090707 V1.0
guest72e8c1506 views
Unikernels: Rise of the Library Hypervisor by Anil Madhavapeddy
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
Anil Madhavapeddy10.5K views
Deploying vn fs with kubernetes pods and vms by LibbySchulze1
 Deploying vn fs with kubernetes pods and vms Deploying vn fs with kubernetes pods and vms
Deploying vn fs with kubernetes pods and vms
LibbySchulze1274 views
Deploying vn fs with kubernetes pods and vms by LibbySchulze1
Deploying vn fs with kubernetes pods and vmsDeploying vn fs with kubernetes pods and vms
Deploying vn fs with kubernetes pods and vms
LibbySchulze164 views
Unikernels: the rise of the library hypervisor in MirageOS by Docker, Inc.
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
Docker, Inc.2.3K views
Windows server 8 hyper v networking (aidan finn) by hypervnu
Windows server 8 hyper v networking (aidan finn)Windows server 8 hyper v networking (aidan finn)
Windows server 8 hyper v networking (aidan finn)
hypervnu1.2K views
Windows Server 8 Hyper V Networking by Aidan Finn
Windows Server 8 Hyper V NetworkingWindows Server 8 Hyper V Networking
Windows Server 8 Hyper V Networking
Aidan Finn1.6K views
Project ACRN hypervisor introduction by Project ACRN
Project ACRN hypervisor introduction Project ACRN hypervisor introduction
Project ACRN hypervisor introduction
Project ACRN171 views
OpenStack - JobShop @Iași, 2016 by Alexandru Coman
OpenStack - JobShop @Iași, 2016OpenStack - JobShop @Iași, 2016
OpenStack - JobShop @Iași, 2016
Alexandru Coman329 views
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel by eurobsdcon
OpenStack and OpenContrail for FreeBSD platform by Michał DubielOpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
OpenStack and OpenContrail for FreeBSD platform by Michał Dubiel
eurobsdcon2.8K views
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl... by Odinot Stanislas
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
Bare-metal, Docker Containers, and Virtualization: The Growing Choices for Cl...
Odinot Stanislas8.9K views
6WINDGate™ - Powering the New-Generation of IPsec Gateways by 6WIND
6WINDGate™ - Powering the New-Generation of IPsec Gateways6WINDGate™ - Powering the New-Generation of IPsec Gateways
6WINDGate™ - Powering the New-Generation of IPsec Gateways
6WIND3.3K views
5. IO virtualization by Hwanju Kim
5. IO virtualization5. IO virtualization
5. IO virtualization
Hwanju Kim10.3K views

More from Yan Vugenfirer

Receive side scaling (RSS) with eBPF in QEMU and virtio-net by
Receive side scaling (RSS) with eBPF in QEMU and virtio-netReceive side scaling (RSS) with eBPF in QEMU and virtio-net
Receive side scaling (RSS) with eBPF in QEMU and virtio-netYan Vugenfirer
678 views34 slides
Qemu device prototyping by
Qemu device prototypingQemu device prototyping
Qemu device prototypingYan Vugenfirer
280 views41 slides
Windows network teaming by
Windows network teamingWindows network teaming
Windows network teamingYan Vugenfirer
117 views14 slides
Rebuild presentation during Docker's Birthday party by
Rebuild presentation during Docker's Birthday partyRebuild presentation during Docker's Birthday party
Rebuild presentation during Docker's Birthday partyYan Vugenfirer
646 views22 slides
Contributing to open source using Git by
Contributing to open source using GitContributing to open source using Git
Contributing to open source using GitYan Vugenfirer
385 views30 slides
Introduction to Git by
Introduction to GitIntroduction to Git
Introduction to GitYan Vugenfirer
14.4K views35 slides

More from Yan Vugenfirer(7)

Receive side scaling (RSS) with eBPF in QEMU and virtio-net by Yan Vugenfirer
Receive side scaling (RSS) with eBPF in QEMU and virtio-netReceive side scaling (RSS) with eBPF in QEMU and virtio-net
Receive side scaling (RSS) with eBPF in QEMU and virtio-net
Yan Vugenfirer678 views
Rebuild presentation during Docker's Birthday party by Yan Vugenfirer
Rebuild presentation during Docker's Birthday partyRebuild presentation during Docker's Birthday party
Rebuild presentation during Docker's Birthday party
Yan Vugenfirer646 views
Contributing to open source using Git by Yan Vugenfirer
Contributing to open source using GitContributing to open source using Git
Contributing to open source using Git
Yan Vugenfirer385 views

Recently uploaded

How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...ShapeBlue
171 views28 slides
Initiating and Advancing Your Strategic GIS Governance Strategy by
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategySafe Software
184 views68 slides
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineShapeBlue
225 views19 slides
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...ShapeBlue
183 views18 slides
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsShapeBlue
247 views13 slides
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
207 views54 slides

Recently uploaded(20)

How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue171 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue225 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue183 views
Why and How CloudStack at weSystems - Stephan Bienek - weSystems by ShapeBlue
Why and How CloudStack at weSystems - Stephan Bienek - weSystemsWhy and How CloudStack at weSystems - Stephan Bienek - weSystems
Why and How CloudStack at weSystems - Stephan Bienek - weSystems
ShapeBlue247 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue207 views
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue by ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlueWhat’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
What’s New in CloudStack 4.19 - Abhishek Kumar - ShapeBlue
ShapeBlue265 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... by ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue162 views
"Running students' code in isolation. The hard way", Yurii Holiuk by Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays36 views
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT by ShapeBlue
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBITUpdates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
Updates on the LINSTOR Driver for CloudStack - Rene Peinthor - LINBIT
ShapeBlue208 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue303 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays58 views
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ... by Jasper Oosterveld
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
ESPC 2023 - Protect and Govern your Sensitive Data with Microsoft Purview in ...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc176 views
"Package management in monorepos", Zoltan Kochan by Fwdays
"Package management in monorepos", Zoltan Kochan"Package management in monorepos", Zoltan Kochan
"Package management in monorepos", Zoltan Kochan
Fwdays34 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue164 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue139 views

Implementing SR-IOv failover for Windows guests during live migration

  • 1. Implementing SR-IOV Failover for Windows Guests During Migration Annie Li - Principal Software Engineer, Oracle Yan Vugenfirer - CEO, Daynix http://github.com/virtio-win/
  • 2. Agenda • Virtio-win drivers • Windows guest terminology • The problem • Different solutions • Failover solution with virtio-net on Windows guest
  • 3. • Upstream: https://github.com/virtio-win/kvm-guest- drivers-windows/ • Drivers for the major virtio devices: • virtio-net • virtio-blk, virtio-scsi • virtio-balloon, virtio-serial, virtio-vsock, virtio-input, virtio-rng • Panic, fw-cfg • INF files (pci-serial, sm-bus on Q35) Drivers for Windows
  • 4. • WDF drivers for the “simple” devices • Miniport architecture for network and storage • NDIS • Storport • Scsiport VirtIO Drivers for Windows
  • 5. • Supported OS • Windows XP, Vista, 7, 8, 8.1, 10 (up to recent builds) • Widows Server 2003, 2008, 2008R2, 2012, 2012R2, 2016, 2019 VirtIO Drivers for Windows
  • 6. • Send PRs - https://github.com/virtio- win/kvm-guest-drivers-windows/ pulls • Code changes should pass WHQL • We are running WHQL CI on upstream (HCK-CI) How to Contribute
  • 8. NDIS (Network Driver Interface Specification) Architecture NotifyObject Network configuration subsystem HW device HW device Protocol drivers Protocol Driver Miniport Drivers Network Device Miniport driver Miniport edge Protocol edge Intermediate drivers Protocol driver Intermediate driver Protocol driver Miniport driver NDIS User space
  • 9. • NDIS miniport driver • Basic driver package: • INF file – installation description • SYS file – driver binary • PDB file – symbols for debugging • CAT file - package digital signature Virtio-net (NetKVM) Driver for Windows
  • 10. The Problem – Live Migration and SR-IOV
  • 11. Overview of SR-IOV Migration Solutions • Previous efforts and vendor specific HW solutions • Hyper-V and Windows • Linux and VirtIO
  • 12. Previous Efforts • KVM Forum 2015 Live Migration with SR-IOV Pass-through - Weidong Han, Huawei • KVM Forum 2018 - Live Migration Support for GPU with SR-IOV - Zheng Xiao, Alibaba Cloud; Jerry Jiang & Ken Xue, AMD • KVM Forum 2020 (parallel session) - Device Keepalive State for Local Live Migration and VMM Fast Restart - Jason Zeng, Intel
  • 13. Overview of Software Solutions • Windows NIC Teaming • Windows MUX Intermediate driver • Hyper-V Solution
  • 14. Windows NIC Teaming • Similar to bond in Linux • Provides failover capability • Configured through GUI or Powershell Cmdlets in user space
  • 15. Windows MUX Intermediate Driver • Kernel space solution with various models • One-to-two model for SR-IOV live migration
  • 16. Windows MUX Intermediate Driver TCPIP VF miniport driver NotifyObject Open Adapter1 Open Adapter2 Network configuration subsystem VirtIO network device Virtual Function network device Protocol driver Protocol Driver Miniport Driver Network Device Virtual Adapter NetKVM Miniport edge Protocol edge One-to-Two MUX Intermediate Driver Internal Binding Other Protocols ndisndis ndis ndis ndis • Netkvm is Open Source driver code for VirtIO network • VF miniport driver is provided by vendor NDIS(Kernel Space) User space
  • 17. Network Binding of NIC Teaming or MUX
  • 18. Hyper-V VM Network • Network virtual service client(NetVSC ) • Synthetic data path • SR-IOV data path • Two Installation files(INF) • Share same driver binary
  • 19. Hyper-V SR-IOV VF Failover TCPIP Other Protocols VF Miniport Driver Hyper-V NetVSC Driver Hyper-V NetVSC Miniport Driver Hyper-V NetVSC Protocol Driver Miniport Driver 1:1 binding Hyper-V Virtual Network Device Virtual Function Device Virtual Network Device Protocol Driver Protocol Driver ndisvf ndisvf • No Bond/Teaming • No NotifyObject • No new Virtual Adapter NDIS(Kernel space)
  • 21. Comparison Summary • MUX Driver model: • Complicated, New virtual adapter, Restore offload, NotifyObject. • Hyper-V model: • Simplified, Appropriate for Hyper-V • 2-netdev model in KVM
  • 22. Windows Network of VirtIO and VF TCPIP Other Protocols VF Miniport Driver NetKVM Miniport Driver VirtIO Network Device Virtual Function Device Protocol Driver Miniport Driver Virtual Network Device ndis ndis NDIS(Kernel sapce)
  • 23. TCPIP Other Protocols VF Miniport Driver VirtIO NetKVM Driver NotifyObject Network configuration subsystem Virtual Function Device Protocol Driver Miniport Driver Virtual Network Device 1:1 binding ndis ndis ndis ndis VirtIO SR-IOV VF Failover VirtIO Network Device VirtIO Protocol Driver NetKVM Miniport Driver User Space NDIS in Kernel Space • Netkvm is Open Source driver code for VirtIO network • VF miniport driver is provided by vendor
  • 24. Protocol Driver in 2-netdev Model • Behaves like a bridge • VF adapter is coupled to VirtIO adapter with the same MAC address • Handling TX/RX network data • Object identifiers(OIDs) are wrapped and forwarded, offloads are propagated
  • 25. Network Binding of VirtIO SR-IOV
  • 26. Known Issues • DHCP issue • Only happens in specific scenario • Statistics is missing • NetKVM driver needs to keep the statistics of packets sent to or received from VF driver • Old Windows system • Windows Server 2003 and Windows XP • Need to add VF PNP to Notification Object code or to the registry • Possible race during boot?
  • 27. VirtIO and SR-IOV Failover • VirtIO specification specifics • Feature bit called VIRTIO_NET_F_STANDBY. It is appropriate for 3-netdev model in Linux, but not for Windows 2-netdev model.
  • 28. Installation • Before • INF for Miniport • After • INF for Miniport • INF for Protocol driver definition and Notify Object • Not part of the guest tools installer: https://github.com/virtio-win/virtio-win-guest-tools-installer
  • 29. WHQL Certification • Before • Certification of miniport • Automatic review • After • Two steps certification • Automatic review for miniport • Manual review of protocol driver and the final package
  • 30. Performance From VM to Remote Host(NetPerf, 32 vcpus, 32 TCP Streams, MTU=9000) 0 25 50 75 100 Default Default 16k 32k 16k 128k 32k 64k 32k 256k 64k 128k 128k 128k 256k 256k VF 2-netdev NetKVM • x axis: “TX/RX Buffer size” and “TX/RX Socket Buffer size” • y axis: Network throughput from 0 to 100G
  • 31. Performance From Remote Host to VM(NetPerf, 32 vcpus, 32 TCP Streams, MTU=9000) 0 25 50 75 100 Default Default 16k 32k 16k 128k 32k 64k 32k 256k 64k 128k 128k 128k 256k 256k VF 2-netdev NetKVM • x axis: “TX/RX Buffer size” and “TX/RX Socket Buffer size” • y axis: Network throughput from 0 to 100G
  • 32. Performance From VM to VM on Remote Host (NetPerf, 32 vcpus, 32 TCP Streams, MTU=9000) 0 25 50 75 100 Default Default 16k 32k 16k 128k 32k 64k 32k 256k 64k 128k 128k 128k 256k 256k VF 2-netdev NetKVM • x axis: “TX/RX Buffer size” and “TX/RX Socket Buffer size” • y axis: Network throughput from 0 to 100G
  • 34. Links – source code • virtio-win drivers source code: • https://github.com/virtio-win/kvm-guest-drivers- windows • MiniPort and Protocol driver: • https://github.com/virtio-win/kvm-guest-drivers- windows/tree/master/NetKVM • Notification object: • https://github.com/virtio-win/kvm-guest-drivers- windows/tree/master/NetKVM/NotifyObject
  • 35. Links – download binary drivers • https://docs.fedoraproject.org/en-US/quick-docs/ creating-windows-virtual-machines-using-virtio- drivers/index.html
  • 36. Links – related presentations • KVM Forum 2015 Live Migration with SR-IOV Pass-through - Weidong Han, Huawei • https://www.youtube.com/watch?v=vnwEnzVp9Zo • https://www.linux-kvm.org/images/9/9a/03x07-Juniper-Weidong_Han- LiveMigrationWithSR-IOVPass-through.pdf • KVM Forum 2018 - Live Migration Support for GPU with SR-IOV - Zheng Xiao, Alibaba Cloud; Jerry Jiang & Ken Xue, AMD • https://events19.linuxfoundation.org/wp-content/uploads/2017/12/Live- Migration-Support-for-GPU-with-SRIOV-Challenges-and-Solution-Zheng-Xiao- Alibaba-Cloud-Jerry-Jiang-Ken-Xue-AMD.pdf • KVM Forum 2020 (parallel session) - Device Keepalive State for Local Live Migration and VMM Fast Restart - Jason Zeng, Intel • https://sched.co/eE3W