{"id":347,"date":"2016-09-02T06:00:00","date_gmt":"2016-09-02T14:00:00","guid":{"rendered":"https:\/\/andrewwippler.com\/?p=347"},"modified":"2016-08-28T15:44:08","modified_gmt":"2016-08-28T23:44:08","slug":"provisioning-vms-with-cloud-init","status":"publish","type":"post","link":"https:\/\/andrewwippler.com\/2016\/09\/02\/provisioning-vms-with-cloud-init\/","title":{"rendered":"Provisioning VMs with cloud init"},"content":{"rendered":"
One of the easiest ways to deploy a virtual machine in oVirt is first to install the OS then turn it into a template. This will allow you to copy that template to deploy new instances. One mundane task after a new template is copied to a new instance is logging in, changing the IP, setting the hostname, setting up Puppet, running puppet, etc. For my environment, I wanted a CentOS 7 template. To have that, I must first install CentOS on a new VM and seal it (Windows calls this Sysprep). Before I seal it, I must install <\/p>\n * Install CentOS 7.2 Minimal on any new VM. Ensure to have LVM partitioning as you may want to extend the disk later. I have found that 10 GB is a good starting size.<\/p>\ncloud-init<\/code> is the tool designed to fix that mundane task process by allowing those steps to be automated. oVirt\/RHEV (as well as OpenStack, AWS, and others) allow you to pass in user data which is then supplied to
cloud-init<\/code> after the template is copied over and turned on. This allows for scripting on the new VM – easing deployment.<\/p>\n
cloud-init<\/code> and any other tools I might use for deployment – such as
puppet<\/code>. Here are the steps to obtain just that:<\/p>\n