How to use local storage for CloudStack VMs

Last updated on July 6, 2020 by Dan Nanni

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:

$ sudo service cloud-management restart

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.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean