We recently purchased new storage so the new datastores had to be added to vCloud director, and all the vApps migrated over. There are many ways to go about doing this but the best solution I found was to create a new storage cluster and put all datastores in it and also create a new storage policy and profile. I have been told it is also possible to just perform a storage vmotion on the VM’s but i had mixed results with this approach. Here is my information which I hope might be useful to someone.
In Vcenter server:
- Create tag category (I called mine “storage policies” to keep it simple”, but description can also be used to describe the function)
- Create tag and add to category
- Open VM storage policies
- Create new VM storage policy
- Select vCenter
- Enter a policy name
- Provide description
- Add tag-based rule and assign newly create tag from tag category.
- I ALWAYS FORGET to enable the policy so here is not to you doing the same 🙂
- select the new policy name
- 2nd icon from left is “Enable VM storage policies per compute resource.
- Assign the newly created tag to datastore cluster
- Assign the newly created tag to each datastore within the cluster.
In vCloud director:
- Under Manage & Monitor tab select vCenters from vSphere resources.
- Right click the vCenter server name and select “refresh storage policies
After you get the storage profile to show in storage policies you have to assign it:
- Go to Provider VDC and open it
- Select storage policies tab
- Add new storage policy!
- There is a BUG in 5.5.1 which does not refresh or show the storage policy and an outage is actually necessary to clean up the database with a script (not very nice but works)
- Go to Organizations and open the one which will be using the new storage
- Select Virtual datacenter tab
- Select Storage policies tab
- Add the new storage policy
- If you want the new policy to be the default – Right click the new storage policy and select “Set as default”
Migrating vAPPS to new storage profile:
- The best method I found was to shutdown the vAPP and right click select “move to” and then each individual VM select the new storage policy.
- You can also do this with a powered on VM and go to properties and change the storage polic
This normally happens when a new datastore is added to the storage cluster which is associate to a storage policy for the vCloud Director Organization. The rule-set (storage capability) was not properly set to the datastore before it was added to the datastore cluster.
All the datastores, datastore clusters and policies disappear and you get the following errors:
Error on provider VDC:
No datastores accessible to VDC
On Provider VDC storage policies tab:
This storage policy is not backed by any usable datastores accessible from this VDC.
There is no usable datastore accessible from this VDC that supports this storage policy. Ensure that this storage policy is backed by at least one datastore in vCenter Server, this datastore is enabled in vCloud Director, and the datastore(s) are accessible by the hosts in the clusters used by this VDC.
Verified that all the datastores in the datastore cluster have the storage capability (Tag) assigned which is associated to the provider VDC.
Check Compliance of the VM Storage profile in vSphere Web client
- On Home page, select Vm Storage Policies.
- Right click the storage policy and select “Check compliance”
- Select the VM Storage Policy
- Verify everything compliant
- Select Monitor tab
- Select Matching Resources
- Verify that the datastore cluster is showing up as well as all the datastores
Refresh storage policies for vCenter on vCloud Director System.
- In vCloud Director, under vSphere Resources select vCenters.
- Right click on the vCenter name and select “Refresh Storage Policies”
Adding a new datastore to vCloud storage profile has change just a little bit with vSphere Web client.
refer to my previous post to see the difference:
Information to know up front:
Storage policy/profile name
Storage capability (Rule-Set 1 Tag) – vSphere Web migrated the capabilities to Tags
- This is normally handled by storage team which will provide the LUN.
- Since I am also the storage engineer I created the LUN from my Dynamic Pool on the Hitachi AMS 2100.
Within vCenter server web client:
- Right click the ESXi host from vCloud datastore
- Select “all vCenter actions” from menu -> Rescan storage
- Only need to check the Scan for new Storage devices.
- Rick click the ESXi host again
- Select “New datastore”.
- Type – VFMS or NFS depending on block or file level storage.
- Datastore name
- Select version
- Partition size
- Go to vSphere web client home page.
- Select VM storage policies which will be associated to this datastore.
- Edit the VM storage policy, select Rule-set and write down the Tag name
- Right click the newly added datastore
- Select “Assign Tag”
- Add the Tag to datastore for association to VM Storage policy.
- Now you can add the new datastore to the Datastore cluster.
The vSphere client makes use of the following terminology:
The vSphere web client makes use of the following terminology:
Rule-Set through TAGS
The main thing to take note of here is that Storage capabilities created in vSphere client is migrated over to TAGS within vSphere Web client. These tags are then assigned to the VM Storage Policy through the rule-set.