This post is mostly background and a very high-level overview of process. I will try to post the related code and runbooks with a future entry.
We recently decided to start reworking our VM request forms. Previously, these were actual paper forms with a lot of unneeded information on them.
I got to thinking about it and after a discussion with one of my co-workers, I started working on a quick-and-dirty web page system done in ASP.NET and C#. I’m not really a web developer so it probably doesn’t look too great but it works enough to get VM information and write the info to a database.
Once I had the page up and running, I started to wonder – could we take this one step further? Why not link this database up with Orchestrator so the VMs provision themselves?
So, I started writing some runbooks to handle provisioning of machines that the user specified should be in SCVMM. I soon realized that Orchestrator is kind of limited when it comes to provisioning VMs if there is no cloud created in SCVMM.
The next step was to create a private cloud in SCVMM. You can follow the previous link for instructions on how to do that – it’s pretty straightforward.
I got the private cloud up and running, then turned back to the runbooks. Orchestrator is also limited in what kind of data it can return from a database. It will only give you semicolon-delimited strings which need to be parsed with PowerShell in order to get the values needed to build the VM.
Once you get the data out, you can use the SCVMM Integration Pack to start building the VMs. There’s a few gotchas in this process that I will discuss in more detail in future posts.
Two days later the runbooks were complete and the VMs provision themselves automagically when the user clicks the “Add VM” button on the webpage.
As I stated at the beginning of this post, I’d like to add the web page code and the runbooks to my GitHub, but I don’t have them at home right now as I just finished the project and got home from work.
Stay tuned for more information!
PS: I am off to try my hand on the 70-410 exam tomorrow as my first step to MCSE certification. Wish me luck! I hope I can pass.