/
centos.json
41 lines (41 loc) · 1.26 KB
/
centos.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
"builders": [
{
"type": "qemu",
"accelerator": "kvm",
"communicator": "ssh",
"headless": true,
"disk_image": false,
"cpus": "6",
"memory": "16384",
"format": "raw",
"iso_checksum": "none",
"iso_url": "/dev/vdb",
"skip_resize_disk": false,
"skip_compaction": false,
"disk_size": "40000M",
"qemuargs": [
["-machine","pc-q35-4.2,accel=kvm,usb=off,vmport=off,dump-guest-core=off"],
["-cpu", "host"],
[ "-smp", "cpus=4,sockets=1" ],
[ "-cdrom", "cidata.iso" ],
["-drive", "file=/dev/vdb"]
],
"ssh_username": "user",
"ssh_password": "packer",
"net_device": "virtio-net",
"shutdown_command": "sudo shutdown --poweroff --no-wall now"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "{{.Vars}} sudo -S -E bash '{{.Path}}'",
"inline": [
"yum update -y",
"yum upgrade -y",
"yum clean all -y"
]
}
]
}