CA-31764: when a domain is classed as inactive it can have its maxmem set to the value of 'initial-reservation' which is the amount of memory we reserve for it on the host. This can be > static_max. During migration we use the max of totpages and maxpages both for deciding how much memory we need on the remote and setting the initial target. Since this amount of memory might be > static_max we must clip the target to avoid it triggering the assertion in Domain.restore.
CA-31764: when a domain is classed as inactive it can have its maxmem set to the value of 'initial-reservation' which is the amount of memory we reserve for it on the host. This can be > static_max. During migration we use the max of totpages and maxpages both for deciding how much memory we need on the remote and setting the initial target. Since this amount of memory might be > static_max we must clip the target to avoid it triggering the assertion in Domain.restore.

robertbreker/xen-api,koushikcgit/xcp-networkd,euanh/xen-api,simonjbeaumont/xcp-rrdd,cheng--zhang/xen-api,jjd27/xen-api,cheng--zhang/xen-api,jjd27/xen-api,cheng-z/xen-api,djs55/xcp-rrdd,koushikcgit/xen-api,srowe/xen-api,rafalmiel/xen-api,jjd27/xen-api,koushikcgit/xen-api,djs55/xcp-networkd,anoobs/xen-api,euanh/xen-api,salvocambria/xen-api,thomassa/xen-api,robertbreker/xen-api,euanh/xen-api,djs55/xcp-rrdd,sharady/xcp-networkd,huizh/xen-api,salvocambria/xen-api,srowe/xen-api,guard163/xen-api,cheng-z/xen-api,Frezzle/xen-api,salvocambria/xen-api,agimofcarmen/xen-api,thomassa/xen-api,simonjbeaumont/xen-api,huizh/xen-api,anoobs/xen-api,johnelse/xcp-rrdd,jjd27/xen-api,djs55/xen-api,thomassa/xen-api,huizh/xen-api,Frezzle/xen-api,guard163/xen-api,rafalmiel/xen-api,anoobs/xen-api,cheng--zhang/xen-api,guard163/xen-api,euanh/xen-api,Frezzle/xen-api,djs55/xen-api,cheng-z/xen-api,vasilenkomike/xen-api,cheng--zhang/xen-api,cheng--zhang/xen-api,sharady/xcp-networkd,simonjbeaumont/xen-api,ravippandey/xen-api,djs55/xcp-networkd,rafalmiel/xen-api,jjd27/xen-api,salvocambria/xen-api,vasilenkomike/xen-api,djs55/xen-api,salvocambria/xen-api,vasilenkomike/xen-api,agimofcarmen/xen-api,koushikcgit/xcp-rrdd,simonjbeaumont/xen-api,thomassa/xen-api,anoobs/xen-api,guard163/xen-api,cheng-z/xen-api,simonjbeaumont/xen-api,srowe/xen-api,robertbreker/xen-api,guard163/xen-api,robertbreker/xen-api,huizh/xen-api,Frezzle/xen-api,koushikcgit/xen-api,agimofcarmen/xen-api,vasilenkomike/xen-api,srowe/xen-api,jjd27/xen-api,rafalmiel/xen-api,koushikcgit/xcp-rrdd,cheng--zhang/xen-api,cheng-z/xen-api,ravippandey/xen-api,ravippandey/xen-api,koushikcgit/xcp-rrdd,djs55/xen-api,koushikcgit/xen-api,ravippandey/xen-api,ravippandey/xen-api,simonjbeaumont/xcp-rrdd,robhoes/squeezed,cheng-z/xen-api,simonjbeaumont/xen-api,salvocambria/xen-api,srowe/xen-api,robertbreker/xen-api,guard163/xen-api,cheng-z/xen-api,anoobs/xen-api,johnelse/xcp-rrdd,robertbreker/xen-api,rafalmiel/xen-api,vasilenkomike/xen-api,djs55/xen-api,koushikcgit/xcp-networkd,djs55/xen-api,anoobs/xen-api,thomassa/xen-api,ravippandey/xen-api,djs55/squeezed,euanh/xen-api,agimofcarmen/xen-api,Frezzle/xen-api,rafalmiel/xen-api,agimofcarmen/xen-api,huizh/xen-api,koushikcgit/xen-api,cheng--zhang/xen-api,euanh/xen-api,thomassa/xen-api,simonjbeaumont/xen-api,koushikcgit/xen-api,agimofcarmen/xen-api,huizh/xen-api,vasilenkomike/xen-api