When CloudStack is deploying a VM (including guest VMs and system VMs), by default, the VM is set to use NFS-mounted primary storage as their root partition. The NFS-mounted primary storage is shared among all compute nodes located in the same CloudStack cluster. One of the reasons for using shared primary storage is VM migration. It is easy to migrate a VM from one compute node to another if the VM is backed by the same shared primary storage. If you don't need to migrate VMs, and compute nodes have plenty of local storage, you can configure CloudStack such that deployed VMs use compute node's local storage.
In order to use local storage for CloudStack VMs, log in to CloudStack's management interface as admin, and do the following.
Go to "Global Settings", and change the following attributes to "true":
Note that these changes won't take effect until CloudStack's management server gets restarted. So make sure to restart CloudStack management server afterward:
Next, you must create a new Compute Offering which uses local storage for VM storage. To do so, go to "Service Offerings" in CloudStack's management interface, and choose "Compute Offerings". Then add a new Compute Offering with "Storage type" set to "Local".
Now when you deploy a new VM, you need to choose the Compute Offering that you just created, in order to use local storage.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!