You are not logged in.

#1 2013-09-27 15:12:47

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Packer Arch: a template for building Arch base boxes for Vagrant

I thought some people might be interested in my Packer Arch project. It is a bare bones Packer template and installation script that can be used to generate a Vagrant base box for Arch Linux. The template works for both Vagrant's default VirtualBox provider as well as the VMware provider.

If you're not familiar with Vagrant, it's a way to "create and configure lightweight, reproducible, and portable development environments"...basically an incredibly easy way to spawn temporary virtual machines that you can use for testing/developing anything. In my case I launch Arch VMs to test out Ansible automated configuration tasks that I use to manage some personal servers. Anyway, hope somebody else finds it useful.

https://github.com/elasticdog/packer-arch

Offline

#2 2013-09-27 17:44:43

spikkle
Member
Registered: 2013-09-19
Posts: 13

Re: Packer Arch: a template for building Arch base boxes for Vagrant

Very cool, thanks elasticdog.  I like the idea of vagrant-up'ing a bare-bones VM in order to validate your routines for configuration management.  I'm an ansible fan too, but too often with other CM tools it is kind of a foregone conclusion that they will already be available or that you will manually install them.  Your project really makes the accurate point that this isn't the case, someone's got to do it.

Offline

#3 2013-09-27 19:01:01

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Packer Arch: a template for building Arch base boxes for Vagrant

Absolutely right. I purposefully wanted to recreate a system that you'd see either out in the wild when purchasing a VPS, or what you'd have after performing a fresh installation from the latest ISO on your own hardware. Even though my end goal was to test Ansible, I didn't include its dependency of Python 2 directly in the build process, but kept things as minimal as possible and use a bootstrap script to handle dependencies after the fact. If you're interested in using Ansible to manage Arch hosts, I did write a quick blog post on my bootstrap process:

    Developing Ansible Playbooks for Arch Linux with Vagrant

...and another project I published called Hyperboriarch has some good examples of doing initial configuration tasks with Ansible (securing ssh, configuring ntp, simple iptables firewall setup, etc.):

    https://github.com/elasticdog/hyperboriarch

</self-promotion>

Last edited by elasticdog (2013-09-27 19:04:04)

Offline

#4 2013-12-22 23:15:16

pablox
Member
From: /home/chile/santiago/
Registered: 2008-05-14
Posts: 183
Website

Re: Packer Arch: a template for building Arch base boxes for Vagrant

[....]
    virtualbox: Download progress: 99%
==> virtualbox: Starting HTTP server on port 8694
==> virtualbox: Creating virtual machine...
==> virtualbox: Creating hard drive...
==> virtualbox: Creating forwarded port mapping for SSH (host port 4367)
==> virtualbox: Starting the virtual machine...
==> virtualbox: Waiting 5s for boot...
==> virtualbox: Typing the boot command...
==> virtualbox: Error sending boot command: VBoxManage error: VBoxManage: error: Guest not running
==> virtualbox: Unregistering and deleting virtual machine...
==> virtualbox: Deleting output directory...
Build 'virtualbox' errored: Error sending boot command: VBoxManage error: VBoxManage: error: Guest not running

$

Any clue?


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#5 2013-12-29 04:11:24

brenix
Member
From: California
Registered: 2008-03-05
Posts: 185

Re: Packer Arch: a template for building Arch base boxes for Vagrant

pablox wrote:

Any clue?

Same issue here.. did you end up resolving this?

Edit: I worked around the issue by adding:

"headless": "false",

to the virtualbox builder and once the iso loaded I hit return to initiate the boot of the iso..

Last edited by brenix (2013-12-29 04:33:02)

Offline

#6 2014-01-02 01:20:18

pablox
Member
From: /home/chile/santiago/
Registered: 2008-05-14
Posts: 183
Website

Re: Packer Arch: a template for building Arch base boxes for Vagrant

The issue with my side was some malconfiguration with virtualbox. Now it's running fine (it seems).


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#7 2015-09-05 09:10:18

newbie
Member
Registered: 2015-09-05
Posts: 1

Re: Packer Arch: a template for building Arch base boxes for Vagrant

I'm getting this error while installing

==> virtualbox-iso: Waiting for SSH to become available...
==> virtualbox-iso: Error waiting for SSH: ssh: handshake failed: ssh: unable to                 authenticate, attempted methods [none password], no supported methods remain
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Deleting output directory...
Build 'virtualbox-iso' errored: ssh: handshake failed: ssh: unable to authentica                te, attempted methods [none password], no supported methods remain

==> Some builds didn't complete successfully and had errors:
--> virtualbox-iso: ssh: handshake failed: ssh: unable to authenticate, attempte                d methods [none password], no supported methods remain

==> Builds finished but no artifacts were created.

Warning: Possibly missing firmware for module: wd719x
Warning: Possibly missing firmware for module: aic94xx

[FAILED] Failed unmounting /run/archiso/sfs/airootfs
[FAILED] Failed unmounting /run/archiso/bootmnt
[FAILED] Failed unmounting /run/archiso/cowspace

anyone help?

Offline

#8 2015-09-10 06:51:31

aborsu
Member
Registered: 2015-09-10
Posts: 1

Re: Packer Arch: a template for building Arch base boxes for Vagrant

Having exactly the same issue.

Offline

#9 2015-09-20 06:54:10

casualjim
Member
Registered: 2015-09-20
Posts: 1

Re: Packer Arch: a template for building Arch base boxes for Vagrant

There was a change to the default config of sshd

I had to change /etc/ssh/sshd_config

https://github.com/casualjim/devenv/com … 5eafaa7c69

Offline

Board footer

Powered by FluxBB