* Tidy up `VM` extension: use `var`
* Tidy up `VM` extension: remove redundant initialisers
* Tidy up `VM` extension: use type keywords when possible
* Tidy up `VM` extension: merge conditional expressions
* Tidy up `VM` extension: remove redundant qualifiers
* Tidy up `VM` extension: remove redundant type arguments
* Tidy up `VM` extension: remove redundant `else`s and parentheses
* Tidy up `VM` extension: fix naming
* Tidy up `VM` extension: misc changes
* Tidy up `VM` extension: use `null` propagation
* Tidy up `VM` extension: fix whitespace
* Tidy up `VM` extension: apply ReSharper Code Cleanup utility
* Tidy up `VM` extension: Fix naming of private string array
* CP-44767: Ignore VM restriction when fetching `MaxVCPUsAllowed`
Instead, fetch the highest available value in all templates for the host.
This means that VMs imported from vhd won't automatically default to `DEFAULT_NUM_VCPUS_ALLOWED`, and that VMs that have been kept across XenServer upgrades won't be limited to the number of vCPUs in their own (possibly outdated) restrictions
* CP-44766: Use value in template with a matching `reference_label` when checking VM restrictions
* Move restriction getters to own region
* CP-44766: Use matching templates to fetch VM restrictions
- Rewrite `GetRestrictions...` methods to perform simpler operations
- Add `GetIntRestrictionValue` and `GetBoolRestrictionValue` wrappers to `GetRestrictionValueFromMatchingTemplate`
- Now all calls to a restrictions first check the template value, with a fall-back to defaults
* CP-44765: Export `reference-label` when generating OVFs
---------
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
The check DundeeOrGreater always returns true since we disallow connection to anything earlier than Havana.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
The new name complies with C# conventions and allows distinguishing it from xapi field names.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Also, merged the methods calculating the virtualisation status and its friendly
string so as to simplify the logic.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
is enforced on all host post-liveness checks.
Added missing description to SafeToUpgradeCheck.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
prevent them from being serialised alongside the API properties. This will also
be useful for moving the API bindings out of XenModel.
Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
Changed the pre-check error message to refer to the absence of the Tools
when that is suspected to be the case.
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
A bit of refactoring as requested by the reviewers
I decided not remove the NullReferenceExceptions and throw the Failures
immediately in order to avoid the additional error handling that seems to be unnecessary there. However, the reason I've decided to keep it as is is that it would change what gets logged and the performance gain would not be noticeable anyway. Furthermore, the current implementation (try-catchall) catches any other exceptions providing fallback to the default Failure.
Detect both VM_LACKS_FEATURE and VM_LACKS_FEATURE_SUSPEND, show proper error message on the pre-check page in the Install Updates Wizard
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit implements the check for LiveUpdate capability of a patch. If
the patch is completely live-updatable, XenCenter will not restart the
host (but will do further checks once it has finished installing the
update - separate ticket)
Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
If the license does not allow VM migration, then cause the VMs to be shut down / suspended on the pre-checks page
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-77990: Report required actions for all VMs at once in the hotfix wizard / RPUW
* CA-77990: Resolve precheck problems in parallel in the Patching wizard
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-77990: Resolve precheck problems in parallel in the Patching wizard
Changes following code review: Made the ParallelAction work across connections and removed CrossConnectionParallelAction
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
* CA-77990: Modified ParallelAction to create queue on RunSubActions only, with the correct queue size
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
- Added three Warning classes (HAEnabledWarning, WLBEnabledWarning, HostNotLiveWarning), used in the Pre-checks page of the Install wizard (also in the Rolling Pool Upgrade wizard) to indicate that a check was skipped and the reason why.
- If HA or WLB is on, we show this as an error in the "HA and WLB status" check and the "VM migration status" checks will be skipped (with a warning displayed) for all the hosts in the pool.
- Similarly, if a host if unreachable, we show this as an error in the "Host liveness status" check and the following checks for that host will be skipped (and warning displayed).
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>