All Projects → rgl → proxmox-ve

rgl / proxmox-ve

Licence: other
Proxmox VE Vagrant Base Box

Programming Languages

shell
77523 projects
Makefile
30231 projects
powershell
5483 projects

Projects that are alternatives of or similar to proxmox-ve

packer-templates
Packer templates for creating Amazon EC2 images, Proxmox templates and Vagrant boxes
Stars: ✭ 70 (+0%)
Mutual labels:  vagrant, packer, proxmox
Nixbox
NixOS Vagrant boxes [[email protected]]
Stars: ✭ 189 (+170%)
Mutual labels:  vagrant, packer
Windows Vagrant
Windows 2012R2/10/2016/2019 Base Vagrant Box (https://app.vagrantup.com/rgl)
Stars: ✭ 169 (+141.43%)
Mutual labels:  vagrant, packer
Packer Centos 7
This build has been moved - see README.md
Stars: ✭ 223 (+218.57%)
Mutual labels:  vagrant, packer
Adfs2
Multi Vagrant environment with Active Directory
Stars: ✭ 117 (+67.14%)
Mutual labels:  vagrant, packer
Packer Windoze
Packer templates to create Windows vagrant box images
Stars: ✭ 117 (+67.14%)
Mutual labels:  vagrant, packer
Packer Templates
Scripts and Templates used for generating Vagrant images
Stars: ✭ 219 (+212.86%)
Mutual labels:  vagrant, packer
Packer Templates
Stars: ✭ 90 (+28.57%)
Mutual labels:  vagrant, packer
Detectionlab
Automate the creation of a lab environment complete with security tooling and logging best practices
Stars: ✭ 3,237 (+4524.29%)
Mutual labels:  vagrant, packer
packer-centos
Create CentOS images for different hypervisors with Packer
Stars: ✭ 18 (-74.29%)
Mutual labels:  vagrant, packer
django-angular2-fullstack-devops
All-in-one django/angular2 seed with cli interface for multi-environment devops on aws using ansible/packer/terraform
Stars: ✭ 54 (-22.86%)
Mutual labels:  vagrant, packer
Packer Ubuntu 1804
This build has been moved - see README.md
Stars: ✭ 101 (+44.29%)
Mutual labels:  vagrant, packer
Beetbox
Pre-provisioned L*MP stack
Stars: ✭ 94 (+34.29%)
Mutual labels:  vagrant, packer
Infrastructure As Code Tutorial
Infrastructure As Code Tutorial. Covers Packer, Terraform, Ansible, Vagrant, Docker, Docker Compose, Kubernetes
Stars: ✭ 1,954 (+2691.43%)
Mutual labels:  vagrant, packer
My Cheat Sheets
A place to keep all my cheat sheets for the complete development of ASIC/FPGA hardware or a software app/service.
Stars: ✭ 94 (+34.29%)
Mutual labels:  vagrant, packer
Packer Build
Packer Automated VM Image and Vagrant Box Builds
Stars: ✭ 199 (+184.29%)
Mutual labels:  vagrant, packer
windows-docker-desktop-box
Vagrant box to test Docker Desktop with Linux/Windows containers
Stars: ✭ 17 (-75.71%)
Mutual labels:  vagrant, packer
Packer Centos 6
This build has been moved - see README.md
Stars: ✭ 78 (+11.43%)
Mutual labels:  vagrant, packer
Packer Ubuntu 1404
DEPRECATED - Packer Example - Ubuntu 14.04 Vagrant Box using Ansible provisioner
Stars: ✭ 81 (+15.71%)
Mutual labels:  vagrant, packer
Packer
Packer helpers and templates for Docker, IIS, SQL Server and Visual Studio on Windows and Ubuntu
Stars: ✭ 242 (+245.71%)
Mutual labels:  vagrant, packer

This builds an up-to-date Proxmox VE Vagrant Base Box.

Currently this targets Proxmox VE 7.

Usage

Create the base box as described in the section corresponding to your provider.

If you want to troubleshoot the packer execution see the .log file that is created in the current directory.

After the example vagrant enviroment is started, you can access the Proxmox Web Interface with the default root user and password vagrant.

For a cluster example see rgl/proxmox-ve-cluster-vagrant.

libvirt/VirtualBox

Create the base box:

make build-libvirt # or build-virtualbox

Add the base box as suggested in make output:

vagrant box add -f proxmox-ve-amd64 proxmox-ve-amd64-libvirt.box # or proxmox-ve-amd64-virtualbox.box

Start the example vagrant environment with:

cd example
vagrant up --no-destroy-on-error --provider=libvirt # or --provider=virtualbox

Hyper-V

Follow the rgl/debian-vagrant Hyper-V Usage section.

Create a vSwitch for proxmox:

PowerShell -NoLogo -NoProfile -ExecutionPolicy Bypass <<'EOF'
$switchName = 'proxmox'
$networkAdapterName = "vEthernet ($switchName)"
$networkAdapterIpAddress = '10.10.10.1'
$networkAdapterIpPrefixLength = 24

# create the vSwitch.
New-VMSwitch -Name $switchName -SwitchType Internal | Out-Null

# assign it an host IP address.
$networkAdapter = Get-NetAdapter $networkAdapterName
$networkAdapter | New-NetIPAddress `
    -IPAddress $networkAdapterIpAddress `
    -PrefixLength $networkAdapterIpPrefixLength `
    | Out-Null

# remove all virtual switches from the windows firewall.
Set-NetFirewallProfile `
    -DisabledInterfaceAliases (
            Get-NetAdapter -name "vEthernet*" | Where-Object {$_.ifIndex}
        ).InterfaceAlias
EOF

Create the base box:

make build-hyperv

Add the base box as suggested in make output:

vagrant box add -f proxmox-ve-amd64 proxmox-ve-amd64-hyperv.box

Start the example vagrant environment with:

cd example
vagrant up --provider=hyperv

Packer build performance options

To improve the build performance you can use the following options.

Accelerate build time with Apt Caching Proxy

To speed up package downloads, you can specify an apt caching proxy (e.g. apt-cacher-ng) by defining the environment variables APT_CACHE_HOST (default: undefined) and APT_CACHE_PORT (default: 3124).

Example:

APT_CACHE_HOST=10.10.10.100 make build-libvirt

Decrease disk wear by using temporary memory file-system

To decrease disk wear (and potentially reduce io times), you can use /dev/shm (temporary memory file-system) as output_directory for Packer builders. Your system must have enough available memory to store the created virtual machine.

Example:

PACKER_OUTPUT_BASE_DIR=/dev/shm make build-libvirt

Remember to also define PACKER_OUTPUT_BASE_DIR when you run make clean afterwards.

Variables override

Some properties of the virtual machine and the Proxmox VE installation can be overridden. Take a look at proxmox-ve.json, object variables, to get an idea which values can be overridden. Do not override iso_url and iso_checksum as the boot_commands might be tied to a specific Proxmox VE version. Also take care when you decide to override country.

Create the base box:

make build-libvirt VAR_FILE=example.vars.json  # or build-virtualbox or build-hyperv

The following content of example.vars.json:

  • sets the initial disk size to 128 GB

  • sets the initial memory to 4 GB

  • sets the Packer output base directory to /dev/shm

  • sets the country to Germany (timezone is updated by Proxmox VE installer) and changes the keyboard layout back to "U.S. English" as this is needed for the subsequent boot_command statements

  • sets the hostname to pve-test.example.local

  • uses all default shell provisioners (see ./provisioners) and a custom one for german localisation

    {
        "disk_size": "131072",
        "memory": "4096",
        "output_base_dir": "/dev/shm",
        "step_country": "Ger<wait>m<wait>a<wait>n<wait><enter>",
        "step_hostname": "pve-test.example.local",
        "step_keyboard_layout": "<end><up><wait>",
        "shell_provisioner_scripts": "provisioners/apt_proxy.sh,provisioners/upgrade.sh,provisioners/network.sh,localisation-de.sh,provisioners/reboot.sh,provisioners/provision.sh"
    }

Packer boot_command

As Proxmox does not have any way to be pre-seeded, this environment has to answer all the installer questions through the packer boot_command interface. This is quite fragile, so be aware when you change anything. The following table describes the current steps and corresponding answers.

step boot_command
select "Install Proxmox VE" <enter>
wait for boot <wait1m>
agree license <enter><wait>
target disk <enter><wait>
type country United States<wait><enter><wait><tab><wait>
timezone <tab><wait>
keyboard layout <tab><wait>
advance to the next button <tab><wait>
advance to the next page <enter><wait5>
password vagrant<tab><wait>
confirm password vagrant<tab><wait>
email [email protected]<tab><wait>
advance to the next button <tab><wait>
advance to the next page <enter><wait5>
hostname pve.example.com<tab><wait>
ip address <tab><wait>
netmask <tab><wait>
gateway <tab><wait>
DNS server <tab><wait>
advance to the next button <tab><wait>
advance to the next page <enter><wait5>
install <enter><wait5>

NB Do not change the keyboard layout. If you do, the email address will fail to be typed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].