Git Product home page Git Product logo

packer-terraform-kvm's Introduction

Packer Terraform KVM Example

This repo is an example of packer+terraform combo to create a VM from plain iso.

Supported os for now are:

  • centos 8
  • opensuse leap 15.2

This is based on Libvirt/KVM for virtualization, so it depends on the terraform provider for libvirt:

terraform-provider-libvirt

Prerequisites:

  • packer
  • terraform
  • terraform-provider-libvirt
  • make

to start:

mkdir ~/VirtualMachines

to create the folder where we put our examples.

To start creating the first VM:

make iso distro=centos8

or

make iso distro=opensuse15.2

will use packer to create the base image for the VM using centos8-kickstart.cfg as ks file or autoyast.xml for opensuse. This will search for an install iso in the current directory, this example uses CentOS-8.1.1911-x86_64-dvd1.iso for centos and openSUSE-Leap-15.2-DVD-x86_64.iso for opensuse,

change the value/path as needed for the test

make init distro=centos8
make apply distro=distro=centos8

or

make init distro=opensuse15.2
make apply distro=opensuse15.2

will proceede to use terraform to create the machine based on the packer output.

make destroy distro=centos8

or

make destroy distro=opensuse15.2

to remove all

packer-terraform-kvm's People

Contributors

89luca89 avatar alegrey91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

packer-terraform-kvm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.