Cloudmin GPL Script on CentOS 7 does not produce a working environment

Downloaded the CM GPL Script for Xen from

Running it I found a couple issues. The script installs xen and xen-libs from the repo chosen but those packages don't exist for CentOS 7 so I changed the script to read xen46 and xen46-libs. The script runs fine up until you hit the firewall section and then the grub loader.

Opening port 10000 on IPtables firewall ..
IPtables is not available
.. failed
Configuring GRUB to boot Xen-capable kernel ..
GRUB v1 not found on this system!
Cloudmin GPL has been successfully installed. However, you will need to
reboot to activate the new Xen-capable kernel before any Xen instances
can be created.

I fixed the grub loader to use the new Xen kernel and then rebooted. Server come up fine. When I try to use the xl command, I get errors.

[root@localhost ~]# xl info
xc: error: Could not obtain handle on privileged command interface (2 = No such file or directory): Internal error
libxl: error: libxl.c:116:libxl_ctx_alloc: cannot open libxc handle: No such file or directory
cannot init xl context

I'm stumped.



Howdy -- hmm, that's an unusual error! Sounds like there's a missing dependency.

I did some Googling, and see other examples of that occurring on CentOS 7, but most of those issues don't have solutions listed.

I'll continue to do some research into that, as we'd certainly like for Xen to work out of the box.

But I wanted to mention in the meantime that I'd highly recommend KVM over Xen if possible. It's far better supported by the various distros in question, but especially so on CentOS.

Steffan's picture
Submitted by Steffan on Tue, 07/19/2016 - 00:49 Pro Licensee

Problem is that I already have Xen VMs on CentOS 6 so moving to 7 is next. I tried the instructions here: with no luck. This is the same repo the gpl script uses. I emailed the package maintainer to see if he has any advice on this.

Can you tell us more about the changes you made to the install script? I'd like to test this out, and maybe include your changes in the official script.

Steffan's picture
Submitted by Steffan on Wed, 07/20/2016 - 00:09 Pro Licensee

I ended up nuking my script when I wiped the machine clean to start over fresh. I then followed the steps on exactly to the T. Lo and behold:

[root@localhost ~]# xl info
host                   : localhost.localdomain
release                : 4.4.13-1.el7xen.x86_64
version                : #1 SMP Thu Jun 9 13:25:43 AEST 2016
machine                : x86_64
nr_cpus                : 16
max_cpu_id             : 31
nr_nodes               : 2
cores_per_socket       : 4
threads_per_core       : 2
cpu_mhz                : 2394
hw_caps                : bfebfbff:2c100800:00000000:00003f00:029ee3ff:00000000:00000001:00000000
virt_caps              : hvm
total_memory           : 65523
free_memory            : 63786
sharing_freed_memory   : 0
sharing_used_memory    : 0
outstanding_claims     : 0
free_cpus              : 0
xen_major              : 4
xen_minor              : 6
xen_extra              : .3
xen_version            : 4.6.3
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : 
xen_commandline        : placeholder dom0_mem=1024M cpufreq=xen dom0_max_vcpus=1 dom0_vcpus_pin console=tty0 console=com1 com1=115200,8n1
cc_compiler            : gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
cc_compile_by          : mockbuild
cc_compile_domain      : [unknown]
cc_compile_date        : Fri Jun 24 12:30:10 AEST 2016
xend_config_format     : 4

I'll try tinkering with the script again but I can see it would work if modified for all the changes in CentOS 7.

Steffan's picture
Submitted by Steffan on Sat, 07/23/2016 - 09:48 Pro Licensee

You guys never added back the ability to attach a file to EACH comment so, here is what I have so far for tonight. I have not yet been able to test the changes you make to the virt stuff. The file you check for doesn't seem to exist on CentOS 7 so not sure if that's relevant or not. I'll work more on it tomorrow as I test each piece. I'm no pro like you guys but this script, as it sits will only work on RedHat/CentOS 7 not 6 because the Xen versions differ. With the repo you guys use, for CentOS 6 the package is xen but on CentOS 7 it's xen44, xen45 or xen46. I chose the latest. Xen 4.7 is coming out soon so I'm sure he'll have a xen47 before too long. I need to figure out how to parse those options and grab the latest and install that. There is only one kernel-xen in the CentOS 7 repo so, all good there. I did find an issue with the firewall that I'll need to check too.

Opening port 10000 on IPtables firewall ..
IPtables is not available
.. failed

Post Edited - See code below

Steffan's picture
Submitted by Steffan on Sat, 07/23/2016 - 09:49 Pro Licensee

I would suggest that you add some code that sees no bridges and offers to create one so that a user trying the product can immediately create a new VM with minimal hassle.

I agree to steffan, the bridge setup is a pain, if cloudmin has to compete with the likes of proxmox.. you need to make it more user friendly.. some of network wizard like how there is for virtualmin..

Steffan's picture
Submitted by Steffan on Sat, 07/23/2016 - 10:45 Pro Licensee

I am merely a novice with this but I tried to create the bridge through the webmin interface and had some issues with it locking myself out of the server. I went to the server and changed the files manually and got it up and working.

Has anyone else tested this to see if further refinements are needed?

This is actually something we're hoping to simplify. We're going to talk about making the bridge setup automatic, as part of a wizard during the setup process.

Steffan's picture
Submitted by Steffan on Tue, 08/09/2016 - 00:52 Pro Licensee

Any progress with this?

Sorry, not yet, but it is still on the todo list!

Steffan's picture
Submitted by Steffan on Tue, 09/06/2016 - 15:22 Pro Licensee

Hopefully this will be merged. I had a couple people try out the product but then had to come back to me for my script. It'll be cool to see what you come up with regarding setting up a bridge to get it immediately ready to start creating VMs.

Steffan's picture
Submitted by Steffan on Mon, 09/26/2016 - 15:22 Pro Licensee

Has this been applied to the script so you have a working version for download?

Sorry for the delay!

Simplifying the bridge setup is something we'd like to do, but unfortunately may take some time to complete. That can be tricky to do properly, since it's changing the networking settings of a server, which can cause downtime if not done properly.

In the meantime it would need to be setup manually, sorry!

Steffan's picture
Submitted by Steffan on Tue, 09/27/2016 - 09:23 Pro Licensee

The bridge part can wait. The script as-is on the site does not work on CentOS 7. The changes I provided create a working environment and everything short of the bridge setup. I provided this work so people don't get put off by a non-working installer. My request is that you merge what I've provided for now.

Ah, my bad -- I saw the last few comments were in reference to creating a wizard for setting up bridging, and completely overlooked the script you had shared above.

Do you happen to have a diff of yours as compared to the original?

In the meantime I'll follow up with Jamie about including these changes the official script. Thanks!

Bridge setup automatically is something i would endorse too, had myself also locked out once too :-)