Class XenServerHostingOptions
Specifies hosting settings for the Citrix XenServer hypervisor.
Namespace: Neon.Kube.ClusterDef
Assembly: Neon.Kube.dll
Syntax
public class XenServerHostingOptions
Constructors
XenServerHostingOptions()
Default constructor.
Declaration
public XenServerHostingOptions()
Properties
Snapshot
Optionally directs XenCenter to create the virtual machines using a snapshot of
the virtual machine template rather than creating a full copy. This defaults
to false
.
Declaration
[JsonProperty(PropertyName = "Snapshot", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "snapshot", ApplyNamingConventions = false)]
public bool Snapshot { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Virtual machines created via a snapshot will be ready within seconds where as creation can take something like 4 minutes on a SSD or 9 minutes on a spinning drive. We don't enable snapshots though by default, because some web posts from around 2014 indicate that operators may encounter problems when something like 30 virtual machines have been created as snapshots from the same template.
We figure that it's best to default to safe setting for production clusters and then allow operators to override this when provisioning temporary test clusters or when provisioning on a storage repository that doesn't have these limitations.
note
For snapshots to work, the storage repository must support them and the virtual
machine template must reside in the same repository where the virtual machines
are being created. The current neon-cli
implementation persists the
cluster VM templates to the local storage repository, so support for non-local
storage repositories is not support out-of-the-box at this time.
StorageRepository
Identifies the XenServer storage repository to be used to store the XenServer node template as well as the cluster virtual machine images. This defaults to Local storage.
Declaration
[JsonProperty(PropertyName = "StorageRepository", Required = Required.Default, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
[YamlMember(Alias = "storageRepository", ApplyNamingConventions = false)]
public string StorageRepository { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
ClearSecrets()
Clears all hosting related secrets.
Declaration
public void ClearSecrets()
Validate(ClusterDefinition)
Validates the options and also ensures that all null
properties are
initialized to their default values.
Declaration
public void Validate(ClusterDefinition clusterDefinition)
Parameters
Type | Name | Description |
---|---|---|
ClusterDefinition | clusterDefinition | The cluster definition. |
Exceptions
Type | Condition |
---|---|
ClusterDefinitionException | Thrown if the definition is not valid. |