Currently In case of Hyper-V CloudStack only supports SMB share as the shared storage option. It doesn't support HA of VMs too. With the addition of Failover Clustering of Hyper-V support in CloudStack we can support other storage options such as iSCSI etc and HA of VMs. Any storage option which can be added as Cluster Shared volume to Hyper-V failover cluster can also be added to CloudStack. VMs which are added to Failover cluster are by default have HA.
This is functional specification for Failover Clustering support in Hyper-V. This feature will also add support for HA of VMs and Cluster Shared Volumes. This feature has jeera id CLOUDSTACK-8444.
- CSV support for Hyper-V
- Hyper-V and Failover Clustering
- Live migration with Cluster shared Volumes
- Deploy a guest cluster using shared Virtual Hard Disk
|Anshul Gangwar||Initial Draft||7th May 2015|
Cluster : It represents a Failover Cluster which is a group of independent computer systems(host). Sometimes cluster refers as CloudStack cluster, in that case failover cluster is referred to as failover cluster. For more details refer Failover Clustering
Cluster Shared Volume(CSV): Volume shared across failover cluster in Hyper-V. For more details refer CSV support
VM : Virtual Machine
We are using the native HA and CSV support provided by the Hyper-V. For more details on how to setup Failover Cluster with CSV refer links provided in references.
This feature will enable CloudStack to do following
- User can create HA VMs in Hyper-V setup
- User can have other storage options also such as iSCSI, Fibre channel
- Any storage option which can be added as Cluster Shared Volume can also be added to CloudStack.
This feature has following requirements
- Failover clusters will be created by User
- For new setups and new cluster there will be 1-1 mapping between Hyper-V Failover Clusters and CloudStack Clusters.
- Hosts will also be added to failover cluster by user before adding it to cloudstack
- If host is not added to corresponding cluster, we will fail the addition of host to cloudstack with appropriate error.
In upgraded setups
- For existing cluster HA of VMs will not be supported and these hosts will be assumed to not added to cluster.
- To add these hosts to failover cluster manual steps need to be followed, involving update in DB.
- New Clusters must have corresponding cluster on Hyper-V.
- If user is not upgraded to new failover cluster setups then it is required to add new failover cluster hosts in new zone.
- In same zone migration of VMs and their availability can not be guaranteed.
- iSCSI disks will be added to Cluster as Cluster Shared Volume by the user
- we will use Presetup option to add CSV to cloudstack.
- we will take the Disk name as input. Disk name shouldn't have space in name and user has to make sure of that. Adding disks with space in name will fail.
- With this we can support any storage which can be added as CSV.
- For CSV related requirements refer CSV support
HA : High Availability of Virtual Machines
- HA VMs will be added to Cluster. We are using the High availability feature provided by the Failover clustering in Hyper-v.
- HA VMs will be added to Cluster with medium priority
- Domain Router will be added to cluster with high priority
- Non-HA vms will be added to failover cluster with 0 priority so that they are not set to automatically start.
- Migration of vms across cluster will be supported with little hitch(during vm migration if host goes down then it will not be automatically added to cluster and user has to manually add it to cluster so that it becomes HA again.
- Migration across cluster HA vms is supported
- first we will remove the vm from cluster
- then we will migrate the vm to destination host
- after completion of migration we will add the vm to cluster on that host
- Non-HA vms will be migrated as before
- User wants some VMs to be highly available.
- User wants other storage options such as iSCSI as they have better performance.
Architecture and Design description
- When user add the host which is added to failover cluster then we will do the following
- We will get the cluster details from Hyper-V host
- If cluster exists then after getting details we will update the cluster guid (generated from the name of failover cluster) if it is null otherwise validate against existing guid and will report to user appropriately.
- If there are some hosts in failover cluster which are not added to cluster then we will log the warning message that all hosts are not added to cluster
- User have to add all the hosts in failover cluster to corresponding cluster in CloudStack. Otherwise there will be unexpected behaviours.
- While connecting again we will validate the cluster again. If it is changed then we will throw the error appropriately.
- If the host is not part of cluster the we will continue to use the existing behaviour.
- When user creates HA VM
- We will add it to failover cluster on the host
- When user creates non-HA VM
- We will add it to failover cluster with priority 0 i.e. do not auto start
- non-HA VMs migration behaviour will be same as before
- When HA-ed VMs are migrated across cluster
- Remove Vm from cluster
- Migrate it as non-HA VM
- When migration is finished add it to failover cluster on host
- During migration if the host goes down then user have to add the VM to cluster manually otherwise it will not be HA VM.
- User can add the CSV by using the Presetup option same as XenServer.
- When user wants to add the CSV
- User have to provide disk name. Space in disk name will not be supported.
- We will validate whether disk with that name exists in CSV
- If exists we will return the path of CSV.
- There will be no change in other operations related to volume and storage.
- VMs moving to other host for being HA will be automatically synced by VMsync.
- Alert will be generated if during HA VM migration it cannot be determined whether it is added to cluster or not.
- CSV and HA related logs will mainly be available on Hyper-V agent.
- Hosts which are part of failover must be added to same cluster on CloudStack. If not appropriate errors must be thrown.
- Existing clusters before upgrade must work as before.
- During reconnect if host's cluster have changed then appropriate errors are logged/thrown.
- HA VMs cannot be migrated to old clusters or to clusters which doesn't have corresponding failover cluster.
- CSV are added properly and can be identified by CloudStack properly.
- Volume/pool related operations are working fine.
- System VMs are handled properly in case of failures.
- Router VM is getting configured properly if moved due to HA.
- For out of band changes i.e. VM movement from one host to other host VMs state is properly updated in CloudStack.
Web Services APIs
- We need to add Presetup option while adding primary storage in case of Hyper-V also and need to update the description of text box appropriately.