using Ubuntu Cloud-Images with Proxmox?

anuaimi

New Member
Jan 3, 2014
4
0
1
The current method I use to create VMs in Proxmox is very time consuming. I'd like to see if I can use Ubuntu's Cloud-Image to speed up the process of creating new VMs. Does anyone have any experience with this?

Right now, I base my VMs on Ubuntu and KVM. First I upload the ubuntu ISO, run through an install using the GUI console and then convert that install into a template. When I create a new VM I need to boot the VM, ssh in and manually set the network for the VM. This is rather time consuming.

The Ubuntu cloud images are a preinstalled version of Ubuntu but without any network settings. But they support cloud-init (http://cloudinit.readthedocs.org/) and this blog post (http://ubuntu-smoser.blogspot.ca/2013/02/using-ubuntu-cloud-images-without-cloud.html) shows how to base a VM on the Ubuntu Cloud-Image and then create a CD with genisoimage with the cloud-init settings for the VM. When the VMs boots, it will read the settings from the CD.

My plan is to create a VM with ProxMox and then replace the disk file with the Ubuntu cloud image. And then to replace the CD image with the ISO I created with the cloud-init settings.

Original conf file
virtio0: local:100/base-100-disk-1.raw,format=raw,size=40G
ide2: local:iso/ubuntu-12.04-server-amd64.iso,media=cdrom

Update file
virtio0: local:100/ubuntu-cloudimage.raw,format=raw,size=40G
ide2: local:iso/my-cloudinit-settings.iso,media=cdrom

Am I on the right track? Has anyone done this before?
 
Am I on the right track? Has anyone done this before?

I have the same idea to speed up the VMs deploy, mainly Ubuntu Cloud images.
I realize a proof-of-concept Python script to deploy cloud images on Proxmox KVM by use Proxmox API and by use cloud-init facility for initial configuration of the instance.
Code is at https://github.com/libersoft/proxmox-init .
You can use it as ispiration and example.
I'm using the Proxmox API by HTTP but them are also available via command line by pvesh.
 
Great stuff. I'll take a look.

I've been doing some work with ruby in this area using kvm directly.
 
I am basically trying to get some work done in this area too basically I want users who don't want to take time to setup a ISO to be able to point and click to setup a default KVM Ubuntu, Debian, or CentOS image with networking up and some default packages if you guys notice more work in this area please update this thread I will do the same.