Migration v2
Andrew Cooper
Citrix XenServer
17th August 2015
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 1 / 12
Migration v2 Andrew Cooper Citrix XenServer 17 th August 2015 17 th - - PowerPoint PPT Presentation
Migration v2 Andrew Cooper Citrix XenServer 17 th August 2015 17 th August 2015 Andrew Cooper (Citrix XenServer) Migration v2 1 / 12 Why Migration v2 XenServer 6.2 64bit Xen, 32bit Dom0 Inertia, More efficient to virtualise 17 th
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 1 / 12
◮ 64bit Xen, 32bit Dom0 ◮ Inertia, More efficient to virtualise Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 2 / 12
◮ 64bit Xen, 32bit Dom0 ◮ Inertia, More efficient to virtualise
◮ 64bit Xen, 64bit Dom0 ◮ High MMIO regions above 244 bits Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 2 / 12
◮ 64bit Xen, 32bit Dom0 ◮ Inertia, More efficient to virtualise
◮ 64bit Xen, 64bit Dom0 ◮ High MMIO regions above 244 bits
◮ Migrate VM from XS6.2 to XS6.5 ◮ Error on the receiving side: Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 2 / 12
◮ 64bit Xen, 32bit Dom0 ◮ Inertia, More efficient to virtualise
◮ 64bit Xen, 64bit Dom0 ◮ High MMIO regions above 244 bits
◮ Migrate VM from XS6.2 to XS6.5 ◮ Error on the receiving side:
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 2 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 3 / 12
◮ Subsequently reverse engineered from existing code Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 4 / 12
◮ Subsequently reverse engineered from existing code
◮ Written mostly as two monolithic functions ◮ goto tangle ◮ PV MSR support too complicated to implement Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 4 / 12
◮ Subsequently reverse engineered from existing code
◮ Written mostly as two monolithic functions ◮ goto tangle ◮ PV MSR support too complicated to implement
◮ Save side’s caller puts Qemu blob into the stream ◮ Restore side pulls Qemu blob out and saves in magic path Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 4 / 12
◮ Subsequently reverse engineered from existing code
◮ Written mostly as two monolithic functions ◮ goto tangle ◮ PV MSR support too complicated to implement
◮ Save side’s caller puts Qemu blob into the stream ◮ Restore side pulls Qemu blob out and saves in magic path
◮ Different between 32bit and 64bit Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 4 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 5 / 12
◮ Pause VM ◮ Copy all memory Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 5 / 12
◮ Pause VM ◮ Copy all memory
◮ Enable logdirty ◮ Copy all memory ◮ — Query logdirty bitmap ◮ — Copy dirty memory ◮ — Loop ◮ Pause VM ◮ Copy remaining memory Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 5 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 6 / 12
◮ docs/specs/libxc-migration-stream.pandoc ◮ Describes exact binary layout ◮ Extensible Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 6 / 12
◮ docs/specs/libxc-migration-stream.pandoc ◮ Describes exact binary layout ◮ Extensible
◮ Common save and restore algorithms ◮ Per-guest-type hooks to implement Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 6 / 12
◮ docs/specs/libxc-migration-stream.pandoc ◮ Describes exact binary layout ◮ Extensible
◮ Common save and restore algorithms ◮ Per-guest-type hooks to implement
◮ tools/python/scripts/convert-legacy-stream ◮ Reads in legacy stream ◮ Writes out v2 stream Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 6 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 7 / 12
◮ No participation in stream ◮ ’Toolstack Data’ depends on compilation ABI Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 8 / 12
◮ No participation in stream ◮ ’Toolstack Data’ depends on compilation ABI
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 8 / 12
◮ No participation in stream ◮ ’Toolstack Data’ depends on compilation ABI
◮ docs/specs/libxl-migration-stream.pandoc ◮ Describes exact binary layout ◮ Extensible Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 8 / 12
◮ No participation in stream ◮ ’Toolstack Data’ depends on compilation ABI
◮ docs/specs/libxl-migration-stream.pandoc ◮ Describes exact binary layout ◮ Extensible
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 8 / 12
◮ No participation in stream ◮ ’Toolstack Data’ depends on compilation ABI
◮ docs/specs/libxl-migration-stream.pandoc ◮ Describes exact binary layout ◮ Extensible
◮ Able to write libxl migration v2 streams ◮ ’Qemu’ and ’Toolstack data’ layered appropriately Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 8 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 9 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 9 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 9 / 12
◮ PV VCPU state corruption when racing with vcpu actions ◮ PV guests with superpages abort on save, rather than failing to
◮ More efficient handling of page data Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 10 / 12
◮ PV VCPU state corruption when racing with vcpu actions ◮ PV guests with superpages abort on save, rather than failing to
◮ More efficient handling of page data
◮ Guests which balloon ◮ PV P2M structure changes ◮ HVM guests with PoD pages Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 10 / 12
◮ PV VCPU state corruption when racing with vcpu actions ◮ PV guests with superpages abort on save, rather than failing to
◮ More efficient handling of page data
◮ Guests which balloon ◮ PV P2M structure changes ◮ HVM guests with PoD pages
◮ Live migrate looping parameters ◮ Linear P2M support Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 10 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 11 / 12
Andrew Cooper (Citrix XenServer) Migration v2 17th August 2015 12 / 12