Configure an NFS Datastore
Configuration Steps
There are 4 steps to configure and use an external NFS datastore.
Configure the network interfaces in the VM Squared cluster to connect to the external infrastructure and to access to the NFS datastore.
- The VM Squared dashboard must have access to the NFS server
- Every individual VM Squared host must have access to the NFS server
Create the NFS datastore on VM Squared.
Create a VM Template that uses the NFS datastore.
Create a VM instance from the new VM Template.
Configure network interfaces
VM Squared configures the network interfaces to the external infrastructure through the dashboard console using the manage-networking command.
Warning
A unique IP address must be allocated for the dashboard AND every host.
In this example, we create a new network for the nfs service and supply a range of unique IP addresses.
- Select Option [1] to create a new network. Enter the network name nfsnet and subnet 192.168.3.0/24.
- Select Option [4] to specify a range of IP addresses to use. In this case, the start address is 192.168.3.100, and the end address is 192.168.3.200.
- Select Option [3] to specify a route.
- The user can choose to specify a range of IPs to exclude, statically assign IPs to specific hosts, or exclude hosts from this network. In this example, we skip these options and select Option [0] to return to the main menu. Once back at the main menu, select Option [5] to commit changes.
At this point a new network has been created and is available to the VM Squared cluster. The next step is to create the NFS datastore.
Create an NFS datastore
Once the external infrastructure has been configured on every host and on the VM Squared dashboard, an NFS datastore can be created. NFS datastores are configured on VM Squared through the dashboard console.
Datastore creation
Log into the VM Squared dashboard console and run the manage-nfs command:
Select Option 1 to create a new datastore. You will be prompted to enter the name of the new datastore and the path to the NFS server:
Validate
Launch Glasshouse and navigate to Storage/Datastores. Confirm the new NFS datastore is present in the list.
Datastore management
Once a datastore has been created it can be deleted using the manage-datastores command.
VM Squared places a lock on all datastores that prevents its deletion before its contents. All VM instances and Templates that use a specific datastore’s assets must first be deleted before the datastore can be deleted.
Create VM Template
To create a VM that uses NFS as a datastore we must first create a template that uses NFS as a resource.
- Navigate to the Apps section and select the desired template.
- Click on the
Import into Datastore
button.
- Specify the name of the new template and click next.
- Select the NFS datastore and click Finish. At this point we have created a VM template that uses the NFS datastore.
This step assigns the VM Template and any subsequent VM instances to the NFS datastore.
Create the VM Instance
- To create a VM instance, navigate to the VM Templates, select the new template, and click on the
Deploy
button.
- Navigate to the VMs and select the new instance. Select the
Storage
tab and confirm the datastore is NFS.
Next Steps
Next steps
Now that an NFS datastore has been created you can:
- Upload images to the datastore
- Create more VM Templates that use the datastore