From 037d8a6503066059b50b45a9ce6a4417b7e753e6 Mon Sep 17 00:00:00 2001 From: Christian Rebischke Date: Sun, 7 May 2017 22:00:14 +0200 Subject: added qemu support --- vagrant.json | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/vagrant.json b/vagrant.json index 11f791c..406b07a 100644 --- a/vagrant.json +++ b/vagrant.json @@ -2,14 +2,18 @@ "variables": { "iso_url": "https://downloads.archlinux.de/iso/2017.05.01/archlinux-2017.05.01-x86_64.iso", "iso_checksum_type": "sha1", - "iso_checksum": "91a195bf1395694151fc3f7f766e9d1233e2aed9" + "iso_checksum": "91a195bf1395694151fc3f7f766e9d1233e2aed9", + "disk_size": "20480", + "memory": "1024", + "cpus": "2", + "headless": "false" }, "builders": [ { "type": "virtualbox-iso", "boot_wait": "10s", "http_directory": "http", - "disk_size": 20480, + "disk_size": "{{user `disk_size`}}", "guest_os_type": "ArchLinux_64", "iso_checksum": "{{user `iso_checksum`}}", "iso_checksum_type": "{{user `iso_checksum_type`}}", @@ -25,13 +29,13 @@ "modifyvm", "{{.Name}}", "--memory", - "1024" + "{{user `memory`}}" ], [ "modifyvm", "{{.Name}}", "--cpus", - "2" + "{{user `cpus`}}" ] ], "boot_command": [ @@ -39,7 +43,31 @@ "curl -O 'http://{{.HTTPIP}}:{{.HTTPPort}}/install{,-chroot}.sh'", "bash install.sh < install-chroot.sh && systemctl reboot" ] + }, { + "type": "qemu", + "boot_wait": "10s", + "http_directory": "http", + "disk_size": "{{user `disk_size`}}", + "iso_checksum": "{{user `iso_checksum`}}", + "iso_checksum_type": "{{user `iso_checksum_type`}}", + "iso_url": "{{user `iso_url`}}", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_wait_timeout": "10000s", + "shutdown_command": "sudo systemctl poweroff", + "qemuargs": [ + [ + "-m", + "{{user `memory`}}" + ], + [ + "-smp", + "{{user `cpus`}}" + ] + ] } + ], "provisioners": [ { -- cgit v1.2.3-54-g00ecf