Package com.morpheusdata.core.providers
Interface DatastoreTypeProvider.MvmProvisionFacet
- Enclosing interface:
- DatastoreTypeProvider
public static interface DatastoreTypeProvider.MvmProvisionFacet
This facet is used to provide additional hooks for MVM/VME specific provisioning tasks for VME/HPE Hypervisor Clusters.
In the future, this may change to be more generic and allowed for other cloud provision providers to use (i.e. Baremetal)
In order to use this, add it to your implementation of your
DatastoreTypeProvider
Often times, it will be necessary to orchestrate behaviors on the host itself when provisioning a volume. This can be done
with the context MorpheusContext.executeCommandOnServer(com.morpheusdata.model.ComputeServer, java.lang.String) method.
ServiceResponse response = morpheusContext.executeCommandOnServer(host, "virsh pool-refresh mypool");
- Since:
- 1.1.18
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classThis represents a disk configuration for a virtual machine for libvirt/virsh XML specification as a disk device This is used to allow the plugin to override any special configuration needed for the disk device Please refer to the libvirt documentation on block devices: -
Method Summary
Modifier and TypeMethodDescriptionbuildDiskConfig(ComputeServerGroup cluster, ComputeServer server, StorageVolume volume) When creating/defining a virtual machine in libvirt, an XML specification must be generated.prepareHostForVolume(ComputeServerGroup cluster, ComputeServer server, StorageVolume volume) This is a hook call to allow the plugin to prepare the host for the volume.releaseVolumeFromHost(ComputeServerGroup cluster, ComputeServer server, StorageVolume volume) This is a hook call to allow the plugin to know if a vm is being moved off of a host or removed.
-
Method Details
-
prepareHostForVolume
ServiceResponse<StorageVolume> prepareHostForVolume(ComputeServerGroup cluster, ComputeServer server, StorageVolume volume) This is a hook call to allow the plugin to prepare the host for the volume. This could be something like forcing a rescan or refresh if necessary on the host itself (not the vm)- Parameters:
cluster-volume-- Returns:
-
buildDiskConfig
ServiceResponse<DatastoreTypeProvider.MvmProvisionFacet.MvmDiskConfig> buildDiskConfig(ComputeServerGroup cluster, ComputeServer server, StorageVolume volume) When creating/defining a virtual machine in libvirt, an XML specification must be generated. Within this specificaiton are device elements corresponding to disks. This method is called to allow the plugin to specify the disk config to be used for the disk device. It is important to factor in the server record and check if it has uefi or virtioToolsInstalled as this may change yourDatastoreTypeProvider.MvmProvisionFacet.MvmDiskConfig.DiskModeto VIRTIO- Parameters:
cluster-server-volume-- Returns:
-
releaseVolumeFromHost
ServiceResponse<StorageVolume> releaseVolumeFromHost(ComputeServerGroup cluster, ComputeServer server, StorageVolume volume) This is a hook call to allow the plugin to know if a vm is being moved off of a host or removed. It should not be used to remove volume but rather if there is work to be done to release the volume from the host. This could be something like forcing a rescan.- Parameters:
cluster- reference to the current cluster this is being run withinvolume-- Returns:
-