Just to confirm. After copying new install.img
to my PXE environment, unattended installation went smoothly with my answer file.
Best posts made by bvitnik
-
RE: XCP-ng 8.0.0 Release Candidate
-
RE: Deploy VMs using Ansible
A milestone has been achieved
. All of my modules have been merged upstream. I've updated the first post with new info.
That will most probably be all for Ansible 2.8. I'm keeping some improvements and possibly more modules for Ansible 2.9. Currently, I'm thinking about what other modules could be useful so I could implement them. Any suggestion or wish would be much appreciated.
-
RE: Guest running kernel 6.8 hangs after a while
Has anyone been able to install Ubuntu 24.04 in VM from current official ISO? It seems that official ISOs (i.e. installer) still use unpatched kernel 6.8.0-22. Are there any newer ISO builds that I'm not aware of?
EDIT:
Sorry. False alarm. I screwed up my PXE settings. There was some leftover kernel and initrd images from beta versions of ISO. Kernel and initrd from latest ISOs work properly. -
RE: Ansible with Xen Orchestra
@john-c
I feel your pain, however, the main difference between VMware support in Ansible and XenServer/XCP-ng is that VMware has a whole working group with a dozen of regular members and contributors:
https://github.com/ansible/community/wiki/VMware
Major contributors are all Red Hat or VMware employees i.e. people paid to do it. There is no such thing for XenServer/XCP-ng. Citrix never showed any interest in supporting Ansible. Netscaler is the only Citrix product that has a decent Ansible support.
To help you better understand how Ansible as a project works, here are some points from my personal adventure:
- To be able to contribute new modules to Ansible or any of the official collections, you need to implement extensive unit and integration tests. I understand the requirement. Ansible/Red Hat wants to maintain a high level of quality and to easily (and in automated way) detect any regressions. That's all good but implementing tests is harder and more work than implementing modules themselves. What's very very helpful in case of VMware is that there is a whole simulator called
govcsim
developed by VMware. You can test your modules against the simulator with ease and automate all the tests with little effort. To my knowledge, there is no simulator available for XenAPI. If such simulator does exist, it is most likely kept in secret by Citrix. If Citrix was ever to release this simulator, that would be a HUGE step forward. - If you want to contribute new modules to Ansible or any of the official collections, someone has to review your code. Not many people are willing to do so and have the power to include your code to Ansible. As a matter of fact, finding reviewers and begging them for help is the hardest thing of all. I had some tremendous luck to acquire the interest of Abhijeet Kasurde, one of the top Ansible guys, to review my code and to eventually include
xenserver_guest_*
modules into Ansible. The guy handles VMware in Ansible... surprise!My
xenserver_guest
module was included without any unit or integration tests but for other modules I had to implement them. Luckily, they were simple and I had a luck to find a reviewer for tests also. When I wanted to upgradexenserver_guest
module with new functionality, they required unit and integration tests. I eventually implemented tests forxenserver_guest
module but it was a huge undertaking and the amount of code involved easily dwarfed the module itself. I basically ended up implementing a barebone XenAPI simulator. This is where I hit a road block. No one, even the people that initially supported me, wanted to review this monstrosity of test+simulator. It was never included in Ansible. - If you don't want to rely on external reviewers then you have to form a team, or if possible, a work group. That way you can review each others code and include it in Ansible without external support. Everything is pretty much handled by bots. If you gain a high enough status in Ansible project, you could get permissions to merge the code yourself without relying on anyone, not even bots. Should I mention that I failed to ever find any good Python programmer that is into Ansible and interested enough to form a team with me?
- You can skip all this struggle if you just maintain you own collection of modules but then you cannot rely on existing Ansible tooling that will do all the testing, linting, sanity checks, spell checks and such. You are on your own.
After a lot of struggle I eventually lost any interest as I was wasting a lot of time and life had to go on. Not much people showed interest in
xenserver_guest_*
Ansible modules either. My employer also ditched XenServer/XCP-ng in favor of VMware a few years back. Even with all the Broadcom/VMware situation, we got a super good deal with Broadcom because of our deployment size and commitment so we are sticking with VMWare.All in all, if Ansible support for XenServer/XCP-ng and Xen Orchestra on par with VMware support is ever to see the light of day, these prerequisites are required:
- Publicly available XenAPI simulator is a must
- A working group of at least three people with knowledge in Python, Ansible and XenAPI committed to the cause
- Possibly corporate and financial backing by Citrix, Vates? or some other third party
Having any official Ansible support for XenServer/XCP-ng was (and is) a miracle to this day. A miracle I was blessed with and a huge learning experience for me.
Sorry for the long post. It is not my intention to discourage people but I think everyone should understand why XenServer/XCP-ng does not enjoy better Ansible support. There is much much more to it than just having a willingness to do anything.
- To be able to contribute new modules to Ansible or any of the official collections, you need to implement extensive unit and integration tests. I understand the requirement. Ansible/Red Hat wants to maintain a high level of quality and to easily (and in automated way) detect any regressions. That's all good but implementing tests is harder and more work than implementing modules themselves. What's very very helpful in case of VMware is that there is a whole simulator called
-
RE: Ansible and XCP-ng
@Ruskofff said in Ansible and XCP-ng:
Edit : I found the Ansible module you talking about @cheese (with the other topic talking about Ansible on XenServer). I could start from this point for the deployment of VM yes. Seems good for me !
This is the thread:
https://xcp-ng.org/forum/topic/159/deploy-vms-using-ansible
I'm the author of the module. The thread is a little outdated but I will update it ASAP. Feel free to ask me anything regarding the module.
-
Deploy VMs using Ansible
Hi guys,
Sorry if this looks like shameless self promotion but for a few weeks now I've been working on Ansible module for managing XenServer/XCP-ng VMs - first of it's kind if I'm not mistaken. The module is in line with what Ansible offers for VMWare and there is a pull request to mainline it. What I would love is for anyone willing to help, and already familiar with Ansible, is to spare some time to test the module since the only way to test it is against real hardware. Of course, the module should not be tested in production environments.
UPDATE: 2019-03-01
Some of my Ansible modules have been merged upstream and are currently available in development version of Ansible. Ansible 2.8 will be the first official release to include these modules.
My work is currently centered around these three modules:
- xenserver_guest - upstreamed - used for deployment of new VMs from templates and reconfiguration of existing VMs.
- xenserver_guest_facts - upstreamed - used for getting VM facts (useful XenServer/XCP-ng VM params).
- xenserver_guest_powerstate - upstreamed - used for controlling VM power state (running/halted/suspended), graceful shutdown and reboot etc.
For anyone interested in using/testing these modules, upstreamed modules can be acquired by cloning Ansible repo from GitHub (or downloading the ZIP archive) and running Ansible from source. Instructions can be found here:
To use the modules, you will also need XenAPI.py from here:
https://raw.githubusercontent.com/xapi-project/xen-api/master/scripts/examples/python/XenAPI.py
Copy the file to your Python site-packages (e.g. /usr/lib/python2.7/site-packages/ on CentOS 7).
You can get module documentation by running this command:
$ ansible-doc <module_name>
or from official Ansible docs (upstreamed modules only):
- https://docs.ansible.com/ansible/devel/modules/xenserver_guest_module.html#xenserver-guest-module
- https://docs.ansible.com/ansible/devel/modules/xenserver_guest_facts_module.html#xenserver-guest-facts-module
- https://docs.ansible.com/ansible/devel/modules/xenserver_guest_powerstate_module.html#xenserver-guest-powerstate-module
CHANGELOG:
- Fixed a bug on XenServer 7.1 with Cumulative Update where a version could not be properly detected, causing an exception.
Thanks.
Latest posts made by bvitnik
-
RE: Dynamically Pool Selection criteria
@irtaza9 OK so you have VLANs per DC. That means VLAN5 in KPK-DC1 and VLAN5 in RWP-DC4 are unrelated and machines in those VLANs cannot communicate directly without going trough some router? This goes back to my original answer. You have to take into account network connectivity when deciding what DC/pool to select for VM provisioning. If you have a few VMs in VLAN5 in KPK-DC1 and you decide to provision some more VMs at latter time that require direct connectivity with existing VMs, you have no choice but to provision them in VLAN5 in KPK-DC1.
Regarding VLANs in general, this is all fine except you can scale it up to a few thousand of VLANs per DC so it will impose a hard limit on the number of isolated network segments (i.e. users/customers). Some weapon of choice among most cloud providers is to use some kind of network overlay like VX-LANs, GRE tunnels and such but this has issues of it's own. For a start, these kinds of networks are software defined in nature (SDN), require an orchestrator and network nodes that run in software. You can leverage some hardware acceleration here and there but it will still be software oriented and have scaling and latency issues. There is no silver bullet and most providers hide their network implementation details.
All in all, a good, scalable and fast networking i probably the toughest thing to implement in any large scale cloud provider... and I'm definitely not a network engineer so I can't say much about it
.
-
RE: Dynamically Pool Selection criteria
@irtaza9 You have VLANs stretched across your whole infrastructure? That means your broadcast domain is your whole infra
? That's a bit risky. A broadcast storm can bring your whole infra down instead of being contained in a single DC for example.
-
RE: Dynamically Pool Selection criteria
IP address availability is also a criteria, but OK, it can be considered a "resource" like CPU, RAM and storage. There is also network connectivity issue. If you are using some private addressing, either any private subnet has to be addressable/connectable from any part of your whole infrastructure or you have to group your VMs per IP subnet availability (regions?) so that VMs belonging to the same logical group can have network connectivity between themselves.
Just out of curiosity, is this a hypothetical question or do you really have this huge infrastructure? Multiple pools with 64 hosts sounds like a considerable amount of resources. My experience is that if you go above 20 hosts per pool, you get all kinds of scalability issues.
The issues described here usually require some cloud platform deployed on top of XO/XCP-ng if you want to manage infrastructure as large as this and provide full flexibility to you users.
-
RE: Guest running kernel 6.8 hangs after a while
Has anyone been able to install Ubuntu 24.04 in VM from current official ISO? It seems that official ISOs (i.e. installer) still use unpatched kernel 6.8.0-22. Are there any newer ISO builds that I'm not aware of?
EDIT:
Sorry. False alarm. I screwed up my PXE settings. There was some leftover kernel and initrd images from beta versions of ISO. Kernel and initrd from latest ISOs work properly. -
RE: XCPNG 8.3 availability?
@olivierlambert Will 8.1 to 8.3 upgrade path also be supported?
-
RE: Ansible with Xen Orchestra
@olivierlambert I would have never guessed that I sound so pessimistic
... I just wrote my experience... reality is sometimes harsh.
Glad to hear you are investing in dedicated people. With more people, a good team and being a company, you certainly have more leverage than independent volunteers like myself. Any road map you can share publicly?
-
RE: Ansible with Xen Orchestra
@john-c
I feel your pain, however, the main difference between VMware support in Ansible and XenServer/XCP-ng is that VMware has a whole working group with a dozen of regular members and contributors:
https://github.com/ansible/community/wiki/VMware
Major contributors are all Red Hat or VMware employees i.e. people paid to do it. There is no such thing for XenServer/XCP-ng. Citrix never showed any interest in supporting Ansible. Netscaler is the only Citrix product that has a decent Ansible support.
To help you better understand how Ansible as a project works, here are some points from my personal adventure:
- To be able to contribute new modules to Ansible or any of the official collections, you need to implement extensive unit and integration tests. I understand the requirement. Ansible/Red Hat wants to maintain a high level of quality and to easily (and in automated way) detect any regressions. That's all good but implementing tests is harder and more work than implementing modules themselves. What's very very helpful in case of VMware is that there is a whole simulator called
govcsim
developed by VMware. You can test your modules against the simulator with ease and automate all the tests with little effort. To my knowledge, there is no simulator available for XenAPI. If such simulator does exist, it is most likely kept in secret by Citrix. If Citrix was ever to release this simulator, that would be a HUGE step forward. - If you want to contribute new modules to Ansible or any of the official collections, someone has to review your code. Not many people are willing to do so and have the power to include your code to Ansible. As a matter of fact, finding reviewers and begging them for help is the hardest thing of all. I had some tremendous luck to acquire the interest of Abhijeet Kasurde, one of the top Ansible guys, to review my code and to eventually include
xenserver_guest_*
modules into Ansible. The guy handles VMware in Ansible... surprise!My
xenserver_guest
module was included without any unit or integration tests but for other modules I had to implement them. Luckily, they were simple and I had a luck to find a reviewer for tests also. When I wanted to upgradexenserver_guest
module with new functionality, they required unit and integration tests. I eventually implemented tests forxenserver_guest
module but it was a huge undertaking and the amount of code involved easily dwarfed the module itself. I basically ended up implementing a barebone XenAPI simulator. This is where I hit a road block. No one, even the people that initially supported me, wanted to review this monstrosity of test+simulator. It was never included in Ansible. - If you don't want to rely on external reviewers then you have to form a team, or if possible, a work group. That way you can review each others code and include it in Ansible without external support. Everything is pretty much handled by bots. If you gain a high enough status in Ansible project, you could get permissions to merge the code yourself without relying on anyone, not even bots. Should I mention that I failed to ever find any good Python programmer that is into Ansible and interested enough to form a team with me?
- You can skip all this struggle if you just maintain you own collection of modules but then you cannot rely on existing Ansible tooling that will do all the testing, linting, sanity checks, spell checks and such. You are on your own.
After a lot of struggle I eventually lost any interest as I was wasting a lot of time and life had to go on. Not much people showed interest in
xenserver_guest_*
Ansible modules either. My employer also ditched XenServer/XCP-ng in favor of VMware a few years back. Even with all the Broadcom/VMware situation, we got a super good deal with Broadcom because of our deployment size and commitment so we are sticking with VMWare.All in all, if Ansible support for XenServer/XCP-ng and Xen Orchestra on par with VMware support is ever to see the light of day, these prerequisites are required:
- Publicly available XenAPI simulator is a must
- A working group of at least three people with knowledge in Python, Ansible and XenAPI committed to the cause
- Possibly corporate and financial backing by Citrix, Vates? or some other third party
Having any official Ansible support for XenServer/XCP-ng was (and is) a miracle to this day. A miracle I was blessed with and a huge learning experience for me.
Sorry for the long post. It is not my intention to discourage people but I think everyone should understand why XenServer/XCP-ng does not enjoy better Ansible support. There is much much more to it than just having a willingness to do anything.
- To be able to contribute new modules to Ansible or any of the official collections, you need to implement extensive unit and integration tests. I understand the requirement. Ansible/Red Hat wants to maintain a high level of quality and to easily (and in automated way) detect any regressions. That's all good but implementing tests is harder and more work than implementing modules themselves. What's very very helpful in case of VMware is that there is a whole simulator called
-
RE: Terraform provider for Xen Orchestra
XCP-NG / xen guest tools support network configuration through guest agent but for Windows guests only:
or even better, the original article:
Using the same mechanism (XAPI->xenstore), an agent for *nix guest can be implemented too. Unfortunately, no one has stepped in for that job. Citrix seems to be uninterested. I have a basic idea how to implement the agent but I lack free time to do so.
-
RE: XCP-ng 8.0.0 Release Candidate
Just to confirm. After copying new
install.img
to my PXE environment, unattended installation went smoothly with my answer file. -
RE: XCP-ng 8.0.0 Release Candidate
@stormi So is
install.img
the only thing changed in ISO or is there some changes to rpm packages?