Proxmox VE vs VMware admin via Ansible and Ascender
With many teams weighing alternatives to VMware, a common worry is whether a new hypervisor can be automated the same way. Greg Sowell answers by driving both VMware vCenter and Proxmox VE from Ascender in this demo, and notes the approach should carry over to Hyper-V, oVirt or another hypervisor of choice. After a quick tour of both consoles, he launches a VMware VM control job template whose survey asks for an action (provision, start, stop or delete), VM name, disk size and CPUs, then does the same for Proxmox.
The playbooks behind the templates look strikingly alike. Each keeps its variables at the top as documentation, clones a template to build the VM, and uses a vm_action variable with conditionals to decide which start, stop or delete task runs. The Proxmox playbook pauses ten seconds after provisioning before starting the VM and briefly before delete so the API can catch up. Greg also introduces YAML anchors, aliases and overrides, which let the proxmox_kvm module's required api_user, api_password and api_host parameters be injected from a single anchor rather than repeated in every task.
Both test-rocky9 VMs appear in their consoles, and Greg then stops and deletes them from Ascender, noting that an Ascender API integration with a tool like ServiceNow keeps the user experience the same regardless of hypervisor, and floats his next demo: migrating VMs from VMware to Proxmox.
Key takeaways
- An Ascender survey prompts for action, VM name, disk size and CPUs, then passes the answers to the playbook as extra vars.
- The VMware and Proxmox playbooks share the same structure: variables at the top, a clone-based provision task, and conditional start, stop and delete tasks.
- Proxmox does not start a newly created VM by default, so the playbook pauses ten seconds and then starts it explicitly.
- YAML anchors, aliases and the override merge syntax let required proxmox_kvm auth parameters be defined once and reused in every task.
- Automating through Ascender makes switching hypervisors feel seamless, and an API integration with a tool like ServiceNow keeps the user experience unchanged.
Questions this video answers
Can Proxmox VE be automated with Ansible like VMware?
Yes. Greg provisions, stops and deletes a test Rocky Linux 9 VM on Proxmox using the proxmox_kvm module from an Ascender job template, mirroring what a nearly identical playbook does against VMware vCenter. Both are launched from surveys and behave the same, and he says Hyper-V or oVirt should work similarly.
What are YAML anchors and aliases and how do they help Ansible playbooks?
An anchor marks a block of YAML, such as Proxmox authentication details, with an ampersand and a name. An alias references that block elsewhere, and the merge override syntax lets you add or override parameters alongside it. The proxmox_kvm module requires api_user, api_password and api_host in every call, so the anchor keeps those calls short.
About this video
While VMware is a great product, folks are often looking for alternatives. A large question they have is "will I be able to automate it like I do VMware?" Greg aims to show how easy and seamless it can be to automate (using Ansible and Ascender) VMware and an alternative hypervisor Proxmox VE. Keep in mind this should work similarly with your hypervisor of choice.
This video is part of the Ascender Pro playlist. Browse every CIQ video by product and topic.
Transcript
hey everybody I'm Greg Sowell and welcome to another ciq demo today I'm going to be showing you using anable and Ascender to automate hypervisors so there's been a lot of chatter lately about uh Alternatives perhaps to VMware so I thought I would show how we automate well one VMware but also some of the Alternatives and I'm going to be using proxmox today but this could be your hypervisor of choice right so maybe you do hyperv or overt or really anything else it's probably going to look and operate very similarly so let's uh take a look at my VMware console really quick if you
are familiar with uh Venter right you've got all of your machines in here I've got all my various acutron storage cluster information all that good stuff is in here and I can see kind of uh snapshots for these hosts all right or rather these guest VMS I can see all their snapshots I can go into their console I can right click on them start stop edit the settings all that good stuff's there if you've never seen proxmox this is what it looks like feels familiar right I've got my information down here I've got all of my data center right so that's going to be my
cluster here's my individual uh hypervisors and then I've got uh VMS inside right now I don't have any we're going to create some here momentarily but I've got got say my templates I rightclick on stuff right I can rightclick create the new VMS I can edit settings all that stuff feels very familiar so while the interface feels familiar moving around I wanted to show you what it can look like to automate against them so in here in my Ascender I'm going to go to my template section and again Ascender is our uh automation our Enterprise automation platform that allows you to kind of securely uh
create and share automation inside of here so I'm going to do my uh VMware let's go to my VMware one first so VMware control I wrote A playbook and I'll take a look at them here in just a moment so you can kind of juxtapose the two uh to do some VMware control so this one again this is kind of demo purposes you probably wouldn't necessarily do it in this specific way but I can click the launch button over here and it pops up what we call a survey and so a survey is the ability for you to really quickly easily build all this information
View full transcriptHide full transcript
you see here to prompt the user to hey fill in the blanks and let's build something or let's do something so I can go and I can get a bunch of information so here I'm allowing them to choose what they want to do with this VM provision start it stop it delete it so I'm going to provision it because it doesn't exist yet and so uh test- rocky9 I can fill in the blanks on all this good stuff right that's going to pick out hard drive size and how many CPUs all that good stuff I'm going to click next I'm going to click launch and
Off to the Races it's going to go and it's going to build all that stuff now I want to do the exact same thing for proxmox so let me find my proxmox template I got it right here VMware or rather proxmox VM control I'm going to launch it and again I have a survey you can see I paired this one down I don't have nearly as much information in the Playbook I have Provisions for say number of uh virtual sockets CPUs all that stuff so I can customize the networking and I could add that to my survey but I just wanted to kind of keep
it little succinct and and clean uh here for this one so again I've got all the exact same options provision start stop delete that I've created now just because I only have four things in here doesn't mean there's only four things you can do I'm just trying to keep this simple right there's so much more you can do with this automation virtually anything you need to do to the template to the virtual machine I can do all those things through automation so I'm going to build a test- rocky9 on my prox MOX as well I'm going to click next and really when I click next
what it's doing is it's presenting me with all the information basically here's all the variables that I'm passing in and essentially that's what the survey does it takes those variables and it just passes them into the Playbook as extra bars so I'm going to go ahead and click launch and it should be often running I'm going to jump over to the job section and I can see the status of all my currently running jobs so my uh VMware control is currently running right now my proxmox one is going to be running here shortly as well as these things complete I'm going to pop over here
and I'm going to show you a couple of the playbooks so here is the proxmox Playbook really essentially I have a variable section up at the top where I am setting kind of some defaults most of these I actually override but I like putting all of my variables up at the top so that I can kind of see them it's just sort of um documentation purposes even if I'm override them I like putting them up at the top with all the uh kind of default information or some extra information about what I'm going to be doing with this stuff and then down here in my
task section you can see here's me building excuse me the VM itself I'm really just cloning and I'm telling it what template to clone and I'm filling out some extra information in here and it will build it so in proxmox whenever you build a new VM it doesn't start it by default so I have it uh provision it it's going to pause for 10 seconds and then it'll go ahead and start that VM up and also with these start and stop tasks ESS what I'm doing is I'm setting a variable called vmore action and I'm using conditionals to determine oh do I run this do
I run this which task am I actually going to run so I've got start stop delete in there as well uh for the delete action I actually have to stop it really quick pause just for a second so the API can catch up and then go ahead and do that delete action now looking at this you might see something you're unfamiliar with and it's something my uh boy Nick just taught me it's called anchors aliases and overrides and it's something built into yaml I'm not going to go too down or rather too deep too far down the rabbit hole on it but I just wanted
to kind of introduce the concept A little bit so you have something called an anchor and if you look right here under this proxmox off variable I have in the variable section I have an anchor so it's got the ET sign and then a name the name for the anchor right here I have it the same name as the proxmox unor off variable it doesn't necessarily have to be it could be something else but what an anchor essentially says is everything underneath this anchor I'm using it as a reference point right so um I can come back to this uh via an alias somewhere else
and I'm just going to basically take this chunk I'm going to paste it in somewhere else so it's slightly different because if I take a look at this section right here so this proxmox KVM module you can see I have commented out API user password host that's uh variables that are expected to be in here so I can't just Define those variables somewhere else those parameters the module itself expects those to be there and if they're not there the module's going to airor out it needs those to be in there so they can't just be defined somewhere else but what I can do is I
can have an anchor so you see asri proxmox unor off that's uh or rather that's an alias so I'm referencing that anchor so it basically says take that information and put it under here now if you just put that it doesn't allow you to add any additional parameters underneath right it says this is it in its entirety but if you add the less than two less than symbols in a colon it gives you the override ability so it says hey put all that inside of here right and this is all a yo function it has nothing to do with anible put all that information that
we had in the anchor right here but also allow me to add extra parameters and even override some of the stuff that's coming in so that's exactly what we're doing here so you can see instead of having kind of potentially a lengthy authentication section I can just distill that down to one individ idual um uh override statement override and Alias right you can see it there there there I have it for all of these uh proxmox KVM U module calls for each one of these tasks so pretty cool little feature now that you are familiar with seeing what it looks like in proxmox right we
have our start stop the provision all those pieces this is the VMware version so it looks very similar does it not up at the top I have all the variables that I'm defining for the host you can see right there I have an alias for VMware authentication I'm using that uh functionality again you can see here I'm doing it with uh four uh specific parameters parameters let me say that correctly down here I'm actually doing the VMware provision again it's chunkier just like in proxmox because I'm filling in the blanks on some various extra pieces of information after that I have my start stop and
delete right so nothing too crazy or complex they're both pretty succinct pretty simple and they operate essentially the same functionality wise so let me pop into my Ascender here I can see everything is completed so I'm going to pop over here I'm going scroll down a little bit there's my test Rocky 9 host I'm going to pop over to proxmox there's my test Rocky 9 host over here as well and again I can go to the console I can check on snapshots I can do all that information or all that configuration from here inside the interface just like you would on VMware now that it's
all completed say for example I want to uh pause one of the VMware VMS so the one we just created I want to stop it not pause it but I'm just going to stop it in here so I could go to the template section and I could find the job template or I could come in here to one of the previous runs of VMware VM control and in the detail section I can actually click on the job template there there's a lot of shortcuts about moving around in the interface and so you can get to a lot of the information from a lot of different
places so I'm just going to cheat and take that quick shortcut cuz I was already there so I'm going to go ahead and launch that and instead of provision I'm going to say stop so I want to stop that VM it doesn't matter that I'm passing over a lot of extra variables if they need to be used they will if they don't they won't here in this case really all that needed was what uh what VM you know what's the name of the VM that we actually want to stop if I wanted to do that in proxmox it would be essentially the same action but
say for example I want to go ahead and do some cleanup so I'm going to go ahead and go to Output you can see stopped the VM it changed so that VM is stopped in VMware now I want to instead so I'm going to click on details VMware control I want to go ahead and delete it and it will delete this in about 40 seconds so I'm going to click next I'm going to click launch you know what I want to go ahead and clean up my proxmox as well so I'm going to go to the template section I'm going to find my proxmox job
template I'm going to launch that I'm going to say you know what provision go ahead and delete that test Rocky 9 VM next click launch and it should be off and running let me pop over to the jobs section here you can see that the VMware one already completed the proxmox one is completing now so I should be able to come over here to my VMware V spere client and see that it is gone there and in here it's currently deleting you see first it's forced stopping it so it's going to stop that VM and then shortly thereafter stops it's going to delay I believe
10 seconds and then it'll go ahead and clean this up so as you can see it's actually really easy to uh administer your uh hypervisors it doesn't really matter which one it is right I could actually go in here I could make modifications to this I could change hard drive size I have some blog post and demos showing me um detecting that uh I don't know a drive in a Windows machine is uh having problems so it actually goes pause the VMS expands the drive cranks it back up connects into the Windows machine and then I go ahead and expand to consume the rest of
that so you can really do virtually anything you can imagine inside of your hypervisors using this automation stuff it's pretty wacky Wild and the interface can feel seamless right so going from VMware to proxmox or overts right using their interfaces can feel a little bit different using automation it can feel seamless right it feels the same it can integrate into your workflows just the same right so those things don't have to seemingly change and if you use uh say Ascender API and you've got um I don't know an itm like service now if somebody orders a VM the user experience doesn't have to change if
it is connecting to VMware and configuring it there or connecting to proxmox configuring it there or overt so administrative wise it really keeps those things the same so my next steps on this I think I want to show how we can actually use automation to migrate VMS from VMware over to proxmox I think that would actually be uh a pretty interesting use case so I have in the past uh if you look up some of my blog post and videos I have one on doing kind of of manual migration where I stand up a new VM I back up the configurations from the old and
I and I build over here so you could do it that way but I think it would be interesting to take say a rocky n uh VM that's in VMware and push that over to proxmox right so instead of rebuilding anything we're just going to kind of migrate those things so I'm thinking about that let me know if you're interested in that and if I should put any time into it also at this point I like to ask if you have any questions or comments or you can see yourself using this in your environment would you tweak and tune it and change it in some
specific way I would love to hear from you um if you have any other use cases or demos you'd like to see I would love to hear those too we are great at Professional Services here at ciq so we'd love to come in and help folks not only stand up their automation infrastructure but also help them do say migrations and things like that help you build those automations help you kind of get off the Get Off The Runway get that plane in the air you know we can kind of help you get moving so thanks and if nothing else we will see you next time
happy automating bye
Built for scale. Chosen by the world’s best.
2.75M+
Rocky Linux instances
Being used world wide
90%
Of fortune 100 companies
Use CIQ supported technologies
250k
Avg. monthly downloads
Rocky Linux
9
Enterprise products
Spanning the kernel to the orchestrator
Have questions about your infrastructure?
Talk to a CIQ engineer about Rocky Linux, HPC, and AI infrastructure.
