Chapter 9: Customizing a Virtual Machine with cloud-init
Customizing a virtual machine often seems simple enough – clone it from a template; start; click a couple of Next buttons (or text tabs); create some users, passwords, and groups; configure network settings... That might work for a virtual machine or two. But what happens if we have to deploy two or three hundred virtual machines and configure them? All of a sudden, we're faced with a mammoth task – and it's a task that will be prone to errors if we do everything manually. We're wasting precious time while doing that instead of configuring them in a much more streamlined, automated fashion. That's where cloud-init comes in handy, as it can customize our virtual machines, install software on them, and it can do it on first and subsequent virtual machine boots. So, let's discuss cloud-init and how it can bring value to your large-scale configuration nightmares.
In this chapter, we will...