# Cloud features with XCP-ng
You have multiple possibilities:
- Using Xen Orchestra Cloud features (ACLs, Self Service)
- Using CloudStack or OpenStack (adapted to very large deployments)
# Xen Orchestra
Some interesting "cloud-like" features are available in Xen Orchestra : ACLs and Self-service
ACLs can be used to allow some XO users to only see some resources. See more about ACLs on the official documentation.
The self-service feature allows users to create new VMs within a limited amount of resources (quotas). This is different from delegating existing resources (VMs) to them, and it leads to a lot of possibilities. Read XO official doc on it to know more.
At the outset this writeup is an outcome of this XCP-ng forum discussion. Basically, setting up XCP-Ng using XCP-ng Center is very straightforward but to overlay Cloudstack and get them all to work in unison is the tricky part. To provide more background , consider a 2 node XCP-ng 7.6.0 pool setup with iSCSI target running on a different host with all necessary traffic segregation principles applied (guest, storage and management).
# Installation Steps (with tips and tricks)
- Follow along the Cloudstack Management Server installation steps.
Tip #1: if you need iSCSI , when you login to Cloudstack Management UI avoid the "Basic setup" and choose the option "I have used CloudStack before" (the button that is less obvious) since with basic for some reasons forces you into NFS. But don't proceed with configuring your Cloudstack Management Server just yet.
If you have not setup your iSCSI storage on the XCP-ng pool . Please proceed to do it and ensure that they list in XCP-ng Center or Xen Orchestra and ensure everything looks good. So as listed in the Cloudstack Installation guide, we will be using the "Presetup" option to setup Primary ISCSI storage on Cloudstack.
Now SSH into the Cloudstack Management host, go to the folder (
/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/) . This folder contains several useful scripts which comes in handy pick the one that says
setup_heartbeat_sr.shand copy that over to the Xen Pool master host and ensure you have executable rights on script file .
Before you run the script , run the
lvscancommand which scan for presence of LVM on your pool and produce some result if you had made any undesirable edits to
/etc/lvm/lvm.conffile this step will most likely fail. If it does , make sure you restore the
lvm.confto its original state.
Now execute the
setup_heartbeat_sr.shwith the UUID of the iSCSI SR that you had setup in Step #2. Internally does lvcreate with a bunch of params . Which basically creates a hb-volume (heartbeat volume) for the SR.
After this succeeds proceed to setting up your Cloudstack Management host and your infrastructure and that point of adding your primary storage use the "Presetup" option. You'll see that it works without issues.
Note: At the time of writing this page: Cloudstack 4.12 and XCP-Ng 7.6.0 where the latest versions of the respective software.