Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.
/ cloud-init-start Public archive

Quickly bring up Ubuntu Cloud instances in local KVM with virsh using cloud-init

License

Notifications You must be signed in to change notification settings

joneskoo/cloud-init-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloud-init-start

Quickly bring up Ubuntu or FC20 Cloud instances in local KVM with virsh using cloud-config.

Requirements:

  • Make
  • wget
  • cloud-utils (cloud-localds)
  • qemu/kvm
  • libvirt (virsh)
  • virtinst (virt-install)

Usage:

# Define cloud-config data
$ editor myhost01.user-data

The cloud-config user data looks something like this:

#cloud-config
hostname: example
manage_etc_hosts: True

ssh_pwauth: False

ssh_authorized_keys:
 - ssh-rsa AAAAB.....

package_upgrade: true

You can find more examples of what you can do with cloud-config from the cloud-init documentation.

If you saved the cloud-config to file myhost01.example, you can now launch a virtual machine.

# Ubuntu 14.04 Trusty
$ make ubuntu-myhost01

  OR

# Fedora Core 20
$ make fc20-myhost01

The Makefile:

  1. downloads the base cloud image (reused for new VMs),
  2. creates a root disk image for it, packages the user-data to an ISO 9660 file, and
  3. defines the machine with virt-install so it can be started.

You can now start the VM with:

$ virsh start myhost01

What you do with your VM after this is up to you.

About

Quickly bring up Ubuntu Cloud instances in local KVM with virsh using cloud-init

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages