diff --git a/builds/parallels/.gitignore b/builds/parallels/.gitignore new file mode 100644 index 000000000..86d0cb272 --- /dev/null +++ b/builds/parallels/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file diff --git a/packer/freebsd-10.0-amd64.json b/packer/freebsd-10.0-amd64.json index f5733c801..371712997 100644 --- a/packer/freebsd-10.0-amd64.json +++ b/packer/freebsd-10.0-amd64.json @@ -94,11 +94,57 @@ "numvcpus": "1", "cpuid.coresPerSocket": "1" } + }, + { + "type": "parallels-iso", + "boot_command": [ + "", + "load geom_mbr", + "", + "load zfs", + "", + "boot -s", + "", + "", + "/bin/sh", + "mdmfs -s 100m md1 /tmp", + "mdmfs -s 100m md2 /mnt", + "dhclient -l /tmp/dhclient.lease.em0 em0", + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + ], + "boot_wait": "10s", + "disk_size": 10140, + "guest_os_type": "freebsd", + "http_directory": "http", + "iso_checksum": "9c377b4a4e63443c0b210080694de26133e6a276eddb07c7e00e1c9aebd84109", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-amd64-disc1.iso", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_wait_timeout": "10000s", + "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", + "parallels_tools_mode": "disable", + "prlctl_version_file": ".prlctl_version", + "vm_name": "packer-freebsd-10.0-amd64", + "output_directory": "packer-freebsd-10.0-amd64-parallels", + "prlctl": [ + [ "set", "{{.Name}}", "--memsize", "512" ], + [ "set", "{{.Name}}", "--cpus", "1" ], + [ "set", "{{.Name}}", "--device-set", "cdrom0", "--iface", "ide" ], + [ "set", "{{.Name}}", "--device-del", "fdd0" ], + [ "set", "{{.Name}}", "--device-del", "parallel0" ] + ] } ], "post-processors": [ { "output": "../builds/{{.Provider}}/opscode_freebsd-10.0_chef-{{user `chef_version`}}.box", + "override": { + "parallels": { + "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" + } + }, "type": "vagrant" } ] diff --git a/packer/freebsd-10.0-i386.json b/packer/freebsd-10.0-i386.json index e56646e37..9f9c14b51 100644 --- a/packer/freebsd-10.0-i386.json +++ b/packer/freebsd-10.0-i386.json @@ -94,11 +94,57 @@ "numvcpus": "1", "cpuid.coresPerSocket": "1" } + }, + { + "type": "parallels-iso", + "boot_command": [ + "", + "load geom_mbr", + "", + "load zfs", + "", + "boot -s", + "", + "", + "/bin/sh", + "mdmfs -s 100m md1 /tmp", + "mdmfs -s 100m md2 /mnt", + "dhclient -l /tmp/dhclient.lease.em0 em0", + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-10.0/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + ], + "boot_wait": "10s", + "disk_size": 10140, + "guest_os_type": "freebsd", + "http_directory": "http", + "iso_checksum": "2c09643b3f79c703e424c03408882369025cec655c24a6d81ee073081ee75ebc", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/10.0/FreeBSD-10.0-RELEASE-i386-disc1.iso", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_wait_timeout": "10000s", + "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", + "parallels_tools_mode": "disable", + "prlctl_version_file": ".prlctl_version", + "vm_name": "packer-freebsd-10.0-amd64", + "output_directory": "packer-freebsd-10.0-i386-parallels", + "prlctl": [ + [ "set", "{{.Name}}", "--memsize", "512" ], + [ "set", "{{.Name}}", "--cpus", "1" ], + [ "set", "{{.Name}}", "--device-set", "cdrom0", "--iface", "ide" ], + [ "set", "{{.Name}}", "--device-del", "fdd0" ], + [ "set", "{{.Name}}", "--device-del", "parallel0" ] + ] } ], "post-processors": [ { "output": "../builds/{{.Provider}}/opscode_freebsd-10.0_chef-{{user `chef_version`}}.box", + "override": { + "parallels": { + "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" + } + }, "type": "vagrant" } ] diff --git a/packer/freebsd-9.3-amd64.json b/packer/freebsd-9.3-amd64.json index 5739808f0..379fd4cfb 100644 --- a/packer/freebsd-9.3-amd64.json +++ b/packer/freebsd-9.3-amd64.json @@ -86,11 +86,57 @@ "memsize": "512", "numvcpus": "1" } + }, + { + "boot_command": [ + "", + "load geom_mbr", + "", + "load zfs", + "", + "boot -s", + "", + "", + "/bin/sh", + "mdmfs -s 100m md1 /tmp", + "mdmfs -s 100m md2 /mnt", + "dhclient -l /tmp/dhclient.lease.em0 em0", + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-9.3/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + ], + "boot_wait": "10s", + "disk_size": 10140, + "guest_os_type": "freebsd", + "http_directory": "http", + "iso_checksum": "5a3c82653d77bba7d7ded8bd7efbedc09d52cf4045d98ce52a82c9e0f8fa9b0e", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/releases/amd64/amd64/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-amd64-disc1.iso", + "output_directory": "packer-freebsd-9.3-amd64-parallels", + "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", + "parallels_tools_mode": "disable", + "prlctl": [ + [ "set", "{{.Name}}", "--memsize", "512" ], + [ "set", "{{.Name}}", "--cpus", "1" ], + [ "set", "{{.Name}}", "--device-set", "cdrom0", "--iface", "ide" ], + [ "set", "{{.Name}}", "--device-del", "fdd0" ], + [ "set", "{{.Name}}", "--device-del", "parallel0" ] + ], + "prlctl_version_file": ".prlctl_version", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_username": "vagrant", + "ssh_wait_timeout": "10000s", + "type": "parallels-iso", + "vm_name": "packer-freebsd-9.3-amd64" } ], "post-processors": [ { "output": "../builds/{{.Provider}}/opscode_freebsd-9.3_chef-{{user `chef_version`}}.box", + "override": { + "parallels": { + "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" + } + }, "type": "vagrant" } ], diff --git a/packer/freebsd-9.3-i386.json b/packer/freebsd-9.3-i386.json index 971b076e8..f3204fc46 100644 --- a/packer/freebsd-9.3-i386.json +++ b/packer/freebsd-9.3-i386.json @@ -86,11 +86,56 @@ "memsize": "512", "numvcpus": "1" } + }, + { + "boot_command": [ + "", + "load geom_mbr", + "", + "load zfs", + "", + "boot -s", + "", + "", + "/bin/sh", + "mdmfs -s 100m md1 /tmp", + "mdmfs -s 100m md2 /mnt", + "dhclient -l /tmp/dhclient.lease.em0 em0", + "fetch -o /tmp/install.sh http://{{ .HTTPIP }}:{{ .HTTPPort }}/freebsd-9.3/install.sh && chmod +x /tmp/install.sh && /tmp/install.sh {{ .Name }}" + ], + "boot_wait": "10s", + "disk_size": 10140, + "http_directory": "http", + "iso_checksum": "cab6aad9c3d5ea6a3fb4059f808225c67f1edaea730c555a86a9707ac41ba75d", + "iso_checksum_type": "sha256", + "iso_url": "{{user `mirror`}}/releases/i386/i386/ISO-IMAGES/9.3/FreeBSD-9.3-RELEASE-i386-disc1.iso", + "output_directory": "packer-freebsd-9.3-i386-parallels", + "prlctl": [ + [ "set", "{{.Name}}", "--memsize", "512" ], + [ "set", "{{.Name}}", "--cpus", "1" ], + [ "set", "{{.Name}}", "--device-set", "cdrom0", "--iface", "ide" ], + [ "set", "{{.Name}}", "--device-del", "fdd0" ], + [ "set", "{{.Name}}", "--device-del", "parallel0" ] + ], + "prlctl_version_file": ".prlctl_version", + "parallels_tools_mode": "disable", + "shutdown_command": "echo 'shutdown -p now' > shutdown.sh; cat 'shutdown.sh' | su -", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_username": "vagrant", + "ssh_wait_timeout": "10000s", + "type": "parallels-iso", + "vm_name": "packer-freebsd-9.3-i386" } ], "post-processors": [ { "output": "../builds/{{.Provider}}/opscode_freebsd-9.3-i386_chef-{{user `chef_version`}}.box", + "override": { + "parallels": { + "vagrantfile_template": "vagrantfile_templates/parallels/freebsd.rb" + } + }, "type": "vagrant" } ], diff --git a/packer/omnios-r151010j.json b/packer/omnios-r151010j.json index 1ca6f495a..2f17212ab 100644 --- a/packer/omnios-r151010j.json +++ b/packer/omnios-r151010j.json @@ -113,12 +113,69 @@ "memsize": "1024", "numvcpus": "1" } + }, + { + "boot_command": [ + "", + "1", + "", + "", + "", + "", + "", + "", + "omnios-vagrant", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "root", + "passwd", + "vagrant", + "vagrant", + "ipadm create-if e1000g0", + "ipadm create-addr -T dhcp e1000g0/v4", + "echo 'nameserver 8.8.8.8' > /etc/resolv.conf", + "cp /etc/nsswitch.dns /etc/nsswitch.conf", + "sed -i -e 's/PermitRootLogin no/PermitRootLogin yes/' /etc/ssh/sshd_config", + "svcadm restart ssh" + ], + "boot_wait": "30s", + "disk_size": 40960, + "hard_drive_interface": "ide", + "guest_os_type": "opensolaris", + "iso_checksum": "bc3f4c0d29a5da75174de62da00294e5ef826b5e", + "iso_checksum_type": "sha1", + "iso_url": "{{user `mirror`}}/OmniOS_Text_r151010j.iso", + "output_directory": "packer-omnios-r151010j-parallels", + "shutdown_command": "/usr/sbin/shutdown -g 0 -y -i 5", + "ssh_password": "vagrant", + "ssh_port": 22, + "ssh_username": "root", + "parallels_tools_mode": "disable", + "type": "parallels-iso", + "vm_name": "packer-omnios-r151010j", + "prlctl": [ + [ "set", "{{.Name}}", "--memsize", "512" ], + [ "set", "{{.Name}}", "--cpus", "1" ] + ] } ], "post-processors": [ { "compression_level": 9, "output": "../builds/{{.Provider}}/opscode_omnios-r151010j_chef-{{user `chef_version`}}.box", + "override": { + "parallels": { + "vagrantfile_template": "vagrantfile_templates/parallels/omnios.rb" + } + }, "type": "vagrant" } ], @@ -141,4 +198,3 @@ "mirror": "http://omnios.omniti.com/media" } } - diff --git a/packer/vagrantfile_templates/parallels/freebsd.rb b/packer/vagrantfile_templates/parallels/freebsd.rb new file mode 100644 index 000000000..1f795a8c4 --- /dev/null +++ b/packer/vagrantfile_templates/parallels/freebsd.rb @@ -0,0 +1,17 @@ +# -*- mode: ruby -*- +# # vi: set ft=ruby : + +Vagrant.require_version ">= 1.1.0" + +Vagrant.configure("2") do |config| + config.ssh.shell = "sh" + + # Disable the base shared folder, Guest Tools are unavailable. + config.vm.synced_folder ".", "/vagrant", disabled: true + + config.vm.provider :parallels do |prl| + # Guest Tools are unavailable. + prl.check_guest_tools = false + prl.functional_psf = false + end +end diff --git a/packer/vagrantfile_templates/parallels/omnios.rb b/packer/vagrantfile_templates/parallels/omnios.rb new file mode 100644 index 000000000..3ae4c28e9 --- /dev/null +++ b/packer/vagrantfile_templates/parallels/omnios.rb @@ -0,0 +1,15 @@ +# -*- mode: ruby -*- +# # vi: set ft=ruby : + +Vagrant.require_version ">= 1.1.0" + +Vagrant.configure("2") do |config| + # Disable the base shared folder, Guest Tools are unavailable. + config.vm.synced_folder ".", "/vagrant", disabled: true + + config.vm.provider :parallels do |prl| + # Guest Tools are unavailable. + prl.check_guest_tools = false + prl.functional_psf = false + end +end