Giter VIP home page Giter VIP logo

packer-ubuntu20.04's Introduction

packer-ubuntu20.04

Packer template to build Ubuntu 20.04 image for virtualbox (Vagrant).

Packer template to build Ubuntu 20.04 image for virtualbox (Vagrant). Ubuntu is discontinuing support for the Debian-installer based classic server installer from 20.04 LTS (Focal Fossa) making the way for subiquity server installer. This template use subiquity with cloud-init template to build the image.

Requirements

How to build the image

  1. Download the Ubuntu 20.04 iso image from https://releases.ubuntu.com/ and place it into the iso dir.

  2. Copy the checksum form the image.

  3. In the variables section, in the ubuntu2004.json template, modify the values of iso_checksum and iso_url to match the iso file name downloaded and the checksum:


  "variables": {
        "headless": "false",
        "iso_checksum": "",
        "iso_url": "",
        "version": "0",
        "ram": "1024",
        "cpus": "2",
        "virtualbox_disk_size": "12288"
    }
  1. Buid the image:
$ packer build  ubuntu2004.json
  1. The artifact will be placed at:
output/ubuntu-20.04-virtualbox.box

How to use it with Vagrant

  1. After the build ends, add the box to vagrant:

$ vagrant box add --name ubuntu-20.04 output/ubuntu-20.04-virtualbox.box
  1. Create a Vagrantfile

$ cat > Vagrantfile << 'EOF'
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|

  config.vm.box = "ubuntu-20.04"
  config.ssh.password = "vagrant"

  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    vb.gui = false
  end
end

EOF
  1. Start the box and ssh into it

$ vagrant up && vagrant ssh

packer-ubuntu20.04's People

Contributors

galvarado avatar

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.