forked from xenserver/packer-plugin-xenserver
-
Notifications
You must be signed in to change notification settings - Fork 8
/
centos-7vm.json
executable file
·50 lines (46 loc) · 1.5 KB
/
centos-7vm.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
42
43
44
45
46
47
48
49
50
{
"builders": [
{
"type": "xenserver-vm",
"remote_host": "10.204.136.32",
"remote_username": "root",
"remote_password": "{{user `xenserver_password`}}",
"boot_command": [
"<enter>root<enter><wait>Password1<enter><wait>",
"cp /etc/sysconfig/network-scripts/ifcfg-eth0 ./ifcfg-eth0.bak<enter>",
"sudo vi ./ifcfg-eth0.tmp<enter><wait>",
"i# Generated by XenServer packer plugin<enter>",
"DEVICE=\"eth0\"<enter>",
"ONBOOT=yes<enter>",
"NETBOOT=yes<enter>",
"BOOTPROTO=dhcp<enter>",
"TYPE=Ethernet<enter>",
"NAME=\"eth0\"<enter>",
"NM_CONTROLLED=no<enter>",
"<esc>:wq!<enter><wait>",
"sudo cp ./ifcfg-eth0.tmp /etc/sysconfig/network-scripts/ifcfg-eth0<enter>",
"sudo ifdown eth0<enter><wait5>",
"sudo ifup eth0<enter><wait5>",
"curl http://169.254.0.1/packer-clean.sh > ./packer-clean.sh <enter><wait10>",
"sudo chmod +x packer-clean.sh<enter>",
"sudo ./packer-clean.sh<enter>"
],
"boot_wait": "90s",
"http_directory": "/var/www/html/packer",
"source_vm": "CentOS7",
"script_url": "http://10.204.137.80/packer/xenserver/",
"output_directory": "/var/www/html/vhd",
"format": "vhd",
"shutdown_command": "",
"ssh_username": "root",
"ssh_password": "Password1",
"ssh_wait_timeout": "10000s",
"sr_name": "NFS Packer",
"vm_name": "packer-export-centos7",
"nfs_mount": "10.204.136.41:/vol/exports/packer"
}
],
"variables": {
"xenserver_password": "{{env `XS_PASS`}}"
}
}