Prepare NFS Server For CloudStack Management Server
Now I have to show this tutorial prepare NFS Server for cloudstack management server. CloudStack management server needs two nfs share such as primary and secondary. It can be used separate nfs server or used cloudstack mgmt server as nfs server.
I will configure separate nfs server on cloudstack mgmt server.
Step #01: Install nfs kernel server on ubuntu 14.04
[email protected]-nfs:~# apt-get install nfs-kernel-server
Step #02: CloudStack all host, VM, snapshot, volume, iso image and more store on the two directory such as /primary and /secondary.
- Primary storage store on all running VM on host. At least on primary storage must be configure per zone basis.
- Secondary storage store templates, iso image and disk volume snapshot etc.
Step #03: Create two directory /mnt/primary and /mnt/secondary for nfs share.
[email protected]:~# mkdir -p /mnt/primary /mnt/secondary
Step #04: Insert /etc/exports file your created directory. Open /etc/exports file and insert below line.
/mnt/primary/ 10.55.0.0/16(rw,async,no_root_squash,no_subtree_check) /mnt/secondary/ 10.55.0.0/16(rw,async,no_root_squash,no_subtree_check)
Service nfs kernel server command below.
service nfs-kernel-server start service nfs-kernel-server stop service nfs-kernel-server restart showmount -e
Step #05: Insert public or local domain name on /etc/idmapd.conf below line.
Open your /etc/idmapd.conf file
[email protected]:~# vim /etc/idmapd.conf
NEED_STATD=yes STATDOPTS="--port 662 --outgoing-port 2020"
Step #06: Goto cloud management server for mount /mnt/secondary directory. Create /mnt/secondary directory on your cloud management server.
[email protected]:~# mkdir /mnt/secondary
Step #08: Mount /mnt/secondary directory from nfs share on your cloud management server.
[email protected]:~# mount -t nfs your_nfs_server_ip:/mnt/secondary /mnt/secondary/
If you confuse then goto /mnt/secondary and create “test_directory”. Now goto nfs server /mnt/secondary and check this created directory.
Step #09: Download vhd-util files from below link.
Import downloaded vhd-util file below location.
Step #10: Prepare the system VM template. Now run below command for download system VM. Wait for at least 30 minute or less.
[email protected]:~# /usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary/ -u http://cloudstack.apt-get.eu/systemvm/4.6/systemvm64template-4.6.0-xen.vhd.bz2 -h xenserver
Step #11: when download completed then umount /mnt/secondary and remove /mnt/secondary directory from your cloud management server.
[email protected]:~# umount /mnt/secondary
[email protected]:~# rm -rf /mnt/secondary