Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyper-V support for CentOS 7.3 #822

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ The following boxes are built from this repository's templates for publicly avai

### 64 bit

| | VirtualBox | VMware | Parallels |
|------------------- | ------------------------------ | --------------------------------- | ------------------------------|
| centos-5.11 | [x86_64][centos_511_64_vbox] | [x86_64][centos_511_64_vmware] | [x86_64][centos_511_64_prl] |
| centos-6.8 | [x86_64][centos_68_64_vbox] | [x86_64][centos_68_64_vmware] | [x86_64][centos_68_64_prl] |
| centos-7.3 | [x86_64][centos_73_64_vbox] | [x86_64][centos_73_64_vmware] | [x86_64][centos_73_64_prl] |
| debian-7.11 | [amd64][debian_711_64_vbox] | [amd64][debian_711_64_vmware] | [amd64][debian_711_64_prl] |
| debian-8.7 | [amd64][debian_87_64_vbox] | ~~[amd64][debian_87_64_vmware]~~ | [amd64][debian_87_64_prl] |
| fedora-24 | [x86_64][fedora_24_64_vbox] | [x86_64][fedora_24_64_vmware] | ~~[x86_64][fedora_24_64_prl]~~|
| fedora-25 | [x86_64][fedora_25_64_vbox] | [x86_64][fedora_25_64_vmware] | [x86_64][fedora_25_64_prl] |
| freebsd-10.3 | [amd64][freebsd_103_64_vbox] | ~~[amd64][freebsd_103_64_vmware]~~ | [amd64][freebsd_103_64_prl] |
| freebsd-11.0 | [amd64][freebsd_110_64_vbox] | [amd64][freebsd_110_64_vmware] | [amd64][freebsd_110_64_prl] |
| opensuse-leap-42.2 | [x86_64][leap_422_64_vbox] | ~~[x86_64][leap_422_64_vmware]~~ | ~~[x86_64][leap_422_64_prl]~~ |
| oracle-5.11 | [x86_64][oracle_511_64_vbox] | [x86_64][oracle_511_64_vmware] | [x86_64][oracle_511_64_prl] |
| oracle-6.8 | [x86_64][oracle_68_64_vbox] | [x86_64][oracle_68_64_vmware] | [x86_64][oracle_68_64_prl] |
| oracle-7.3 | [x86_64][oracle_73_64_vbox] | [x86_64][oracle_73_64_vmware] | [x86_64][oracle_73_64_prl] |
| ubuntu-12.04 | [amd64][ubuntu_1204_64_vbox] | [amd64][ubuntu_1204_64_vmware] | [amd64][ubuntu_1204_64_prl] |
| ubuntu-14.04 | [amd64][ubuntu_1404_64_vbox] | [amd64][ubuntu_1404_64_vmware] | [amd64][ubuntu_1404_64_prl] |
| ubuntu-16.04 | [amd64][ubuntu_1604_64_vbox] | [amd64][ubuntu_1604_64_vmware] | [amd64][ubuntu_1604_64_prl] |
| ubuntu-16.10 | [amd64][ubuntu_1610_64_vbox] | [amd64][ubuntu_1610_64_vmware] | [amd64][ubuntu_1610_64_prl] |
| | VirtualBox | VMware | Parallels |Hyper-V |
|------------------- | ------------------------------ | --------------------------------- | ------------------------------|------------------------------|
| centos-5.11 | [x86_64][centos_511_64_vbox] | [x86_64][centos_511_64_vmware] | [x86_64][centos_511_64_prl] ||
| centos-6.8 | [x86_64][centos_68_64_vbox] | [x86_64][centos_68_64_vmware] | [x86_64][centos_68_64_prl] ||
| centos-7.3 | [x86_64][centos_73_64_vbox] | [x86_64][centos_73_64_vmware] | [x86_64][centos_73_64_prl] |[x86_64][centos_73_64_hyperv] |
| debian-7.11 | [amd64][debian_711_64_vbox] | [amd64][debian_711_64_vmware] | [amd64][debian_711_64_prl] ||
| debian-8.7 | [amd64][debian_87_64_vbox] | ~~[amd64][debian_87_64_vmware]~~ | [amd64][debian_87_64_prl] ||
| fedora-24 | [x86_64][fedora_24_64_vbox] | [x86_64][fedora_24_64_vmware] | ~~[x86_64][fedora_24_64_prl]~~||
| fedora-25 | [x86_64][fedora_25_64_vbox] | [x86_64][fedora_25_64_vmware] | [x86_64][fedora_25_64_prl] ||
| freebsd-10.3 | [amd64][freebsd_103_64_vbox] | ~~[amd64][freebsd_103_64_vmware]~~ | [amd64][freebsd_103_64_prl] ||
| freebsd-11.0 | [amd64][freebsd_110_64_vbox] | [amd64][freebsd_110_64_vmware] | [amd64][freebsd_110_64_prl] ||
| opensuse-leap-42.2 | [x86_64][leap_422_64_vbox] | ~~[x86_64][leap_422_64_vmware]~~ | ~~[x86_64][leap_422_64_prl]~~ ||
| oracle-5.11 | [x86_64][oracle_511_64_vbox] | [x86_64][oracle_511_64_vmware] | [x86_64][oracle_511_64_prl] ||
| oracle-6.8 | [x86_64][oracle_68_64_vbox] | [x86_64][oracle_68_64_vmware] | [x86_64][oracle_68_64_prl] ||
| oracle-7.3 | [x86_64][oracle_73_64_vbox] | [x86_64][oracle_73_64_vmware] | [x86_64][oracle_73_64_prl] ||
| ubuntu-12.04 | [amd64][ubuntu_1204_64_vbox] | [amd64][ubuntu_1204_64_vmware] | [amd64][ubuntu_1204_64_prl] ||
| ubuntu-14.04 | [amd64][ubuntu_1404_64_vbox] | [amd64][ubuntu_1404_64_vmware] | [amd64][ubuntu_1404_64_prl] ||
| ubuntu-16.04 | [amd64][ubuntu_1604_64_vbox] | [amd64][ubuntu_1604_64_vmware] | [amd64][ubuntu_1604_64_prl] ||
| ubuntu-16.10 | [amd64][ubuntu_1610_64_vbox] | [amd64][ubuntu_1610_64_vmware] | [amd64][ubuntu_1610_64_prl] ||

### 32 bit

Expand Down
32 changes: 32 additions & 0 deletions centos-7.3-x86_64.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,34 @@
"type": "parallels-iso",
"vm_name": "{{ user `template` }}"
},
{
"boot_command": [
"<wait5><tab> text ks=hd:fd0:/ks.cfg<enter><wait5><esc>"
],
"boot_wait": "10s",
"cpu": "{{ user `cpus` }}",
"disk_size": "{{user `disk_size`}}",
"floppy_files": [
"http/centos-7.3/ks.cfg"
],
"generation": "{{user `hyperv_generation`}}",
"guest_additions_mode": "{{user `hyperv_guest_additions_mode`}}",
"guest_additions_path": "{{user `hyperv_guest_additions_path`}}",
"http_directory": "http",
"iso_checksum": "{{user `iso_checksum`}}",
"iso_checksum_type": "{{user `iso_checksum_type`}}",
"iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
"output_directory": "packer-{{user `template`}}-hyperv",
"ram_size": "{{ user `memory` }}",
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_username": "vagrant",
"ssh_timeout": "10000s",
"switch_name":"{{ user `hyperv_switch`}}",
"type": "hyperv-iso",
"vm_name": "{{ user `template` }}"
},
{
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
Expand Down Expand Up @@ -165,6 +193,10 @@
"headless": "",
"http_proxy": "{{env `http_proxy`}}",
"https_proxy": "{{env `https_proxy`}}",
"hyperv_generation": "1" ,
"hyperv_guest_additions_mode": "disable",
"hyperv_guest_additions_path": "https://download.microsoft.com/download/6/8/F/68FE11B8-FAA4-4F8D-8C7D-74DA7F2CFC8C/LinuxIC-4.2.1.iso",
"hyperv_switch": "{{env `hyperv_switch`}}",
"iso_checksum": "c455ee948e872ad2194bdddd39045b83634e8613249182b88f549bb2319d97eb",
"iso_checksum_type": "sha256",
"iso_name": "CentOS-7-x86_64-DVD-1611.iso",
Expand Down
12 changes: 10 additions & 2 deletions http/centos-7.3/ks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ install
cdrom
lang en_US.UTF-8
keyboard us
network --bootproto=dhcp
network --bootproto=dhcp --onboot=on --device=eth0
rootpw vagrant
firewall --disabled
selinux --permissive
Expand All @@ -16,7 +16,7 @@ clearpart --all --initlabel
autopart
auth --enableshadow --passalgo=sha512 --kickstart
firstboot --disabled
reboot
reboot --eject
user --name=vagrant --plaintext --password vagrant

%packages --nobase --ignoremissing --excludedocs
Expand Down Expand Up @@ -77,4 +77,12 @@ bzip2
%post
# sudo
echo "%vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant

#Enable hyper-v daemons only if using hyper-v virtualization
if [ $(virt-what) == "hyperv" ]; then
yum -y install hyperv-daemons
systemctl enable hypervvssd
systemctl enable hypervkvpd
fi

%end