Christian ferber xen server_6.1_storagexenmotion

19
November, 2012 XenServer 6.1 Storage XenMotion Christian Ferber Sr Systems Engineer Cloud Infrastructure

Transcript of Christian ferber xen server_6.1_storagexenmotion

Page 1: Christian ferber xen server_6.1_storagexenmotion

November, 2012

XenServer 6.1 Storage XenMotion

Christian Ferber

Sr Systems Engineer Cloud Infrastructure

Page 2: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Feature Overview: Use cases

1. Upgrade a storage array

2. Upgrade a pool with VMs on local storage

3. Provide tiered storage arrays

4. Rebalance VMs between XenServer pools, or CloudStack clusters

“The Cloud” was the major use case we had in mind when designing this.

Page 3: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

XenServer Pool

Live Storage XenMotion Upgrading VMs from Local to Shared Storage

XenServer Hypervisor

Local Storage

FC, iSCSI, NFS SAN

VDI(s) VDI(s)

Live Virtual

Machine

Page 4: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

XenServer Pool

Live Storage XenMotion Moving VMs within a Pool with local-only storage

XenServer Hypervisor

Local Storage

XenServer Hypervisor

Local Storage

Live Virtual

Machine

VDI(s) VDI(s)

Page 5: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

XenServer Pool 2 XenServer Pool 1

Live Storage XenMotion Moving or rebalancing VMs between Pools (Local SAN)

Local Storage

XenServer Hypervisor XenServer Hypervisor

XenServer Hypervisor XenServer Hypervisor

XenServer Hypervisor XenServer Hypervisor

VDI(s)

FC, iSCSI, NFS SAN

VDI(s)

Live Virtual

Machine

Page 6: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

XenServer Pool 2 XenServer Pool 1

Live Storage XenMotion Moving or rebalancing VMs between Pools (Local Local)

Local Storage

XenServer Hypervisor XenServer Hypervisor

XenServer Hypervisor

Local Storage

XenServer Hypervisor XenServer Hypervisor

XenServer Hypervisor

Live Virtual

Machine

VDI(s) VDI(s)

Page 7: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Storage XenMotion Features

• Destination network can be selected

• Transfer network can be selected

• Migration doesn’t interfere with VM powerstate ops

• Extra network IO won’t interfere with Xapi’s management interface

• Up to 3 concurrent Storage Migrations per host

• Up to 6 VDIs on each VM

• Supported on all VHD based SRs (Local EXT, Local LVHD, iSCSI, FC)*

* Not currently supported with StorageLink SRs

Page 8: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Feature Overview: GUI walkthrough

Page 9: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Feature Overview: GUI walkthrough

Page 10: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

DEMO Storage XenMotion

Page 11: Christian ferber xen server_6.1_storagexenmotion

Storage XenMotion Deep dive

Page 12: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Feature Overview: CLI walkthrough

• xe vm-migrate ᵒ New params: remote-address, remote-username, remote-password,

remote-network, vif, vdi

• Extends the original vm-migrate command

• Bold params are required to enable cross-pool migration

• vif and vdi map VIFs to target networks and VDIs to target SRs

• remote-network specifies the network used for data transfer

• Can use host/host-uuid to specify host on pool to send VM

• xe vdi-pool-migrate ᵒ Params: uuid, sr-uuid

• uuid of target VDI

• sr-uuid of destination SR

Page 13: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Feature Overview: Bird’s-eye view

Cross-pool migration and VDI migration consist of the following:

1. Synchronously mirror VDIs between source and destination

2. Create new VM object on destination pool (new ref, same uuid)

3. When copy complete, migrate VM as usual

Note: VDI migrate implemented with “localhost” cross-pool migrate!

Page 14: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Architecture: Intro to VHDs

• Many SRs implement VDIs as VHD trees

• VHDs are a copy-on-write format for storing virtual disks

• VDIs are the leaves of VHD trees

• Interesting VDI operation: snapshot (implemented as VHD “cloning”)

A: Original VDI

B: Snapshot VDI

A

RW

B

RO

A

RW

RO

Page 15: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Storage XenMotion

SOURCE DESTINATION

root

VM

no color = empty

gradient = live

Page 16: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Architecture: VDI operations

• For each VDI: ᵒ Snapshot VDI and synchronously mirror all subsequent writes to destination SR

ᵒ Copy the snapshot to destination SR

ᵒ Finally, compose those writes onto the snapshot on the destination SR • Continue to mirror all new writes

• Each of these operations occurs sequentially for each VDI, but each VDI

mirror continues until the VM migration is complete

• VM memory is copied only after final VDI compose is complete

VDI 1: snapshot & start mirroring

VDI 1: copy snapshots VDI 2: snapshot & start mirroring

VDI 2: copy snapshots Copy VM memory

Page 17: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Architecture: Summary

• New components: xenopsd, SMAPI v2, tapdisk NBD plugin

• Cross-pool migration comprised of VDI snapshotting, copying, and mirroring

• VDI-migration implemented as a “localhost” cross-pool migration

• Both operations require extra, temporary space on source and destination SR

Page 18: Christian ferber xen server_6.1_storagexenmotion

© 2012 Citrix

Troubleshooting tips

• Check logs: /var/log/{xensource.log,SMlog,messages} ᵒ Note: xensource.log and messages both implemented with syslog, so they now have

consistent timestamps!

• xn command: CLI to xenopsd ᵒ Try ‘xn help’ for documentation.

• tap-ctl command ᵒ Could be useful for diagnosing problems

Page 19: Christian ferber xen server_6.1_storagexenmotion

Work better. Live better.