0

I am trying to create a mobile Cloudstack 4.2 on 2 PCs. 1st pc = Xenserver 2nd pc = ACS 4.2

I am quite stuck in creating Primary storage during the Cloudstack UI as it prompt me "Something went wrong; You may go back and correct errors, Failed to add data store"

This is what I have do when trying to make my local storage as primary/secondary storage.

mkdir -p /export/primary /export/secondary

nano /etc/exports 

/export  *(rw,async,no_root_squash,no_subtree_check)

exportfs -a

mount -t nfs 172.16.109.4:/export/primary /export/primary
mount -t nfs 172.16.109.4:/export/secondary /export/secondary

usr/share/cloudstack-common/scripts/storage/secondary/cloud-install-sys-tmplt -m /export/secondary -u http://d21ifhcun6b1t2.cloudfront.net/templates/4.2/systemvmtemplate-2013-07-12-master-xen.vhd.bz2 -h xenserver -F

Cloudstack-setup-management

I have successfully managed to enter the Cloudstack UI but fail at fail to add data store. Adding host was fine too.

I would like to ask if my step is correct? (Definitely wrong as I did not achieve my result)

and

Why it's wrong? How could I correct it?

Is it because I am stacking the folders?

Seeding the template goes into the NFS storage or it's mountpoint?

I have successfully deploy cloudstack with running VMS with a external NFS storage but it's too slow as my network is quite slow...

Thaillie
  • 1,362
  • 3
  • 17
  • 31
Tsu Wei Quan
  • 335
  • 1
  • 5
  • 19

2 Answers2

1

If you want to use local primary storage with XenServer you need at least two things:

  1. enable local storage in CS global settings (Global settings -> search for local -> set to true -> restart CS Management Server)
  2. make sure you have enough space allocated for the primary storage on the XenServer. Xen server uses LVM to create a primary storage volume. You can see the volume it's using by doing xe sr-list on you XenServer console (where sr stands for storage repository)

See the script in [1] for guidance on how to setup your XenServer for CS. Or feel free to use the script and make pull requests whenever you find something that is not right.

[1] - https://github.com/schubergphilis/cloudstack-utility-scripts/blob/master/devcloud/setup-xen-server.sh

Miguel Ferreira
  • 1,282
  • 11
  • 27
  • Thank you for your help Miguel, however i am actually trying to use the Management Server as the NFS Server as my Management server have 16GB of ram and 2TB, trying to host an private cloud without the need of NFS external storage. I have followed the guide on [ 4.5.7.2. Using the Management Server as the NFS Server ] @ [https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Installation_Guide/management-server-install-flow.html#prepare-nfs-shares] I have followed everything and Seeded the System vm but still stuck at Adding Primary storage; Fail to add data store. – Tsu Wei Quan Jul 31 '14 at 12:32
  • @WeiQuan the NFS export is typically for the secondary storage. I don't think that you can use a normal file system directory as your primary storage in XenServer because XenServer manages local storage via its storage repository. To be sure, can ask on the CloudStack user and/or dev mailing lists. – Miguel Ferreira Jul 31 '14 at 12:59
  • Oh my now i understand what you meant, the only way is i could a private cloud with 2 PCs is to place my primary storage and secondary storage repository in Xenserver! Am i right to say this? – Tsu Wei Quan Jul 31 '14 at 13:18
  • The secondary storage can be anywhere (as long as the XenServer machine can mount it, e.g. via NFS). For the primary storage, if you choose local storage, then it has to be local to your XenServer. – Miguel Ferreira Jul 31 '14 at 13:55
  • Thank you for your help! Really appreciate your assistance :D – Tsu Wei Quan Jul 31 '14 at 14:00
0

Using cloudstack local storage has some key point you should pay attention to . I used kvm as cloud hypervisor but not too different form Xen.

  1. make sure you tag all the agent hosts and storage
  2. configure the agent.propery .
  3. create your own compute offering and disk offering
  4. create new vms using the new compute offering and disk offering .

Apache working with storage already list some tips for local storge but not so clear .You can refer to my personal blog here.Hope it helps.

how to configure local storage for cloudstack

john
  • 31
  • 1
  • 3