VirtOps#4: track any change in your virtualized infrastructure

Do you want to keep track on what changed in your virtualized infrastructure? But also to clearly see in details any difference and when? It's already possible: discover how!

VirtOps#4: track any change in your virtualized infrastructure

This is another blog post in our VirtOps series. This time, we'll cover a new topic: tracking changes in your virtualized infrastructure (XCP-ng or XenServer/Citrix Hypervisor) thanks to our Netbox plugin in Xen Orchestra.

Context

6 months ago, we added a new plugin in Xen Orchestra: our great Netbox sync feature. Since then, you can synchronize all your VMs and host IP addresses to your Netbox instance. See our initial announcement below:

DevBlog #9 - Netbox synchronization with XO
When you start to have a lot of virtual machines and IP addresses, you might need to organize a bit with an IPAM. Netbox is such a thing.

But Netbox is more than just an IPAM. It's a real way to manage your whole infrastructure (virtual and real) from one web UI.

For example, you can have your own rack displayed, like we do for our own production and lab infrastructure:

Our current production rack displayed in Netbox UI

But this is not the main topic today. We'll talk about change tracking in your infrastructure, when you modify anything on your VMs, to keep a trace of this change. Regardless the fact that change was made by Xen Orchestra or any other client!

Change tracking

If you already have a fully automated infrastructure, for example, thanks to our Terraform provider, then you already know and manage correctly all your changes. On that topic, take a look at our previous articles on Terraform:

VirtOps #1: XO Terraform provider
DevOps series is back, and with great content about Terraform and Xen Orchestra!
VirtOps #2: Managing existing infrastructure with Terraform
How can Terraform be used for existing infrastructure outside of Terraform’s management?

But even in that case, checking what really changed in your virtualized infrastructure is important. And that's exactly where the Xen Orchestra combo with Netbox is great.

Any change, any client

To understand the power of change tracking via Xen Orchestra + Netbox sync, you need first to remember the big picture:

In short, Xen Orchestra is connected to your whole infrastructure and get all changes and events happening, 24/7. That's a good way to remember why XO is superior to other clients, thanks to the ability to run via a central daemon, xo-server.

It means that any change made via xe, XenCenter, Xen Orchestra or any other client will be visible in a next Netbox sync.

For how to configure the Netbox plugin, please check our documentation: https://xen-orchestra.com/docs/advanced.html#netbox

Note that you can create a dedicated netbox user for your sync from Xen Orchestra, this way, your changelog will be more clear.

Netbox UI

The default Netbox dashboard will have a "Change Log" panel on the bottom:

In the bottom: the change log list all modifications on your infrastructure

But you can also access the changelog panel on your main menu, "Other" then "Changelog" entry, and you'll have this:

Obviously, you can filter on objects, users and whatnot to discover all the changes.

Note: in our production context, we decided to sync XO to Netbox every hour.

Explore a modification

You can click on the ID in the previous table, and this will show you the details. You can imagine a wide number of interesting data to track, outside the obvious IP address change: memory, VM power status, disk size, placement and so on!

Let's explore some changes that has been made in our infrastructure, and how Xen Orchestra Netbox plugin sync is helping in this context.

Disk size changed

It's pretty clear that we added 10GiB of disk space for this VM

VM power status changed

We decided to shutdown this VM: the change is visible just after a sync

Conclusion

As you can see, any change is very visible and clearly explained. Combining Xen Orchestra and Netbox together can do more than their respective features. Thanks to a Xen Orchestra plugin originally made for synchronizing IP addresses, you can now even control and inspect any configuration change in your whole virtualized infrastructure! Netbox is truly a great tool, we recommend to deploy and use it đź‘Ť