├── .gitignore ├── centos ├── scripts │ ├── update.sh │ ├── zerodisk.sh │ ├── vagrant.sh │ └── cleanup.sh ├── http │ └── ks.cfg └── centos-6.7-server-x86_64-vagrant.json ├── windows ├── scripts │ ├── unlimited-password-expiration.bat │ ├── firewall-open-smb.bat │ ├── firewall-open-rdp.bat │ ├── firewall-open-ping.bat │ ├── winrm-allow-basic.bat │ ├── enable-rdp.bat │ ├── execution-policy-unrestricted.bat │ ├── disable-hibernate.bat │ ├── vagrant.pub │ ├── vagrant-ssh.bat │ ├── uac-disable.bat │ ├── disablewinupdate.bat │ └── vagrant.bat ├── floppy │ ├── common │ │ ├── firewall-disable.bat │ │ ├── install-cygwin-sshd.sh │ │ ├── zz-start-sshd.cmd │ │ ├── install-cygwin-sshd.bat │ │ ├── fixnetwork.ps1 │ │ └── install-winrm.cmd │ ├── windows-2016-standard │ │ ├── configure.bat │ │ └── Autounattend.xml │ ├── windows-2012-R2-standard │ │ ├── configure.bat │ │ └── Autounattend.xml │ └── drivers │ │ ├── virtio-win-0.1.135 │ │ ├── NetKVM │ │ │ ├── 2k16 │ │ │ │ └── amd64 │ │ │ │ │ ├── netkvm.cat │ │ │ │ │ ├── netkvm.sys │ │ │ │ │ ├── netkvmco.dll │ │ │ │ │ └── netkvm.inf │ │ │ └── 2k12R2 │ │ │ │ └── amd64 │ │ │ │ ├── netkvm.cat │ │ │ │ ├── netkvm.sys │ │ │ │ ├── netkvmco.dll │ │ │ │ └── netkvm.inf │ │ └── viostor │ │ │ ├── 2k16 │ │ │ └── amd64 │ │ │ │ ├── viostor.cat │ │ │ │ ├── viostor.sys │ │ │ │ └── viostor.inf │ │ │ └── 2k12R2 │ │ │ └── amd64 │ │ │ ├── viostor.cat │ │ │ ├── viostor.sys │ │ │ └── viostor.inf │ │ └── virtio-win-0.1.117 │ │ ├── NetKVM │ │ └── 2k12R2 │ │ │ └── amd64 │ │ │ ├── netkvm.cat │ │ │ ├── netkvm.sys │ │ │ ├── netkvmco.dll │ │ │ └── netkvm.inf │ │ └── viostor │ │ └── 2k12R2 │ │ └── amd64 │ │ ├── viostor.cat │ │ ├── viostor.sys │ │ └── viostor.inf ├── vagrantfile-windows-2016-standard.template ├── vagrantfile-windows-2012-R2-standard.template ├── windows-2016.json ├── README.md ├── windows-2012-R2.json ├── windows.json └── windows-vagrant.json ├── ubuntu ├── scripts │ ├── sshd.sh │ ├── network.sh │ ├── packages.sh │ ├── update.sh │ ├── vagrant.sh │ └── cleanup.sh ├── README.md ├── ubuntu1604.json ├── ubuntu1404.json ├── ubuntu1804.json ├── http │ └── preseed.cfg ├── ubuntu.json └── ubuntu-vagrant.json ├── debian ├── scripts │ ├── update.sh │ ├── packages.sh │ ├── vagrant.sh │ └── cleanup.sh ├── debian87.json ├── debian86.json ├── debian79.json ├── debian86-vagrant.json ├── debian79-vagrant.json └── http │ └── preseed.cfg ├── CONTRIBUTING.md ├── .editorconfig ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | packer_cache 2 | iso 3 | **/output-* 4 | **/box 5 | -------------------------------------------------------------------------------- /centos/scripts/update.sh: -------------------------------------------------------------------------------- 1 | yum -y update 2 | yum -y upgrade 3 | -------------------------------------------------------------------------------- /windows/scripts/unlimited-password-expiration.bat: -------------------------------------------------------------------------------- 1 | net accounts /maxpwage:unlimited -------------------------------------------------------------------------------- /windows/floppy/common/firewall-disable.bat: -------------------------------------------------------------------------------- 1 | netsh advfirewall set allprofiles state off -------------------------------------------------------------------------------- /windows/scripts/firewall-open-smb.bat: -------------------------------------------------------------------------------- 1 | netsh firewall set portopening tcp 445 smb enable -------------------------------------------------------------------------------- /ubuntu/scripts/sshd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | echo "UseDNS no" >> /etc/ssh/sshd_config 4 | -------------------------------------------------------------------------------- /debian/scripts/update.sh: -------------------------------------------------------------------------------- 1 | # Update the box 2 | aptitude -y update 3 | aptitude -y full-upgrade 4 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to packer-qemu-templates 2 | 3 | Let's build a repository of templates for QEMU:) 4 | -------------------------------------------------------------------------------- /windows/scripts/firewall-open-rdp.bat: -------------------------------------------------------------------------------- 1 | netsh advfirewall firewall set rule group="remote desktop" new enable=Yes 2 | -------------------------------------------------------------------------------- /windows/scripts/firewall-open-ping.bat: -------------------------------------------------------------------------------- 1 | netsh advfirewall firewall add rule name="All ICMP V4" dir=in action=allow protocol=icmpv4 2 | -------------------------------------------------------------------------------- /centos/scripts/zerodisk.sh: -------------------------------------------------------------------------------- 1 | # Zero out the free space to save space in the final image: 2 | dd if=/dev/zero of=/EMPTY bs=1M 3 | rm -f /EMPTY 4 | -------------------------------------------------------------------------------- /windows/floppy/windows-2016-standard/configure.bat: -------------------------------------------------------------------------------- 1 | :: %~dp0 gives the dirname of the script 2 | cmd /c %~dp0install-winrm.cmd 3 | 4 | :: start winrm 5 | cmd /c %~dp0zz-start-sshd.cmd 6 | -------------------------------------------------------------------------------- /windows/floppy/windows-2012-R2-standard/configure.bat: -------------------------------------------------------------------------------- 1 | :: %~dp0 gives the dirname of the script 2 | cmd /c %~dp0install-winrm.cmd 3 | 4 | :: start winrm 5 | cmd /c %~dp0zz-start-sshd.cmd 6 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvm.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvm.cat -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvm.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvm.sys -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvm.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvm.cat -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvm.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvm.sys -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvm.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvm.cat -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvm.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvm.sys -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvmco.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvmco.dll -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/viostor.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/viostor.cat -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/viostor.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/viostor.sys -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvmco.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvmco.dll -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/viostor/2k12R2/amd64/viostor.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.117/viostor/2k12R2/amd64/viostor.cat -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/viostor/2k12R2/amd64/viostor.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.117/viostor/2k12R2/amd64/viostor.sys -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvmco.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvmco.dll -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/viostor/2k12R2/amd64/viostor.cat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/viostor/2k12R2/amd64/viostor.cat -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/viostor/2k12R2/amd64/viostor.sys: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jakobadam/packer-qemu-templates/HEAD/windows/floppy/drivers/virtio-win-0.1.135/viostor/2k12R2/amd64/viostor.sys -------------------------------------------------------------------------------- /windows/scripts/winrm-allow-basic.bat: -------------------------------------------------------------------------------- 1 | call winrm set winrm/config/client/auth @{Basic="true"} 2 | call winrm set winrm/config/service/auth @{Basic="true"} 3 | call winrm set winrm/config/service @{AllowUnencrypted="true"} -------------------------------------------------------------------------------- /windows/scripts/enable-rdp.bat: -------------------------------------------------------------------------------- 1 | :: enable RDP:http://technet.microsoft.com/en-us/library/cc782195(v=ws.10).aspx 2 | %SystemRoot%\System32\reg.exe ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f -------------------------------------------------------------------------------- /windows/scripts/execution-policy-unrestricted.bat: -------------------------------------------------------------------------------- 1 | cmd /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force" 2 | C:\Windows\SysWOW64\cmd /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force" 3 | -------------------------------------------------------------------------------- /windows/scripts/disable-hibernate.bat: -------------------------------------------------------------------------------- 1 | %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateFileSizePercent /t REG_DWORD /d 0 /f 2 | %SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Control\Power\ /v HibernateEnabled /t REG_DWORD /d 0 /f 3 | -------------------------------------------------------------------------------- /debian/scripts/packages.sh: -------------------------------------------------------------------------------- 1 | PACKAGES=" 2 | acpid 3 | apt-file 4 | bind9-host 5 | bzip2 6 | curl 7 | dnsutils 8 | emacs24-nox 9 | htop 10 | nmon 11 | ntp 12 | rsync 13 | slurm 14 | sudo 15 | tcpdump 16 | unzip 17 | vim-nox 18 | " 19 | aptitude -y install --without-recommends $PACKAGES 20 | -------------------------------------------------------------------------------- /ubuntu/README.md: -------------------------------------------------------------------------------- 1 | # Ubuntu packer templates 2 | 3 | ## Create vagrant image for use with vagrant libvirt 4 | 5 | ```bash 6 | packer build -var-file=ubuntu1604.json ubuntu-vagrant.json 7 | ``` 8 | 9 | ## Create qcow2 image for use with kvm 10 | 11 | ```bash 12 | packer build -var-file=ubuntu1604.json ubuntu.json 13 | ``` 14 | -------------------------------------------------------------------------------- /centos/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Store build time 4 | date > /etc/vagrant_box_build_time 5 | 6 | # Install vagrant key 7 | mkdir -pm 700 /home/vagrant/.ssh 8 | curl -L https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -o /home/vagrant/.ssh/authorized_keys 9 | chmod 0600 /home/vagrant/.ssh/authorized_keys 10 | chown -R vagrant:vagrant /home/vagrant/.ssh 11 | 12 | -------------------------------------------------------------------------------- /ubuntu/scripts/network.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Disable udev persistent net rules 4 | rm /etc/udev/rules.d/70-persistent-net.rules 5 | mkdir /etc/udev/rules.d/70-persistent-net.rules 6 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 7 | rm -rf /dev/.udev/ /var/lib/dhcp3/* 8 | echo "pre-up sleep 2" >> /etc/network/interfaces 9 | 10 | # Disable DNS reverse lookup 11 | echo "UseDNS no" >> /etc/ssh/sshd_config 12 | -------------------------------------------------------------------------------- /windows/scripts/vagrant.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key -------------------------------------------------------------------------------- /ubuntu/scripts/packages.sh: -------------------------------------------------------------------------------- 1 | DEV_PACKAGES=" 2 | build-essential 3 | curl 4 | emacs24-nox 5 | htop 6 | nmon 7 | slurm 8 | tcpdump 9 | unzip 10 | " 11 | 12 | ESSENTIAL_PACKAGES=" 13 | ntp 14 | nfs-common 15 | " 16 | 17 | if [[ $INSTALL_DEV_PACKAGES =~ true || $INSTALL_DEV_PACKAGES =~ 1 || 18 | $INSTALL_DEV_PACKAGES =~ yes ]]; then 19 | apt-get -y install $DEV_PACKAGES 20 | fi 21 | 22 | apt-get -y install $ESSENTIAL_PACKAGES 23 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | [*] 8 | 9 | # Change these settings to your own preference 10 | indent_style = space 11 | indent_size = 2 12 | 13 | # We recommend you to keep these unchanged 14 | end_of_line = lf 15 | charset = utf-8 16 | trim_trailing_whitespace = true 17 | insert_final_newline = true 18 | -------------------------------------------------------------------------------- /ubuntu/ubuntu1604.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ubuntu1604.json ubuntu.json`", 3 | "vm_name": "ubuntu1604", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_checksum": "16afb1375372c57471ea5e29803a89a5a6bd1f6aabea2e5e34ac1ab7eb9786ac", 7 | "iso_checksum_type": "sha256", 8 | "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04.6-server-amd64.iso", 9 | "memory": "512", 10 | "preseed" : "preseed.cfg", 11 | "version" : "1" 12 | } 13 | -------------------------------------------------------------------------------- /ubuntu/ubuntu1404.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=ubuntu1404.json ubuntu.json`", 3 | "vm_name": "ubuntu1404", 4 | "cpus": "1", 5 | "disk_size": "65536", 6 | "iso_url": "http://releases.ubuntu.com/14.04/ubuntu-14.04.5-server-amd64.iso", 7 | "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f", 8 | "iso_checksum_type": "md5", 9 | "memory": "512", 10 | "preseed" : "preseed.cfg", 11 | "version" : "5", 12 | "boot_command_prefix": "" 13 | } 14 | -------------------------------------------------------------------------------- /windows/scripts/vagrant-ssh.bat: -------------------------------------------------------------------------------- 1 | set USERDIR="C:\Users" 2 | 3 | if not exist %USERDIR%\vagrant\.ssh ( 4 | mkdir %USERDIR%\vagrant\.ssh 5 | ) 6 | 7 | C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "(New-Object System.Net.WebClient).DownloadFile('https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub', 'C:\Users\vagrant\.ssh\authorized_keys')" ", 12 | "version" : "1" 13 | } 14 | -------------------------------------------------------------------------------- /windows/scripts/uac-disable.bat: -------------------------------------------------------------------------------- 1 | @setlocal EnableDelayedExpansion EnableExtensions 2 | @for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i" 3 | @if defined PACKER_DEBUG (@echo on) else (@echo off) 4 | 5 | title Disabling UAC. Please wait... 6 | 7 | echo ==^> Disabling UAC 8 | reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /f /v EnableLUA /t REG_DWORD /d 0 9 | echo Reboot required to make this change effective. 10 | 11 | :exit0 12 | ver>nul 13 | goto :exit 14 | 15 | :exit1 16 | verify other 2>nul 17 | 18 | :exit 19 | -------------------------------------------------------------------------------- /debian/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Store build time 4 | date > /etc/vagrant_box_build_time 5 | 6 | # Set up sudo 7 | echo 'vagrant ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/vagrant 8 | 9 | # Install vagrant key 10 | mkdir -pm 700 /home/vagrant/.ssh 11 | wget --no-check-certificate https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O /home/vagrant/.ssh/authorized_keys 12 | chmod 0600 /home/vagrant/.ssh/authorized_keys 13 | chown -R vagrant:vagrant /home/vagrant/.ssh 14 | 15 | # NFS used for file syncing 16 | apt-get --yes install nfs-common 17 | -------------------------------------------------------------------------------- /windows/vagrantfile-windows-2016-standard.template: -------------------------------------------------------------------------------- 1 | Vagrant.require_version ">= 1.6.2" 2 | 3 | Vagrant.configure("2") do |config| 4 | config.vm.define "windows-2016-standard" 5 | config.vm.box = "windows-2016-standard" 6 | config.vm.communicator = "winrm" 7 | 8 | config.winrm.username = "vagrant" 9 | config.winrm.password = "vagrant" 10 | 11 | config.vm.guest = :windows 12 | config.windows.halt_timeout = 15 13 | 14 | config.vm.synced_folder ".", "/vagrant", disabled: true 15 | 16 | config.vm.provider :libvirt do |domain| 17 | domain.memory = 2048 18 | domain.cpus = 2 19 | end 20 | 21 | end 22 | -------------------------------------------------------------------------------- /windows/vagrantfile-windows-2012-R2-standard.template: -------------------------------------------------------------------------------- 1 | Vagrant.require_version ">= 1.6.2" 2 | 3 | Vagrant.configure("2") do |config| 4 | config.vm.define "windows-2012-R2-standard" 5 | config.vm.box = "windows-2012-R2-standard" 6 | config.vm.communicator = "winrm" 7 | 8 | config.winrm.username = "vagrant" 9 | config.winrm.password = "vagrant" 10 | 11 | config.vm.guest = :windows 12 | config.windows.halt_timeout = 15 13 | 14 | config.vm.synced_folder ".", "/vagrant", disabled: true 15 | 16 | config.vm.provider :libvirt do |domain| 17 | domain.memory = 2048 18 | domain.cpus = 2 19 | end 20 | 21 | end -------------------------------------------------------------------------------- /centos/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #remove network mac and interface information 2 | sed -i '/HWADDR/d' /etc/sysconfig/network-scripts/ifcfg-eth0 3 | sed -i "/^UUID/d" /etc/sysconfig/network-scripts/ifcfg-eth0 4 | 5 | #disable selinux 6 | rm /etc/sysconfig/selinux 7 | ln -s /etc/selinux/config /etc/sysconfig/selinux 8 | sed -i "s/^\(SELINUX=\).*/\1disabled/g" /etc/selinux/config 9 | 10 | #remove any ssh keys or persistent routes, dhcp leases 11 | rm -f /etc/ssh/ssh_host_* 12 | rm -f /etc/udev/rules.d/70-persistent-net.rules 13 | rm -f /var/lib/dhclient/dhclient-eth0.leases 14 | rm -rf /tmp/* 15 | yum -y clean all 16 | 17 | #disable reverse dns lookups on sshd 18 | echo "UseDNS no" >> /etc/ssh/sshd_config 19 | -------------------------------------------------------------------------------- /windows/windows-2016.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=windows-2016-standard.json windows-vagrant.json`", 3 | "vm_name": "windows-2016", 4 | "iso_checksum_type": "md5", 5 | "iso_checksum": "18a4f00a675b0338f3c7c93c4f131beb", 6 | "iso_url": "http://download.microsoft.com/download/1/6/F/16FA20E6-4662-482A-920B-1A45CF5AAE3C/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO", 7 | "version" : "1", 8 | "vagrantfile_template" : "vagrantfile-windows-2016-standard.template", 9 | "floppy_files_list" : "floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/*,floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/*,floppy/common/*,floppy/windows-2016-standard/*" 10 | } 11 | -------------------------------------------------------------------------------- /windows/README.md: -------------------------------------------------------------------------------- 1 | ## Windows Packer Templates 2 | 3 | * Virtio drivers are loaded on startup 4 | * Configured as 2 CPU and 2 GB memory by default 5 | * Ping enabled 6 | * RDP enabled 7 | * Vagrant user with password vagrant 8 | 9 | ### Quick Start 10 | 11 | ```bash 12 | $ packer build windows-2012-R2-standard.json 13 | ``` 14 | 15 | ### Windows 2012 R2 Standard 16 | 17 | Alter the admin password and the disk size: 18 | 19 | ``` 20 | $ read -p 'Enter password: ' -s password 21 | $ packer build -var "disk_size=61440" -var "password=$password" windows-2012-R2-standard-amd64.json 22 | ``` 23 | 24 | *NOTE*: Password strength requirements are pretty harsh 25 | http://technet.microsoft.com/en-us/library/cc786468%28v=ws.10%29.aspx 26 | -------------------------------------------------------------------------------- /windows/floppy/common/install-cygwin-sshd.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | HERE=$(dirname $(readlink -f $0)) 3 | 4 | # symlink current Windows user dir into /home 5 | ln -s "$(dirname $(cygpath -D))" /home/${USERNAME} 6 | 7 | mkgroup -l > /etc/group 8 | mkpasswd -l -p "$(cygpath -H)" > /etc/passwd 9 | 10 | # Create random password for cyg_server user 11 | # This might *not* fullfill the password requirements 12 | # in which case the user is prompted 13 | SSH_SERVICE_USER_PASSWORD=$(makepasswd --minchars=20 --maxchars=30) 14 | ssh-host-config -y --cygwin "ntsecbinmode mintty nodosfilewarning" --pwd "${SSH_SERVICE_USER_PASSWORD}" 15 | 16 | # Disable user / group permission checking 17 | sed -i 's/.*StrictModes.*/StrictModes no/' /etc/sshd_config 18 | 19 | # Disable reverse DNS lookups 20 | sed -i 's/.*UseDNS.*/UseDNS no/' /etc/sshd_config 21 | -------------------------------------------------------------------------------- /ubuntu/scripts/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | # Disable the release upgrader 4 | echo "==> Disabling the release upgrader" 5 | sed -i.bak 's/^Prompt=.*$/Prompt=never/' /etc/update-manager/release-upgrades 6 | 7 | echo "==> Checking version of Ubuntu" 8 | . /etc/lsb-release 9 | 10 | if [[ $DISTRIB_RELEASE == 16.04 || $DISTRIB_RELEASE == 18.04 ]]; then 11 | echo "==> Disabling periodic apt upgrades" 12 | echo 'APT::Periodic::Enable "0";' >> /etc/apt/apt.conf.d/10periodic 13 | fi 14 | 15 | echo "==> Updating list of repositories" 16 | # apt-get update does not actually perform updates, it just downloads and indexes the list of packages 17 | apt-get -y update 18 | 19 | if [[ $UPDATE =~ true || $UPDATE =~ 1 || $UPDATE =~ yes ]]; then 20 | echo "==> Performing dist-upgrade (all packages and kernel)" 21 | apt-get -y dist-upgrade --force-yes 22 | reboot 23 | sleep 60 24 | fi 25 | -------------------------------------------------------------------------------- /windows/windows-2012-R2.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build -var-file=windows-2012-R2-standard.json windows-vagrant.json`", 3 | "vm_name": "windows-2012-R2-standard", 4 | "iso_url": "http://care.dlservice.microsoft.com/dl/download/6/2/A/62A76ABB-9990-4EFC-A4FE-C7D698DAEB96/9600.17050.WINBLUE_REFRESH.140317-1640_X64FRE_SERVER_EVAL_EN-US-IR3_SSS_X64FREE_EN-US_DV9.ISO", 5 | "iso_checksum_type": "md5", 6 | "iso_checksum": "5b5e08c490ad16b59b1d9fab0def883a", 7 | "preseed" : "windows-2012-R2-standard/*", 8 | "version" : "1", 9 | "vagrantfile_template" : "vagrantfile-windows-2012-R2-standard.template", 10 | 11 | "_todo" : "It doesn't pick up the drivers when it's version 0.1.135...", 12 | 13 | "floppy_files_list": "floppy/drivers/virtio-win-0.1.117/viostor/2k12R2/amd64/*,floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/*,floppy/common/*,floppy/windows-2012-R2-standard/*" 14 | } 15 | -------------------------------------------------------------------------------- /windows/floppy/common/zz-start-sshd.cmd: -------------------------------------------------------------------------------- 1 | @setlocal EnableDelayedExpansion EnableExtensions 2 | @for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i" 3 | @if defined PACKER_DEBUG (@echo on) else (@echo off) 4 | 5 | if not defined PACKER_SERVICES set PACKER_SERVICES=opensshd sshd BvSshServer winrm 6 | 7 | title Starting services: %PACKER_SERVICES%. Please wait... 8 | 9 | :: Intentionally named with zz so it runs last by 00-run-all-scripts.cmd so 10 | :: that the Packer winrm/ssh connections is not inadvertently dropped during the 11 | :: Sysprep run 12 | 13 | for %%i in (%PACKER_SERVICES%) do ( 14 | echo ==^> Checking if the %%i service is installed 15 | sc query %%i >nul 2>nul && ( 16 | echo ==^> Configuring %%i service to autostart 17 | sc config %%i start= auto 18 | 19 | echo ==^> Starting the %%i service 20 | sc start %%i 21 | ) 22 | ) 23 | 24 | :exit0 25 | 26 | ver>nul 27 | 28 | goto :exit 29 | 30 | :exit1 31 | 32 | verify other 2>nul 33 | 34 | :exit 35 | -------------------------------------------------------------------------------- /ubuntu/http/preseed.cfg: -------------------------------------------------------------------------------- 1 | choose-mirror-bin mirror/http/proxy string 2 | d-i debian-installer/framebuffer boolean false 3 | d-i debconf/frontend select noninteractive 4 | d-i base-installer/kernel/override-image string linux-server 5 | d-i clock-setup/utc boolean true 6 | d-i clock-setup/utc-auto boolean true 7 | d-i finish-install/reboot_in_progress note 8 | d-i grub-installer/only_debian boolean true 9 | d-i grub-installer/with_other_os boolean true 10 | d-i partman-auto/method string regular 11 | d-i partman/choose_partition select finish 12 | d-i partman/confirm boolean true 13 | d-i partman/confirm_nooverwrite boolean true 14 | d-i partman/confirm_write_new_label boolean true 15 | d-i pkgsel/include string openssh-server 16 | d-i pkgsel/install-language-support boolean false 17 | d-i pkgsel/update-policy select none 18 | d-i pkgsel/upgrade select full-upgrade 19 | d-i time/zone string UTC 20 | d-i user-setup/allow-password-weak boolean true 21 | d-i user-setup/encrypt-home boolean false 22 | tasksel tasksel/first multiselect standard, ubuntu-server 23 | -------------------------------------------------------------------------------- /windows/floppy/common/install-cygwin-sshd.bat: -------------------------------------------------------------------------------- 1 | :: create the cygwin directory 2 | mkdir %SystemDrive%\cygwin 3 | 4 | :: Fetch cygwin 5 | set URL=http://cygwin.com/setup-x86_64.exe 6 | bitsadmin /transfer CygwinSetupExe /download /priority normal %URL% %SystemDrive%\cygwin\cygwin-setup-x86_64.exe 7 | 8 | :: goto a temp directory and install 9 | cd /D %SystemDrive%\windows\temp 10 | 11 | :: packages -- comma separated 12 | set PACKAGES=cygrunsrv,makepasswd,nano,openssh,rsync 13 | 14 | %SystemDrive%\cygwin\cygwin-setup-x86_64.exe -a x86_64 -q -R %SystemDrive%\cygwin -P %PACKAGES% -s http://cygwin.mirrors.pair.com 15 | 16 | :: Resolve the path with %~dp0 - for easy execution in both test and prod. 17 | set _PATH=%~dp0install-cygwin-sshd.sh 18 | 19 | :: Windows path -> linux path, i.d., replace \ with / 20 | set _LINUX_PATH=%_PATH:\=/% 21 | 22 | :: Execute the bash part 23 | %SystemDrive%\cygwin\bin\bash -l -c %_LINUX_PATH% 24 | 25 | :: Firewall Rules 26 | netsh advfirewall firewall add rule name="sshd" dir=in action=allow program="%SystemDrive%\cygwin\usr\sbin\sshd.exe" enable=yes 27 | netsh advfirewall firewall add rule name="ssh" dir=in action=allow protocol=TCP localport=22 28 | 29 | :: Start at last -- server is powered off by packer when ssh is avail. 30 | net start sshd -------------------------------------------------------------------------------- /centos/http/ks.cfg: -------------------------------------------------------------------------------- 1 | install 2 | url --url http://centos-mirror.jchost.net/6.7/os/x86_64/ 3 | repo --name updates --baseurl=http://centos-mirror.jchost.net/6.7/updates/x86_64/ 4 | 5 | # for too new hardware 6 | unsupported_hardware 7 | 8 | text 9 | skipx 10 | bootloader 11 | 12 | firewall --disabled 13 | selinux --disabled 14 | firstboot --disabled 15 | 16 | lang en_US.UTF-8 17 | keyboard us 18 | timezone --utc Etc/UTC 19 | 20 | zerombr 21 | clearpart --all --initlabel 22 | part /boot --size=250 23 | part swap --hibernation 24 | part / --size=3000 --grow 25 | 26 | rootpw vagrant 27 | authconfig --enableshadow --passalgo=sha512 28 | user --name=vagrant --groups=vagrant --password=vagrant 29 | 30 | reboot 31 | 32 | %packages --nobase 33 | @core 34 | -*firmware 35 | -b43-openfwwf 36 | -efibootmgr 37 | -audit* 38 | -libX* 39 | -fontconfig 40 | -freetype 41 | sudo 42 | openssh-clients 43 | openssh-server 44 | gcc 45 | make 46 | perl 47 | kernel-firmware 48 | kernel-devel 49 | %end 50 | 51 | %post 52 | echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant 53 | echo 'Defaults:vagrant env_keep += SSH_AUTH_SOCK' >> /etc/sudoers.d/vagrant 54 | chmod 0440 /etc/sudoers.d/vagrant 55 | sed -i 's/^.*requiretty/#Defaults requiretty/' /etc/sudoers 56 | sed -i 's/rhgb //' /boot/grub/grub.conf 57 | %end 58 | -------------------------------------------------------------------------------- /windows/floppy/common/fixnetwork.ps1: -------------------------------------------------------------------------------- 1 | # You cannot enable Windows PowerShell Remoting on network connections that are set to Public 2 | # Spin through all the network locations and if they are set to Public, set them to Private 3 | # using the INetwork interface: 4 | # http://msdn.microsoft.com/en-us/library/windows/desktop/aa370750(v=vs.85).aspx 5 | # For more info, see: 6 | # http://blogs.msdn.com/b/powershell/archive/2009/04/03/setting-network-location-to-private.aspx 7 | 8 | # Network location feature was only introduced in Windows Vista - no need to bother with this 9 | # if the operating system is older than Vista 10 | if([environment]::OSVersion.version.Major -lt 6) { return } 11 | 12 | # You cannot change the network location if you are joined to a domain, so abort 13 | if(1,3,4,5 -contains (Get-WmiObject win32_computersystem).DomainRole) { return } 14 | 15 | # Get network connections 16 | $networkListManager = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")) 17 | $connections = $networkListManager.GetNetworkConnections() 18 | 19 | $connections |foreach { 20 | Write-Host $_.GetNetwork().GetName()"category was previously set to"$_.GetNetwork().GetCategory() 21 | $_.GetNetwork().SetCategory(1) 22 | Write-Host $_.GetNetwork().GetName()"changed to category"$_.GetNetwork().GetCategory() 23 | } -------------------------------------------------------------------------------- /windows/scripts/disablewinupdate.bat: -------------------------------------------------------------------------------- 1 | 19 | 34 | -------------------------------------------------------------------------------- /windows/scripts/vagrant.bat: -------------------------------------------------------------------------------- 1 | @setlocal EnableDelayedExpansion EnableExtensions 2 | @for %%i in (a:\_packer_config*.cmd) do @call "%%~i" 3 | @if defined PACKER_DEBUG (@echo on) else (@echo off) 4 | 5 | if not defined VAGRANT_PUB_URL set VAGRANT_PUB_URL=https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub 6 | 7 | for %%i in ("%VAGRANT_PUB_URL%") do set VAGRANT_PUB=%%~nxi 8 | set VAGRANT_DIR=%TEMP%\vagrant 9 | set VAGRANT_PATH=%VAGRANT_DIR%\%VAGRANT_PUB% 10 | set AUTHORIZED_KEYS=%USERPROFILE%\.ssh\authorized_keys 11 | 12 | echo ==^> Creating "%VAGRANT_DIR%" 13 | mkdir "%VAGRANT_DIR%" 14 | pushd "%VAGRANT_DIR%" 15 | 16 | if exist "%SystemRoot%\_download.cmd" ( 17 | call "%SystemRoot%\_download.cmd" "%VAGRANT_PUB_URL%" "%VAGRANT_PATH%" 18 | ) else ( 19 | echo ==^> Downloading "%VAGRANT_PUB_URL%" to "%VAGRANT_PATH%" 20 | powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%VAGRANT_PUB_URL%', '%VAGRANT_PATH%')" Creating "%USERPROFILE%\.ssh" 25 | if not exist "%USERPROFILE%\.ssh" mkdir "%USERPROFILE%\.ssh" 26 | 27 | echo ==^> Adding "%VAGRANT_PATH%" to "%AUTHORIZED_KEYS%" 28 | type "%VAGRANT_PATH%" >>"%AUTHORIZED_KEYS%" 29 | 30 | if "%USERNAME%" == "sshd_server" for %%i in (%USERPROFILE%) do set USERNAME=%%~ni 31 | 32 | echo ==^> Disabling account password expiration for user "%USERNAME%" 33 | wmic USERACCOUNT WHERE "Name='%USERNAME%'" set PasswordExpires=FALSE 34 | 35 | :exit0 36 | 37 | @ping 127.0.0.1 38 | @ver>nul 39 | 40 | @goto :exit 41 | 42 | :exit1 43 | 44 | @ping 127.0.0.1 45 | @verify other 2>nul 46 | 47 | :exit 48 | 49 | @echo ==^> Script exiting with errorlevel %ERRORLEVEL% 50 | @exit /b %ERRORLEVEL% 51 | 52 | 53 | -------------------------------------------------------------------------------- /centos/centos-6.7-server-x86_64-vagrant.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "user": "vagrant", 4 | "password": "vagrant", 5 | "disk_size": "100000" 6 | }, 7 | 8 | "builders": 9 | [ 10 | { 11 | "name": "centos-6.7-x86_64-server-vagrant", 12 | 13 | "type": "qemu", 14 | "format": "qcow2", 15 | "accelerator": "kvm", 16 | "disk_size": "{{ user `disk_size`}}", 17 | 18 | "iso_url": "http://mirror.tocici.com/centos/6.7/isos/x86_64/CentOS-6.7-x86_64-minimal.iso", 19 | "iso_checksum": "9381a24b8bee2fed0c26896141a64b69", 20 | "iso_checksum_type": "md5", 21 | 22 | "http_directory": "http", 23 | 24 | "ssh_username": "{{user `user`}}", 25 | "ssh_password": "{{user `password`}}", 26 | "ssh_wait_timeout": "10m", 27 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -P now", 28 | 29 | "boot_wait": "2s", 30 | "boot_command": [ 31 | " text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg" 32 | ] 33 | } 34 | ], 35 | 36 | "provisioners": [ 37 | { 38 | "type": "shell", 39 | "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 40 | "scripts": [ 41 | "scripts/update.sh", 42 | "scripts/vagrant.sh", 43 | "scripts/cleanup.sh" 44 | ] 45 | } 46 | ], 47 | 48 | "post-processors": [ 49 | { 50 | "keep_input_artifact": false, 51 | "output": "box/centos-6.7_x86_64-server.box", 52 | "type": "vagrant" 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **NOTE: The templates are mostly unmaintained. I do, however, merge MRs. 2 | Reach out if you interested in taking over. Kind regards, Jakob** 3 | 4 | ## Introduction 5 | 6 | The packer-qemu-templates provides Packer templates for unattended 7 | building of relevant virtual machine images in the qcow2 format for 8 | use with KVM. 9 | 10 | In addition, all templates for use with Vagrant, through 11 | [vagrant-libvirt](https://github.com/pradels/vagrant-libvirt), are 12 | configured to let Packer create a Vagrant box through the libvirt 13 | post-processor. 14 | 15 | More info: 16 | https://aarhusworks.com/2014/08/26/unattended-installation-of-vm-images-with-packer.html 17 | 18 | ## Status 19 | 20 | Currently the project includes templates for Ubuntu, CentOS, Debian 21 | and Windows. In other words, the OSes of the VMs I and the other 22 | contributors use on a day-to-day basis. 23 | 24 | Feel free to contribute more:-) 25 | 26 | ## Usage 27 | 28 | ### Build qcow2 image 29 | 30 | Go into the relevant template directory and run packer build on the 31 | relevant json file. 32 | 33 | ```bash 34 | $ cd windows 35 | $ packer build -var-file windows.json windows-2012-R2-standard-vagrant.json 36 | ``` 37 | 38 | Templates names that ends with vagrant automatically creates a vagrant 39 | box. 40 | 41 | Add the box to Vagrant 42 | 43 | ```bash 44 | $ vagrant box add box/windows-2012-R2-standard.box --name windows-2012-R2-standard 45 | ``` 46 | 47 | Init vagrantfile 48 | ``` 49 | $ mkdir project && cd $_ 50 | $ vagrant init windows-2012-R2-standard 51 | ``` 52 | 53 | Start machine 54 | ``` 55 | $ vagrant up 56 | ``` 57 | 58 | Get IP of machine 59 | ``` 60 | $ vagrant ssh-config 61 | ``` 62 | 63 | ## Acknowledgements 64 | 65 | * [packer-images](https://github.com/opentable/packer-images.git) 66 | * [packer-windows](https://github.com/joefitzgerald/packer-windows) 67 | * [box-cutter](https://github.com/boxcutter/) 68 | -------------------------------------------------------------------------------- /ubuntu/scripts/vagrant.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | date > /etc/vagrant_box_build_time 4 | 5 | SSH_USER=${SSH_USERNAME:-vagrant} 6 | SSH_PASS=${SSH_PASSWORD:-vagrant} 7 | SSH_USER_HOME=${SSH_USER_HOME:-/home/${SSH_USER}} 8 | VAGRANT_INSECURE_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" 9 | 10 | # Packer passes boolean user variables through as '1', but this might change in 11 | # the future, so also check for 'true'. 12 | if [ "$INSTALL_VAGRANT_KEY" = "true" ] || [ "$INSTALL_VAGRANT_KEY" = "1" ]; then 13 | # Create Vagrant user (if not already present) 14 | if ! id -u $SSH_USER >/dev/null 2>&1; then 15 | echo "==> Creating $SSH_USER user" 16 | /usr/sbin/groupadd $SSH_USER 17 | /usr/sbin/useradd $SSH_USER -g $SSH_USER -G sudo -d $SSH_USER_HOME --create-home 18 | echo "${SSH_USER}:${SSH_PASS}" | chpasswd 19 | fi 20 | 21 | # Set up sudo 22 | echo "==> Giving ${SSH_USER} sudo powers" 23 | echo "${SSH_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant 24 | chmod 440 /etc/sudoers.d/vagrant 25 | 26 | # Fix stdin not being a tty 27 | if grep -q -E "^mesg n$" /root/.profile && sed -i "s/^mesg n$/tty -s \\&\\& mesg n/g" /root/.profile; then 28 | echo "==> Fixed stdin not being a tty." 29 | fi 30 | 31 | echo "==> Installing vagrant key" 32 | mkdir $SSH_USER_HOME/.ssh 33 | chmod 700 $SSH_USER_HOME/.ssh 34 | cd $SSH_USER_HOME/.ssh 35 | 36 | # https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub 37 | echo "${VAGRANT_INSECURE_KEY}" > $SSH_USER_HOME/.ssh/authorized_keys 38 | chmod 600 $SSH_USER_HOME/.ssh/authorized_keys 39 | chown -R $SSH_USER:$SSH_USER $SSH_USER_HOME/.ssh 40 | fi 41 | -------------------------------------------------------------------------------- /debian/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | # From https://github.com/boxcutter/debian/blob/master/script/cleanup.sh 4 | 5 | CLEANUP_PAUSE=${CLEANUP_PAUSE:-0} 6 | echo "==> Pausing for ${CLEANUP_PAUSE} seconds..." 7 | sleep ${CLEANUP_PAUSE} 8 | 9 | # Unique SSH keys will be generated on first boot 10 | echo "==> Removing SSH server keys" 11 | rm -f /etc/ssh/*_key* 12 | 13 | # Unique machine ID will be generated on first boot 14 | echo "==> Removing machine ID" 15 | rm -f /etc/machine-id 16 | rm -f /var/lib/dbus/machine-id 17 | 18 | # Make sure Udev doesn't block our network 19 | # http://6.ptmc.org/?p=164 20 | echo "cleaning up udev rules" 21 | rm -rf /dev/.udev/ 22 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 23 | 24 | echo "==> Cleaning up leftover dhcp leases" 25 | if [ -d "/var/lib/dhcp" ]; then 26 | rm /var/lib/dhcp/* 27 | fi 28 | 29 | echo "==> Cleaning up tmp" 30 | rm -rf /tmp/* 31 | 32 | # Cleanup apt cache 33 | apt-get -y autoremove --purge 34 | apt-get -y clean 35 | apt-get -y autoclean 36 | 37 | echo "==> Installed packages" 38 | dpkg --get-selections | grep -v deinstall 39 | 40 | # Remove Bash history 41 | unset HISTFILE 42 | rm -f /root/.bash_history 43 | rm -f /home/vagrant/.bash_history 44 | 45 | # Clean up log files 46 | echo "==> Purging log files" 47 | find /var/log -type f -delete 48 | 49 | # Skipping the whiteout part from box-cutter -- which would just fill up the qcow2 image 50 | 51 | # # Whiteout root 52 | # count=$(df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}') 53 | # let count-- 54 | # dd if=/dev/zero of=/tmp/whitespace bs=1024 count=$count 55 | # rm /tmp/whitespace 56 | 57 | # # Whiteout /boot 58 | # count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}') 59 | # let count-- 60 | # dd if=/dev/zero of=/boot/whitespace bs=1024 count=$count 61 | # rm /boot/whitespace 62 | 63 | # # Zero out the free space to save space in the final image 64 | # dd if=/dev/zero of=/EMPTY bs=1M 65 | # rm -f /EMPTY 66 | 67 | # Make sure we wait until all the data is written to disk, otherwise 68 | # Packer might quite too early 69 | # sync 70 | -------------------------------------------------------------------------------- /debian/debian87.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "user": "admindebian", 4 | "password": "admindebian", 5 | "disk_size": "100000", 6 | "domain": "" 7 | }, 8 | 9 | "builders": [ 10 | { 11 | "name": "debian87", 12 | 13 | "type": "qemu", 14 | "format": "qcow2", 15 | "accelerator": "kvm", 16 | "disk_size": "{{ user `disk_size` }}", 17 | 18 | "iso_url": "http://cdimage.debian.org/debian-cd/8.7.1/amd64/iso-cd/debian-8.7.1-amd64-netinst.iso", 19 | "iso_checksum": "749a15b7690769dd99e85d6104182a03d370b04b36106ec7cfaf6a551aa89fb4", 20 | "iso_checksum_type": "sha256", 21 | 22 | "http_directory": "http", 23 | 24 | "ssh_username": "{{ user `user` }}", 25 | "ssh_password": "{{ user `password` }}", 26 | "shutdown_command": "echo '{{ user `password` }}' | sudo -S shutdown -h now", 27 | 28 | "ssh_wait_timeout": "60m", 29 | 30 | "boot_wait": "2s", 31 | "boot_command": [ 32 | "", 33 | "install ", 34 | 35 | "auto=true ", 36 | "priority=critical ", 37 | "interface=auto ", 38 | "url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 39 | 40 | "passwd/user-fullname={{ user `user` }} ", 41 | "passwd/user-password={{ user `password` }} ", 42 | "passwd/user-password-again={{ user `password` }} ", 43 | "passwd/username={{ user `user` }} ", 44 | 45 | "" 46 | ] 47 | } 48 | ], 49 | 50 | "provisioners": [ 51 | { 52 | "type": "shell", 53 | "execute_command": "echo '{{ user `password` }}' | {{ .Vars }} sudo -E -S bash '{{ .Path }}'", 54 | "scripts": [ 55 | "scripts/update.sh", 56 | "scripts/packages.sh", 57 | "scripts/cleanup.sh" 58 | ] 59 | } 60 | ] 61 | } 62 | -------------------------------------------------------------------------------- /debian/debian86.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "user": "admindebian", 4 | "password": "admindebian", 5 | "disk_size": "100000", 6 | "domain": "" 7 | }, 8 | 9 | "builders": 10 | [ 11 | { 12 | "name": "debian83", 13 | 14 | "type": "qemu", 15 | "format": "qcow2", 16 | "accelerator": "kvm", 17 | "disk_size": "{{ user `disk_size`}}", 18 | 19 | "iso_url": "http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso", 20 | "iso_checksum": "e9f61bf327db6d8f7cee05a99f2353cc", 21 | "iso_checksum_type": "md5", 22 | 23 | "http_directory": "http", 24 | 25 | "ssh_username": "{{user `user`}}", 26 | "ssh_password": "{{user `password`}}", 27 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now", 28 | 29 | "ssh_wait_timeout": "60m", 30 | 31 | "boot_wait": "2s", 32 | "boot_command": [ 33 | "", 34 | "install auto ", 35 | "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 36 | "debian-installer=en_US locale=en_US keymap=us ", 37 | "netcfg/get_hostname={{ .Name }} ", 38 | "netcfg/get_domain={{ user `domain`}} ", 39 | 40 | "fb=false debconf/frontend=noninteractive ", 41 | 42 | "passwd/user-fullname={{user `user`}} ", 43 | "passwd/user-password={{user `password`}} ", 44 | "passwd/user-password-again={{user `password`}} ", 45 | "passwd/username={{user `user`}} ", 46 | 47 | "" 48 | ] 49 | } 50 | ], 51 | 52 | "provisioners": [ 53 | { 54 | "type": "shell", 55 | "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 56 | "scripts": [ 57 | "scripts/update.sh", 58 | "scripts/packages.sh", 59 | "scripts/cleanup.sh" 60 | ] 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /debian/debian79.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "user": "admindebian", 4 | "password": "admindebian", 5 | "disk_size": "100000", 6 | "domain": "" 7 | }, 8 | 9 | "builders": 10 | [ 11 | { 12 | "name": "debian79", 13 | 14 | "type": "qemu", 15 | "format": "qcow2", 16 | "accelerator": "kvm", 17 | "disk_size": "{{ user `disk_size`}}", 18 | 19 | "iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/7.9.0/amd64/iso-cd/debian-7.9.0-amd64-netinst.iso", 20 | "iso_checksum": "774d1fc8c5364e63b22242c33a89c1a3", 21 | "iso_checksum_type": "md5", 22 | 23 | "http_directory": "http", 24 | 25 | "ssh_username": "{{user `user`}}", 26 | "ssh_password": "{{user `password`}}", 27 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now", 28 | 29 | "ssh_wait_timeout": "60m", 30 | 31 | "boot_wait": "2s", 32 | "boot_command": [ 33 | "", 34 | "install auto ", 35 | "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 36 | "debian-installer=en_US locale=en_US keymap=us ", 37 | "netcfg/get_hostname={{ .Name }} ", 38 | "netcfg/get_domain={{ user `domain`}} ", 39 | 40 | "fb=false debconf/frontend=noninteractive ", 41 | 42 | "passwd/user-fullname={{user `user`}} ", 43 | "passwd/user-password={{user `password`}} ", 44 | "passwd/user-password-again={{user `password`}} ", 45 | "passwd/username={{user `user`}} ", 46 | 47 | "" 48 | ] 49 | } 50 | ], 51 | 52 | "provisioners": [ 53 | { 54 | "type": "shell", 55 | "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 56 | "scripts": [ 57 | "scripts/update.sh", 58 | "scripts/packages.sh", 59 | "scripts/cleanup.sh" 60 | ] 61 | } 62 | ] 63 | } 64 | -------------------------------------------------------------------------------- /debian/debian86-vagrant.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "user": "vagrant", 4 | "password": "vagrant", 5 | "disk_size": "100000", 6 | "domain": "" 7 | }, 8 | 9 | "builders": 10 | [ 11 | { 12 | "name": "debian83-vagrant", 13 | 14 | "type": "qemu", 15 | "format": "qcow2", 16 | "accelerator": "kvm", 17 | "disk_size": "{{ user `disk_size`}}", 18 | 19 | "iso_url": "http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso", 20 | "iso_checksum": "e9f61bf327db6d8f7cee05a99f2353cc", 21 | "iso_checksum_type": "md5", 22 | 23 | "http_directory": "http", 24 | 25 | "ssh_username": "{{user `user`}}", 26 | "ssh_password": "{{user `password`}}", 27 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now", 28 | 29 | "ssh_wait_timeout": "60m", 30 | 31 | "boot_wait": "2s", 32 | "boot_command": [ 33 | "", 34 | "install auto ", 35 | "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 36 | "debian-installer=en_US locale=en_US keymap=us ", 37 | "netcfg/get_hostname={{ .Name }} ", 38 | "netcfg/get_domain={{ user `domain`}} ", 39 | 40 | "fb=false debconf/frontend=noninteractive ", 41 | 42 | "passwd/user-fullname={{user `user`}} ", 43 | "passwd/user-password={{user `password`}} ", 44 | "passwd/user-password-again={{user `password`}} ", 45 | "passwd/username={{user `user`}} ", 46 | 47 | "" 48 | ] 49 | } 50 | ], 51 | 52 | "provisioners": [ 53 | { 54 | "type": "shell", 55 | "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 56 | "scripts": [ 57 | "scripts/update.sh", 58 | "scripts/packages.sh", 59 | "scripts/vagrant.sh", 60 | "scripts/cleanup.sh" 61 | ] 62 | } 63 | ], 64 | 65 | "post-processors": [ 66 | { 67 | "keep_input_artifact": false, 68 | "output": "box/debian86-vagrant.box", 69 | "type": "vagrant" 70 | } 71 | ] 72 | 73 | } 74 | -------------------------------------------------------------------------------- /debian/debian79-vagrant.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": { 3 | "user": "vagrant", 4 | "password": "vagrant", 5 | "disk_size": "100000", 6 | "domain": "" 7 | }, 8 | 9 | "builders": 10 | [ 11 | { 12 | "name": "debian79-vagrant", 13 | 14 | "type": "qemu", 15 | "format": "qcow2", 16 | "accelerator": "kvm", 17 | "disk_size": "{{ user `disk_size`}}", 18 | 19 | "iso_url": "http://cdimage.debian.org/mirror/cdimage/archive/7.9.0/amd64/iso-cd/debian-7.9.0-amd64-netinst.iso", 20 | "iso_checksum": "774d1fc8c5364e63b22242c33a89c1a3", 21 | "iso_checksum_type": "md5", 22 | 23 | "http_directory": "http", 24 | 25 | "ssh_username": "{{user `user`}}", 26 | "ssh_password": "{{user `password`}}", 27 | "shutdown_command": "echo '{{user `password`}}'|sudo -S shutdown -h now", 28 | 29 | "ssh_wait_timeout": "60m", 30 | 31 | "boot_wait": "2s", 32 | "boot_command": [ 33 | "", 34 | "install auto ", 35 | "preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg ", 36 | "debian-installer=en_US locale=en_US keymap=us ", 37 | "netcfg/get_hostname={{ .Name }} ", 38 | "netcfg/get_domain={{ user `domain`}} ", 39 | 40 | "fb=false debconf/frontend=noninteractive ", 41 | 42 | "passwd/user-fullname={{user `user`}} ", 43 | "passwd/user-password={{user `password`}} ", 44 | "passwd/user-password-again={{user `password`}} ", 45 | "passwd/username={{user `user`}} ", 46 | 47 | "" 48 | ] 49 | } 50 | ], 51 | 52 | "provisioners": [ 53 | { 54 | "type": "shell", 55 | "execute_command": "echo '{{user `password`}}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 56 | "scripts": [ 57 | "scripts/update.sh", 58 | "scripts/packages.sh", 59 | "scripts/vagrant.sh", 60 | "scripts/cleanup.sh" 61 | ] 62 | } 63 | ], 64 | 65 | "post-processors": [ 66 | { 67 | "keep_input_artifact": false, 68 | "output": "box/debian77-vagrant.box", 69 | "type": "vagrant" 70 | } 71 | ] 72 | 73 | } 74 | -------------------------------------------------------------------------------- /windows/windows.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build windows.json`", 3 | "builders": [ 4 | { 5 | "type": "qemu", 6 | "disk_size": "{{ user `disk_size` }}", 7 | 8 | "floppy_files": "{{ user `floppy_files_list` }}", 9 | 10 | "headless": "{{ user `headless` }}", 11 | "http_directory": "http", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 14 | "iso_urls": [ 15 | "{{ user `iso_url` }}" 16 | ], 17 | "output_directory": "output-{{ user `vm_name` }}", 18 | "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", 19 | 20 | "communicator": "winrm", 21 | "winrm_username": "vagrant", 22 | "winrm_password": "vagrant", 23 | "winrm_timeout": "10000s", 24 | 25 | "qemuargs": [ 26 | [ "-m", "4048M" ], 27 | [ "-cpu", "Westmere" ] 28 | ], 29 | "boot_wait": "2s", 30 | "vm_name": "{{ user `vm_name` }}", 31 | "qemuargs": [ 32 | [ "-m", "{{ user `memory` }}" ], 33 | [ "-smp", "cpus={{ user `cpus`}}"] 34 | ] 35 | } 36 | ], 37 | "provisioners": [ 38 | { 39 | "type": "windows-shell", 40 | "scripts": [ 41 | "scripts/unlimited-password-expiration.bat", 42 | "scripts/enable-rdp.bat", 43 | "scripts/uac-disable.bat", 44 | "scripts/disablewinupdate.bat", 45 | "scripts/disable-hibernate.bat", 46 | "scripts/firewall-open-ping.bat", 47 | "scripts/firewall-open-rdp.bat" 48 | ] 49 | }, 50 | 51 | { 52 | "type": "windows-shell", 53 | "inline": ["net user vagrant {{ user `password`}}"] 54 | } 55 | ], 56 | 57 | "variables": { 58 | "disk_size": "65536", 59 | "cpus" : "2", 60 | "memory" : "2048", 61 | "headless": "true", 62 | "iso_checksum_type": "md5", 63 | "iso_checksum": "18a4f00a675b0338f3c7c93c4f131beb", 64 | "iso_url": "http://download.microsoft.com/download/1/6/F/16FA20E6-4662-482A-920B-1A45CF5AAE3C/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO", 65 | "preseed" : "windows-2016-standard/*", 66 | "vagrantfile_template" : "vagrantfile-windows-2016-standard.template", 67 | "version" : "1", 68 | "vm_name": "windows-2016", 69 | "floppy_files_list" : "floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/*,floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/*,floppy/common/*,floppy/windows-2016-standard/*" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /windows/windows-vagrant.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build windows.json`", 3 | "builders": [ 4 | { 5 | "type": "qemu", 6 | "disk_size": "{{ user `disk_size` }}", 7 | 8 | "floppy_files": "{{ user `floppy_files_list` }}", 9 | 10 | "headless": "{{ user `headless` }}", 11 | "http_directory": "http", 12 | "iso_checksum": "{{ user `iso_checksum` }}", 13 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 14 | "iso_urls": [ 15 | "{{ user `iso_url` }}" 16 | ], 17 | "output_directory": "output-{{ user `vm_name` }}", 18 | "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", 19 | 20 | "communicator": "winrm", 21 | "winrm_username": "vagrant", 22 | "winrm_password": "vagrant", 23 | "winrm_timeout": "10000s", 24 | 25 | "qemuargs": [ 26 | [ "-m", "4048M" ], 27 | [ "-cpu", "Westmere" ] 28 | ], 29 | "boot_wait": "2s", 30 | "vm_name": "{{ user `vm_name` }}", 31 | "qemuargs": [ 32 | [ "-m", "{{ user `memory` }}" ], 33 | [ "-smp", "cpus={{ user `cpus`}}"] 34 | ] 35 | } 36 | ], 37 | "post-processors": [ 38 | { 39 | "keep_input_artifact": false, 40 | "output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box", 41 | "type": "vagrant", 42 | "vagrantfile_template": "{{ user `vagrantfile_template` }}" 43 | } 44 | ], 45 | "provisioners": [ 46 | { 47 | "type": "windows-shell", 48 | "scripts": [ 49 | "scripts/unlimited-password-expiration.bat", 50 | "scripts/enable-rdp.bat", 51 | "scripts/uac-disable.bat", 52 | "scripts/disablewinupdate.bat", 53 | "scripts/disable-hibernate.bat", 54 | "scripts/firewall-open-ping.bat", 55 | "scripts/firewall-open-rdp.bat" 56 | ] 57 | }, 58 | 59 | { 60 | "type": "windows-shell", 61 | "inline": ["net user vagrant {{ user `password`}}"] 62 | } 63 | ], 64 | 65 | "variables": { 66 | "disk_size": "65536", 67 | "cpus" : "2", 68 | "memory" : "2048", 69 | "headless": "true", 70 | "iso_checksum_type": "md5", 71 | "iso_checksum": "18a4f00a675b0338f3c7c93c4f131beb", 72 | "iso_url": "http://download.microsoft.com/download/1/6/F/16FA20E6-4662-482A-920B-1A45CF5AAE3C/14393.0.160715-1616.RS1_RELEASE_SERVER_EVAL_X64FRE_EN-US.ISO", 73 | "preseed" : "windows-2016-standard/*", 74 | "vagrantfile_template" : "vagrantfile-windows-2016-standard.template", 75 | "version" : "1", 76 | "vm_name": "windows-2016", 77 | "floppy_files_list" : "floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/*,floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/*,floppy/common/*,floppy/windows-2016-standard/*" 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/viostor/2k12R2/amd64/viostor.inf: -------------------------------------------------------------------------------- 1 | ; Copyright (c) 2008-2016, Red Hat Inc. 2 | [Version] 3 | Signature="$Windows NT$" 4 | Class=SCSIAdapter 5 | ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} 6 | Provider=%RHEL% 7 | DriverVer=04/08/2016,62.73.104.11700 8 | CatalogFile=viostor.cat 9 | DriverPackageType = PlugAndPlay 10 | DriverPackageDisplayName = %RHELScsi.DeviceDesc% 11 | 12 | ; 13 | ; Source file information 14 | ; 15 | 16 | [SourceDisksNames] 17 | 1 = %DiskId1%,,,"" 18 | 19 | [SourceDisksFiles] 20 | viostor.sys = 1,, 21 | 22 | [ControlFlags] 23 | ;ExcludeFromSelect = * 24 | 25 | [DestinationDirs] 26 | DefaultDestDir = 10 27 | viostor_Files_Driver = 12 28 | 29 | ; 30 | ; Driver information 31 | ; 32 | 33 | [Manufacturer] 34 | %RHEL% = RHEL,NTamd64 35 | 36 | [RHEL.NTamd64] 37 | %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00 38 | 39 | ; 40 | ; General installation section 41 | ; 42 | 43 | [viostor_Files_Driver] 44 | viostor.sys,,,2 45 | 46 | [rhelscsi_inst] 47 | CopyFiles=viostor_Files_Driver 48 | 49 | ; 50 | ; Service Installation 51 | ; 52 | 53 | [rhelscsi_inst.Services] 54 | AddService = viostor, 0x00000002 , rhelscsi_Service_Inst, rhelscsi_EventLog_Inst 55 | 56 | [rhelscsi_Service_Inst] 57 | ServiceType = %SERVICE_KERNEL_DRIVER% 58 | StartType = %SERVICE_BOOT_START% 59 | ErrorControl = %SERVICE_ERROR_NORMAL% 60 | ServiceBinary = %12%\viostor.sys 61 | LoadOrderGroup = SCSI miniport 62 | AddReg = pnpsafe_pci_addreg 63 | 64 | [rhelscsi_inst.HW] 65 | AddReg = pnpsafe_pci_addreg_msix 66 | 67 | [rhelscsi_EventLog_Inst] 68 | AddReg = rhelscsi_EventLog_AddReg 69 | 70 | [rhelscsi_EventLog_AddReg] 71 | HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll" 72 | HKR,,TypesSupported,%REG_DWORD%,7 73 | 74 | 75 | [pnpsafe_pci_addreg] 76 | HKR, "Parameters\PnpInterface", "5", %REG_DWORD%, 0x00000001 77 | HKR, "Parameters", "BusType", %REG_DWORD%, 0x00000001 78 | 79 | [pnpsafe_pci_addreg_msix] 80 | HKR, "Interrupt Management",, 0x00000010 81 | HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 82 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1 83 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 2 84 | HKR, "Interrupt Management\Affinity Policy",, 0x00000010 85 | HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 5 86 | 87 | 88 | [Strings] 89 | ; 90 | ; Localizable Strings 91 | ; 92 | diskId1 = "Red Hat VirtIO SCSI controller Installation Disk" 93 | RHELScsi.DeviceDesc = "Red Hat VirtIO SCSI controller" 94 | RHEL = "Red Hat, Inc." 95 | 96 | ; 97 | ; Non-Localizable Strings 98 | ; 99 | 100 | REG_EXPAND_SZ = 0x00020000 101 | REG_DWORD = 0x00010001 102 | SERVICE_KERNEL_DRIVER = 1 103 | SERVICE_BOOT_START = 0 104 | SERVICE_ERROR_NORMAL = 1 105 | 106 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/viostor/2k12R2/amd64/viostor.inf: -------------------------------------------------------------------------------- 1 | ;/*++ 2 | ; 3 | ;Copyright (c) 2008-2017 Red Hat Inc. 4 | ; 5 | ;Module Name: 6 | ; viostor.inf 7 | ; 8 | ;Abstract: 9 | ; 10 | ;Installation Notes: 11 | ; Using Devcon: Type "devcon install viostor.inf PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00" or 12 | ; "devcon install viostor.inf PCI\VEN_1AF4&DEV_1042&SUBSYS_11001AF4&REV_01" to install 13 | ; 14 | ;--*/ 15 | 16 | [Version] 17 | Signature="$Windows NT$" 18 | Class=SCSIAdapter 19 | ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} 20 | Provider=%RHEL% 21 | DriverVer=03/27/2017,62.74.104.13500 22 | CatalogFile=viostor.cat 23 | DriverPackageType = PlugAndPlay 24 | DriverPackageDisplayName = %RHELScsi.DeviceDesc% 25 | 26 | ; 27 | ; Source file information 28 | ; 29 | 30 | [SourceDisksNames] 31 | 1 = %DiskId1%,,,"" 32 | 33 | [SourceDisksFiles] 34 | viostor.sys = 1,, 35 | 36 | [ControlFlags] 37 | ;ExcludeFromSelect = * 38 | 39 | [DestinationDirs] 40 | DefaultDestDir = 10 41 | viostor_Files_Driver = 12 42 | 43 | ; 44 | ; Driver information 45 | ; 46 | 47 | [Manufacturer] 48 | %RHEL% = RHEL,NTamd64.6.2 49 | 50 | [RHEL.NTamd64.6.2] 51 | %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00 52 | %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1042&SUBSYS_11001AF4&REV_01 53 | 54 | ; 55 | ; General installation section 56 | ; 57 | 58 | [viostor_Files_Driver] 59 | viostor.sys,,,2 60 | 61 | [rhelscsi_inst] 62 | CopyFiles=viostor_Files_Driver 63 | 64 | ; 65 | ; Service Installation 66 | ; 67 | 68 | [rhelscsi_inst.Services] 69 | AddService = viostor, 0x00000002 , rhelscsi_Service_Inst, rhelscsi_EventLog_Inst 70 | 71 | [rhelscsi_Service_Inst] 72 | ServiceType = %SERVICE_KERNEL_DRIVER% 73 | StartType = %SERVICE_BOOT_START% 74 | ErrorControl = %SERVICE_ERROR_NORMAL% 75 | ServiceBinary = %12%\viostor.sys 76 | LoadOrderGroup = SCSI miniport 77 | AddReg = pnpsafe_pci_addreg 78 | 79 | [rhelscsi_inst.HW] 80 | AddReg = pnpsafe_pci_addreg_msix 81 | 82 | [rhelscsi_EventLog_Inst] 83 | AddReg = rhelscsi_EventLog_AddReg 84 | 85 | [rhelscsi_EventLog_AddReg] 86 | HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll" 87 | HKR,,TypesSupported,%REG_DWORD%,7 88 | 89 | 90 | [pnpsafe_pci_addreg] 91 | HKR, "Parameters\PnpInterface", "5", %REG_DWORD%, 0x00000001 92 | HKR, "Parameters", "BusType", %REG_DWORD%, 0x00000001 93 | 94 | [pnpsafe_pci_addreg_msix] 95 | HKR, "Interrupt Management",, 0x00000010 96 | HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 97 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1 98 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 256 99 | HKR, "Interrupt Management\Affinity Policy",, 0x00000010 100 | HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 5 101 | 102 | 103 | [Strings] 104 | ; 105 | ; Localizable Strings 106 | ; 107 | diskId1 = "Red Hat VirtIO SCSI controller Installation Disk" 108 | RHELScsi.DeviceDesc = "Red Hat VirtIO SCSI controller" 109 | RHEL = "Red Hat, Inc." 110 | 111 | ; 112 | ; Non-Localizable Strings 113 | ; 114 | 115 | REG_EXPAND_SZ = 0x00020000 116 | REG_DWORD = 0x00010001 117 | SERVICE_KERNEL_DRIVER = 1 118 | SERVICE_BOOT_START = 0 119 | SERVICE_ERROR_NORMAL = 1 120 | 121 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/viostor/2k16/amd64/viostor.inf: -------------------------------------------------------------------------------- 1 | ;/*++ 2 | ; 3 | ;Copyright (c) 2008-2017 Red Hat Inc. 4 | ; 5 | ;Module Name: 6 | ; viostor.inf 7 | ; 8 | ;Abstract: 9 | ; 10 | ;Installation Notes: 11 | ; Using Devcon: Type "devcon install viostor.inf PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00" or 12 | ; "devcon install viostor.inf PCI\VEN_1AF4&DEV_1042&SUBSYS_11001AF4&REV_01" to install 13 | ; 14 | ;--*/ 15 | 16 | [Version] 17 | Signature="$Windows NT$" 18 | Class=SCSIAdapter 19 | ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318} 20 | Provider=%RHEL% 21 | DriverVer=03/27/2017,100.74.104.13500 22 | CatalogFile=viostor.cat 23 | DriverPackageType = PlugAndPlay 24 | DriverPackageDisplayName = %RHELScsi.DeviceDesc% 25 | 26 | ; 27 | ; Source file information 28 | ; 29 | 30 | [SourceDisksNames] 31 | 1 = %DiskId1%,,,"" 32 | 33 | [SourceDisksFiles] 34 | viostor.sys = 1,, 35 | 36 | [ControlFlags] 37 | ;ExcludeFromSelect = * 38 | 39 | [DestinationDirs] 40 | DefaultDestDir = 10 41 | viostor_Files_Driver = 12 42 | 43 | ; 44 | ; Driver information 45 | ; 46 | 47 | [Manufacturer] 48 | %RHEL% = RHEL,NTamd64.10.0 49 | 50 | [RHEL.NTamd64.10.0] 51 | %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1001&SUBSYS_00021AF4&REV_00 52 | %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1042&SUBSYS_11001AF4&REV_01 53 | 54 | ; 55 | ; General installation section 56 | ; 57 | 58 | [viostor_Files_Driver] 59 | viostor.sys,,,2 60 | 61 | [rhelscsi_inst] 62 | CopyFiles=viostor_Files_Driver 63 | 64 | ; 65 | ; Service Installation 66 | ; 67 | 68 | [rhelscsi_inst.Services] 69 | AddService = viostor, 0x00000002 , rhelscsi_Service_Inst, rhelscsi_EventLog_Inst 70 | 71 | [rhelscsi_Service_Inst] 72 | ServiceType = %SERVICE_KERNEL_DRIVER% 73 | StartType = %SERVICE_BOOT_START% 74 | ErrorControl = %SERVICE_ERROR_NORMAL% 75 | ServiceBinary = %12%\viostor.sys 76 | LoadOrderGroup = SCSI miniport 77 | AddReg = pnpsafe_pci_addreg 78 | 79 | [rhelscsi_inst.HW] 80 | AddReg = pnpsafe_pci_addreg_msix 81 | 82 | [rhelscsi_EventLog_Inst] 83 | AddReg = rhelscsi_EventLog_AddReg 84 | 85 | [rhelscsi_EventLog_AddReg] 86 | HKR,,EventMessageFile,%REG_EXPAND_SZ%,"%%SystemRoot%%\System32\IoLogMsg.dll" 87 | HKR,,TypesSupported,%REG_DWORD%,7 88 | 89 | 90 | [pnpsafe_pci_addreg] 91 | HKR, "Parameters\PnpInterface", "5", %REG_DWORD%, 0x00000001 92 | HKR, "Parameters", "BusType", %REG_DWORD%, 0x00000001 93 | 94 | [pnpsafe_pci_addreg_msix] 95 | HKR, "Interrupt Management",, 0x00000010 96 | HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 97 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1 98 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 256 99 | HKR, "Interrupt Management\Affinity Policy",, 0x00000010 100 | HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 5 101 | 102 | 103 | [Strings] 104 | ; 105 | ; Localizable Strings 106 | ; 107 | diskId1 = "Red Hat VirtIO SCSI controller Installation Disk" 108 | RHELScsi.DeviceDesc = "Red Hat VirtIO SCSI controller" 109 | RHEL = "Red Hat, Inc." 110 | 111 | ; 112 | ; Non-Localizable Strings 113 | ; 114 | 115 | REG_EXPAND_SZ = 0x00020000 116 | REG_DWORD = 0x00010001 117 | SERVICE_KERNEL_DRIVER = 1 118 | SERVICE_BOOT_START = 0 119 | SERVICE_ERROR_NORMAL = 1 120 | 121 | -------------------------------------------------------------------------------- /ubuntu/scripts/cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -eux 2 | 3 | SSH_USER=${SSH_USERNAME:-vagrant} 4 | 5 | # Make sure udev does not block our network - http://6.ptmc.org/?p=164 6 | echo "==> Cleaning up udev rules" 7 | rm -rf /dev/.udev/ 8 | rm /lib/udev/rules.d/75-persistent-net-generator.rules 9 | 10 | echo "==> Cleaning up leftover dhcp leases" 11 | # Ubuntu 10.04 12 | if [ -d "/var/lib/dhcp3" ]; then 13 | rm /var/lib/dhcp3/* 14 | fi 15 | # Ubuntu 12.04 & 14.04 16 | if [ -d "/var/lib/dhcp" ]; then 17 | rm /var/lib/dhcp/* 18 | fi 19 | 20 | UBUNTU_VERSION=$(lsb_release -sr) 21 | if [[ ${UBUNTU_VERSION} == 16.04 ]] || [[ ${UBUNTU_VERSION} == 16.10 ]]; then 22 | # Modified version of 23 | # https://github.com/cbednarski/packer-ubuntu/blob/master/scripts-1604/vm_cleanup.sh#L9-L15 24 | # Instead of eth0 the interface is now called ens5 to mach the PCI 25 | # slot, so we need to change the networking scripts to enable the 26 | # correct interface. 27 | # 28 | # NOTE: After the machine is rebooted Packer will not be able to reconnect 29 | # (Vagrant will be able to) so make sure this is done in your final 30 | # provisioner. 31 | sed -i "s/ens3/ens5/g" /etc/network/interfaces 32 | fi 33 | 34 | # Add delay to prevent "vagrant reload" from failing 35 | echo "pre-up sleep 2" >> /etc/network/interfaces 36 | 37 | echo "==> Cleaning up tmp" 38 | rm -rf /tmp/* 39 | 40 | # Cleanup apt cache 41 | apt-get -y autoremove --purge 42 | apt-get -y clean 43 | apt-get -y autoclean 44 | 45 | echo "==> Installed packages" 46 | dpkg --get-selections | grep -v deinstall 47 | 48 | DISK_USAGE_BEFORE_CLEANUP=$(df -h) 49 | 50 | # Remove Bash history 51 | unset HISTFILE 52 | rm -f /root/.bash_history 53 | rm -f /home/${SSH_USER}/.bash_history 54 | 55 | # Clean up log files 56 | find /var/log -type f | while read f; do echo -ne '' > "${f}"; done; 57 | 58 | echo "==> Clearing last login information" 59 | >/var/log/lastlog 60 | >/var/log/wtmp 61 | >/var/log/btmp 62 | 63 | # NOTE: Shrinking is not part of the build process 64 | # so this will only grow the image... 65 | 66 | # # Whiteout root 67 | # count=$(df --sync -kP / | tail -n1 | awk -F ' ' '{print $4}') 68 | # let count-- 69 | # dd if=/dev/zero of=/tmp/whitespace bs=1024 count=$count 70 | # rm /tmp/whitespace 71 | 72 | # # Whiteout /boot 73 | # count=$(df --sync -kP /boot | tail -n1 | awk -F ' ' '{print $4}') 74 | # let count-- 75 | # dd if=/dev/zero of=/boot/whitespace bs=1024 count=$count 76 | # rm /boot/whitespace 77 | 78 | # echo '==> Clear out swap and disable until reboot' 79 | # set +e 80 | # swapuuid=$(/sbin/blkid -o value -l -s UUID -t TYPE=swap) 81 | # case "$?" in 82 | # 2|0) ;; 83 | # *) exit 1 ;; 84 | # esac 85 | # set -e 86 | # if [ "x${swapuuid}" != "x" ]; then 87 | # # Whiteout the swap partition to reduce box size 88 | # # Swap is disabled till reboot 89 | # swappart=$(readlink -f /dev/disk/by-uuid/$swapuuid) 90 | # /sbin/swapoff "${swappart}" 91 | # dd if=/dev/zero of="${swappart}" bs=1M || echo "dd exit code $? is suppressed" 92 | # /sbin/mkswap -U "${swapuuid}" "${swappart}" 93 | # fi 94 | 95 | # # Zero out the free space to save space in the final image 96 | # dd if=/dev/zero of=/EMPTY bs=1M || echo "dd exit code $? is suppressed" 97 | # rm -f /EMPTY 98 | 99 | # # Make sure we wait until all the data is written to disk, otherwise 100 | # # Packer might quite too early before the large files are deleted 101 | # sync 102 | 103 | # echo "==> Disk usage before cleanup" 104 | # echo ${DISK_USAGE_BEFORE_CLEANUP} 105 | 106 | # echo "==> Disk usage after cleanup" 107 | # df -h 108 | -------------------------------------------------------------------------------- /ubuntu/ubuntu.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build ubuntu.json`", 3 | "builders": [ 4 | { 5 | "type": "qemu", 6 | "boot_command": [ 7 | "{{ user `boot_command_prefix` }}", 8 | "/install/vmlinuz noapic ", 9 | "file=/floppy/{{ user `preseed` }} ", 10 | "debian-installer={{ user `locale` }} auto locale={{ user `locale` }} kbd-chooser/method=us ", 11 | "hostname={{ user `hostname` }} ", 12 | "fb=false debconf/frontend=noninteractive ", 13 | "keyboard-configuration/modelcode=SKIP ", 14 | "keyboard-configuration/layout=USA ", 15 | "keyboard-configuration/variant=USA console-setup/ask_detect=false ", 16 | "passwd/user-fullname={{ user `ssh_fullname` }} ", 17 | "passwd/user-password={{ user `ssh_password` }} ", 18 | "passwd/user-password-again={{ user `ssh_password` }} ", 19 | "passwd/username={{ user `ssh_username` }} ", 20 | "initrd=/install/initrd.gz -- " 21 | ], 22 | "disk_size": "{{ user `disk_size` }}", 23 | "floppy_files": [ 24 | "http/{{ user `preseed` }}" 25 | ], 26 | "headless": "{{ user `headless` }}", 27 | "http_directory": "http", 28 | "iso_checksum": "{{ user `iso_checksum` }}", 29 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 30 | "iso_urls": [ 31 | "{{ user `iso_url` }}" 32 | ], 33 | "output_directory": "output-{{ user `vm_name` }}", 34 | "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now", 35 | "ssh_password": "{{ user `ssh_password` }}", 36 | "ssh_username": "{{ user `ssh_username` }}", 37 | "ssh_wait_timeout": "10000s", 38 | "vm_name": "{{ user `vm_name` }}", 39 | "qemuargs": [ 40 | [ "-m", "{{ user `memory` }}" ], 41 | [ "-display", "none" ], 42 | [ "-machine", "accel=kvm" ], 43 | [ "-cpu", "host" ], 44 | [ "-smp", "cpus={{ user `cpus`}}"] 45 | ] 46 | } 47 | ], 48 | "provisioners": [ 49 | { 50 | "environment_vars": [ 51 | "UPDATE={{user `update`}}", 52 | "INSTALL_DEV_PACKAGES={{user `install_dev_packages`}}", 53 | "INSTALL_VAGRANT_KEY={{user `install_vagrant_key`}}", 54 | "SSH_USERNAME={{user `ssh_username`}}", 55 | "SSH_PASSWORD={{user `ssh_password`}}", 56 | "http_proxy={{user `http_proxy`}}", 57 | "https_proxy={{user `https_proxy`}}", 58 | "ftp_proxy={{user `ftp_proxy`}}", 59 | "rsync_proxy={{user `rsync_proxy`}}", 60 | "no_proxy={{user `no_proxy`}}" 61 | ], 62 | "execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 63 | "scripts": [ 64 | "scripts/vagrant.sh", 65 | "scripts/sshd.sh", 66 | "scripts/update.sh", 67 | "scripts/packages.sh", 68 | "scripts/cleanup.sh" 69 | ], 70 | "type": "shell" 71 | } 72 | ], 73 | "variables": { 74 | "boot_command_prefix": "", 75 | "cleanup_pause": "", 76 | "cpus": "1", 77 | "custom_script": ".", 78 | "desktop": "false", 79 | "disk_size": "65536", 80 | "ftp_proxy": "{{env `ftp_proxy`}}", 81 | "headless": "", 82 | "http_proxy": "{{env `http_proxy`}}", 83 | "https_proxy": "{{env `https_proxy`}}", 84 | "install_vagrant_key": "true", 85 | "install_dev_packages": "false", 86 | "iso_checksum": "de5ee8665048f009577763efbf4a6f0558833e59", 87 | "iso_checksum_type": "sha1", 88 | "iso_name": "ubuntu-16.04-server-amd64.iso", 89 | "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04-server-amd64.iso", 90 | "locale": "en_US", 91 | "memory": "512", 92 | "no_proxy": "{{env `no_proxy`}}", 93 | "preseed" : "preseed.cfg", 94 | "rsync_proxy": "{{env `rsync_proxy`}}", 95 | "hostname": "vagrant", 96 | "ssh_fullname": "vagrant", 97 | "ssh_password": "vagrant", 98 | "ssh_username": "vagrant", 99 | "update": "false", 100 | "vagrantfile_template": "", 101 | "version": "0.1.0", 102 | "vm_name": "ubuntu1604" 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /debian/http/preseed.cfg: -------------------------------------------------------------------------------- 1 | #### Contents of the preconfiguration file 2 | ### Localization 3 | # Preseeding only locale sets language, country and locale. 4 | d-i debian-installer/locale string en_US 5 | 6 | # Keyboard selection. 7 | d-i keyboard-configuration/xkb-keymap select us 8 | # d-i keyboard-configuration/toggle select No toggling 9 | 10 | ### Network configuration 11 | # netcfg will choose an interface that has link if possible. This makes it 12 | # skip displaying a list if there is more than one interface. 13 | d-i netcfg/choose_interface select auto 14 | 15 | # Disable that annoying WEP key dialog. 16 | d-i netcfg/wireless_wep string 17 | 18 | ### Mirror settings 19 | # If you select ftp, the mirror/country string does not need to be set. 20 | d-i mirror/protocol string http 21 | d-i mirror/country string manual 22 | d-i mirror/http/hostname string httpredir.debian.org 23 | d-i mirror/http/directory string /debian 24 | d-i mirror/http/proxy string 25 | 26 | ### Account setup 27 | # Skip creation of a root account (normal user account will be able to 28 | # use sudo). 29 | d-i passwd/root-login boolean false 30 | 31 | ### Clock and time zone setup 32 | # Controls whether or not the hardware clock is set to UTC. 33 | d-i clock-setup/utc boolean true 34 | 35 | # You may set this to any valid setting for $TZ; see the contents of 36 | # /usr/share/zoneinfo/ for valid values. 37 | d-i time/zone string Etc/UTC 38 | 39 | # Controls whether to use NTP to set the clock during the install 40 | d-i clock-setup/ntp boolean true 41 | 42 | ### Partitioning 43 | # Alternatively, you may specify a disk to partition. If the system has only 44 | # one disk the installer will default to using that, but otherwise the device 45 | # name must be given in traditional, non-devfs format (so e.g. /dev/hda or 46 | # /dev/sda, and not e.g. /dev/discs/disc0/disc). 47 | # For example, to use the first SCSI/SATA hard disk: 48 | #d-i partman-auto/disk string /dev/sda 49 | # In addition, you'll need to specify the method to use. 50 | # The presently available methods are: 51 | # - regular: use the usual partition types for your architecture 52 | # - lvm: use LVM to partition the disk 53 | # - crypto: use LVM within an encrypted partition 54 | d-i partman-auto/method string regular 55 | 56 | # You can choose one of the three predefined partitioning recipes: 57 | # - atomic: all files in one partition 58 | # - home: separate /home partition 59 | # - multi: separate /home, /var, and /tmp partitions 60 | d-i partman-auto/choose_recipe select atomic 61 | 62 | # This makes partman automatically partition without confirmation, provided 63 | # that you told it what to do using one of the methods above. 64 | d-i partman-partitioning/confirm_write_new_label boolean true 65 | d-i partman/choose_partition select finish 66 | d-i partman/confirm boolean true 67 | d-i partman/confirm_nooverwrite boolean true 68 | 69 | ### Package selection 70 | tasksel tasksel/first multiselect standard, ssh-server 71 | 72 | # Individual additional packages to install 73 | #d-i pkgsel/include string openssh-sever build-essential 74 | # Whether to upgrade packages after debootstrap. 75 | # Allowed values: none, safe-upgrade, full-upgrade 76 | d-i pkgsel/upgrade select full-upgrade 77 | 78 | # Some versions of the installer can report back on what software you have 79 | # installed, and what software you use. The default is not to report back, 80 | # but sending reports helps the project determine what software is most 81 | # popular and include it on CDs. 82 | popularity-contest popularity-contest/participate boolean false 83 | 84 | ### Boot loader installation 85 | # This is fairly safe to set, it makes grub install automatically to the MBR 86 | # if no other operating system is detected on the machine. 87 | d-i grub-installer/only_debian boolean true 88 | 89 | # This one makes grub-installer install to the MBR if it also finds some other 90 | # OS, which is less safe as it might not be able to boot that other OS. 91 | d-i grub-installer/with_other_os boolean true 92 | 93 | # Due notably to potential USB sticks, the location of the MBR can not be 94 | # determined safely in general, so this needs to be specified: 95 | #d-i grub-installer/bootdev string /dev/sda 96 | # To install to the first device (assuming it is not a USB stick): 97 | d-i grub-installer/bootdev string default 98 | 99 | ### Disable rdnssd if installed without resolvconf 100 | d-i preseed/late_command string \ 101 | if [ -x "/target/sbin/rdnssd" -a ! -x "/target/sbin/resolvconf" ] ; then \ 102 | in-target systemctl disable rdnssd.service ; \ 103 | fi 104 | 105 | ### Finishing up the installation 106 | # Avoid that last message about the install being complete. 107 | d-i finish-install/reboot_in_progress note 108 | -------------------------------------------------------------------------------- /ubuntu/ubuntu-vagrant.json: -------------------------------------------------------------------------------- 1 | { 2 | "_comment": "Build with `packer build ubuntu.json`", 3 | "builders": [ 4 | { 5 | "type": "qemu", 6 | "boot_command": [ 7 | "{{ user `boot_command_prefix` }}", 8 | "/install/vmlinuz noapic ", 9 | "file=/floppy/{{ user `preseed` }} ", 10 | "debian-installer={{ user `locale` }} auto locale={{ user `locale` }} kbd-chooser/method=us ", 11 | "hostname={{ user `hostname` }} ", 12 | "fb=false debconf/frontend=noninteractive ", 13 | "keyboard-configuration/modelcode=SKIP ", 14 | "keyboard-configuration/layout=USA ", 15 | "keyboard-configuration/variant=USA console-setup/ask_detect=false ", 16 | "passwd/user-fullname={{ user `ssh_fullname` }} ", 17 | "passwd/user-password={{ user `ssh_password` }} ", 18 | "passwd/user-password-again={{ user `ssh_password` }} ", 19 | "passwd/username={{ user `ssh_username` }} ", 20 | "initrd=/install/initrd.gz -- " 21 | ], 22 | "disk_size": "{{ user `disk_size` }}", 23 | "floppy_files": [ 24 | "http/{{ user `preseed` }}" 25 | ], 26 | "headless": "{{ user `headless` }}", 27 | "http_directory": "http", 28 | "iso_checksum": "{{ user `iso_checksum` }}", 29 | "iso_checksum_type": "{{ user `iso_checksum_type` }}", 30 | "iso_urls": [ 31 | "{{ user `iso_url` }}" 32 | ], 33 | "output_directory": "output-{{ user `vm_name` }}", 34 | "shutdown_command": "echo '{{ user `ssh_password` }}'|sudo -S shutdown -P now", 35 | "ssh_password": "{{ user `ssh_password` }}", 36 | "ssh_username": "{{ user `ssh_username` }}", 37 | "ssh_wait_timeout": "10000s", 38 | "vm_name": "{{ user `vm_name` }}", 39 | "qemuargs": [ 40 | [ "-m", "{{ user `memory` }}" ], 41 | [ "-display", "none" ], 42 | [ "-machine", "accel=kvm" ], 43 | [ "-cpu", "host" ], 44 | [ "-smp", "cpus={{ user `cpus`}}"] 45 | ] 46 | } 47 | ], 48 | "post-processors": [ 49 | { 50 | "keep_input_artifact": false, 51 | "output": "box/{{.Provider}}/{{user `vm_name`}}-{{user `version`}}.box", 52 | "type": "vagrant", 53 | "vagrantfile_template": "{{ user `vagrantfile_template` }}" 54 | } 55 | ], 56 | "provisioners": [ 57 | { 58 | "environment_vars": [ 59 | "UPDATE={{user `update`}}", 60 | "INSTALL_DEV_PACKAGES={{user `install_dev_packages`}}", 61 | "INSTALL_VAGRANT_KEY={{user `install_vagrant_key`}}", 62 | "SSH_USERNAME={{user `ssh_username`}}", 63 | "SSH_PASSWORD={{user `ssh_password`}}", 64 | "http_proxy={{user `http_proxy`}}", 65 | "https_proxy={{user `https_proxy`}}", 66 | "ftp_proxy={{user `ftp_proxy`}}", 67 | "rsync_proxy={{user `rsync_proxy`}}", 68 | "no_proxy={{user `no_proxy`}}" 69 | ], 70 | "execute_command": "echo '{{ user `ssh_password` }}' | {{.Vars}} sudo -E -S bash '{{.Path}}'", 71 | "scripts": [ 72 | "scripts/vagrant.sh", 73 | "scripts/sshd.sh", 74 | "scripts/update.sh", 75 | "scripts/packages.sh", 76 | "scripts/cleanup.sh" 77 | ], 78 | "type": "shell" 79 | } 80 | ], 81 | "variables": { 82 | "boot_command_prefix": "", 83 | "cleanup_pause": "", 84 | "cpus": "1", 85 | "custom_script": ".", 86 | "desktop": "false", 87 | "disk_size": "65536", 88 | "ftp_proxy": "{{env `ftp_proxy`}}", 89 | "headless": "", 90 | "http_proxy": "{{env `http_proxy`}}", 91 | "https_proxy": "{{env `https_proxy`}}", 92 | "install_vagrant_key": "true", 93 | "install_dev_packages": "false", 94 | "iso_checksum": "de5ee8665048f009577763efbf4a6f0558833e59", 95 | "iso_checksum_type": "sha1", 96 | "iso_name": "ubuntu-16.04-server-amd64.iso", 97 | "iso_url": "http://releases.ubuntu.com/16.04/ubuntu-16.04-server-amd64.iso", 98 | "locale": "en_US", 99 | "memory": "512", 100 | "no_proxy": "{{env `no_proxy`}}", 101 | "preseed" : "preseed.cfg", 102 | "rsync_proxy": "{{env `rsync_proxy`}}", 103 | "hostname": "vagrant", 104 | "ssh_fullname": "vagrant", 105 | "ssh_password": "vagrant", 106 | "ssh_username": "vagrant", 107 | "update": "false", 108 | "vagrantfile_template": "", 109 | "version": "0.1.0", 110 | "vm_name": "ubuntu1604" 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /windows/floppy/common/install-winrm.cmd: -------------------------------------------------------------------------------- 1 | @setlocal EnableDelayedExpansion EnableExtensions 2 | @for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i" 3 | @if defined PACKER_DEBUG (@echo on) else (@echo off) 4 | 5 | @echo on 6 | 7 | title Enabling Windows Remote Management. Please wait... 8 | 9 | echo ==^> Turning off User Account Control (UAC) 10 | :: see http://www.howtogeek.com/howto/windows-vista/enable-or-disable-uac-from-the-windows-vista-command-line/ 11 | reg ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f 12 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: reg ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f 13 | 14 | title Enabling Windows Remote Management. Please wait... 15 | 16 | echo ==^> Setting the PowerShell ExecutionPolicy to RemoteSigned (64 bit) 17 | powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force" WARNING: Error %ERRORLEVEL% was returned by: powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force" 19 | 20 | if exist %SystemRoot%\SysWOW64\cmd.exe ( 21 | echo ==^> Setting the PowerShell ExecutionPolicy to RemoteSigned (32 bit) 22 | %SystemRoot%\SysWOW64\cmd.exe /c powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force" WARNING: Error %ERRORLEVEL% was returned by: powershell -Command "Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force" nul 27 | if errorlevel 1 goto skip_fixnetwork 28 | 29 | if not exist %~dp0fixnetwork.ps1 echo ==^> ERROR: File not found: %~dp0fixnetwork.ps1 30 | 31 | echo ==^> Setting the Network Location to private 32 | :: see http://blogs.msdn.com/b/powershell/archive/2009/04/03/setting-network-location-to-private.aspx 33 | powershell -File %~dp0fixnetwork.ps1 WARNING: Error %ERRORLEVEL% was returned by: powershell -File %~dp0fixnetwork.ps1 35 | 36 | :skip_fixnetwork 37 | 38 | echo ==^> Changing remote UAC account policy 39 | reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f 40 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f 41 | 42 | echo ==^> Blocking WinRM port 5985 on the firewall 43 | netsh advfirewall firewall add rule name="winrm" dir=in action=block protocol=TCP localport=5985 44 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: netsh advfirewall firewall add rule name="winrm" dir=in action=block protocol=TCP localport=5985 45 | 46 | echo ==^> Configuring Windows Remote Management (WinRM) service 47 | 48 | call winrm quickconfig -q 49 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm quickconfig -q 50 | 51 | call winrm quickconfig -transport:http 52 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm quickconfig -transport:http 53 | 54 | call winrm set winrm/config @{MaxTimeoutms="1800000"} 55 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm set winrm/config @{MaxTimeoutms="1800000"} 56 | 57 | call winrm set winrm/config/winrs @{MaxMemoryPerShellMB="800"} 58 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm set winrm/config/winrs @{MaxMemoryPerShellMB="800"} 59 | 60 | call winrm set winrm/config/service @{AllowUnencrypted="true"} 61 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm set winrm/config/service @{AllowUnencrypted="true"} 62 | 63 | call winrm set winrm/config/service/auth @{Basic="true"} 64 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm set winrm/config/service/auth @{Basic="true"} 65 | 66 | call winrm set winrm/config/client/auth @{Basic="true"} 67 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm set winrm/config/client/auth @{Basic="true"} 68 | 69 | call winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"} 70 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: winrm set winrm/config/listener?Address=*+Transport=HTTP @{Port="5985"} 71 | 72 | sc config winrm start= disabled 73 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: sc config winrm start= disabled 74 | 75 | :: wait for winrm service to finish starting 76 | timeout 5 77 | 78 | sc query winrm | findstr "RUNNING" >nul 79 | if errorlevel 1 goto winrm_not_running 80 | 81 | echo ==^> Stopping winrm service 82 | 83 | sc stop winrm 84 | 85 | :is_winrm_running 86 | 87 | timeout 1 88 | 89 | sc query winrm | findstr "STOPPED" >nul 90 | if errorlevel 1 goto is_winrm_running 91 | 92 | :winrm_not_running 93 | 94 | echo ==^> Unblocking WinRM port 5985 on the firewall 95 | netsh advfirewall firewall delete rule name="winrm" 96 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: netsh advfirewall firewall delete rule name="winrm" 97 | 98 | netsh advfirewall firewall set rule group="remote administration" new enable=yes 99 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: netsh advfirewall firewall set rule group="remote administration" new enable=yes 100 | 101 | echo ==^> Opening WinRM port 5985 on the firewall 102 | :: see http://social.technet.microsoft.com/Forums/windowsserver/en-US/a1e65f0f-2550-49ae-aee2-56a9bdcfb8fb/windows-7-remote-administration-firewall-group?forum=winserverManagement 103 | netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes 104 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes 105 | 106 | netsh advfirewall firewall add rule name="winrm" dir=in action=allow protocol=TCP localport=5985 107 | @if errorlevel 1 echo ==^> WARNING: Error %ERRORLEVEL% was returned by: netsh advfirewall firewall add rule name="winrm" dir=in action=allow protocol=TCP localport=5985 108 | 109 | :exit0 110 | 111 | ver>nul 112 | 113 | goto :exit 114 | 115 | :exit1 116 | 117 | verify other 2>nul 118 | 119 | :exit 120 | -------------------------------------------------------------------------------- /windows/floppy/windows-2016-standard/Autounattend.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A:\ 10 | 11 | 12 | 13 | 14 | 15 | 16 | en-US 17 | 18 | en-US 19 | en-US 20 | en-US 21 | en-US 22 | en-US 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | Primary 31 | 1 32 | 350 33 | 34 | 35 | 2 36 | Primary 37 | true 38 | 39 | 40 | 41 | 42 | true 43 | NTFS 44 | 45 | 1 46 | 1 47 | 48 | 49 | NTFS 50 | 51 | C 52 | 2 53 | 2 54 | 55 | 56 | 0 57 | true 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | /IMAGE/NAME 66 | Windows Server 2016 SERVERSTANDARD 67 | 68 | 69 | 70 | 0 71 | 2 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | OnError 83 | 84 | true 85 | Vagrant 86 | Vagrant 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | false 95 | 96 | windows-2016 97 | Central Europe Standard Time 98 | 99 | 100 | 101 | 102 | 103 | true 104 | 105 | 106 | 107 | 108 | false 109 | false 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 119 | 120 | 121 | vagrant 122 | true</PlainText> 123 | </Password> 124 | <Enabled>true</Enabled> 125 | <Username>vagrant</Username> 126 | </AutoLogon> 127 | 128 | <FirstLogonCommands> 129 | 130 | <SynchronousCommand wcm:action="add"> 131 | <CommandLine>cmd /c a:\configure.bat</CommandLine> 132 | <Description>Run configure script</Description> 133 | <Order>1</Order> 134 | </SynchronousCommand> 135 | 136 | </FirstLogonCommands> 137 | 138 | <OOBE> 139 | <HideEULAPage>true</HideEULAPage> 140 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 141 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 142 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 143 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 144 | <NetworkLocation>Home</NetworkLocation> 145 | <ProtectYourPC>1</ProtectYourPC> 146 | </OOBE> 147 | 148 | <UserAccounts> 149 | 150 | <AdministratorPassword> 151 | <Value>vagrant</Value> 152 | <PlainText>true</PlainText> 153 | </AdministratorPassword> 154 | 155 | <LocalAccounts> 156 | <LocalAccount wcm:action="add"> 157 | <Password> 158 | <Value>vagrant</Value> 159 | <PlainText>true</PlainText> 160 | </Password> 161 | <Group>administrators</Group> 162 | <DisplayName>Vagrant</DisplayName> 163 | <Name>vagrant</Name> 164 | <Description>Vagrant User</Description> 165 | </LocalAccount> 166 | </LocalAccounts> 167 | </UserAccounts> 168 | 169 | <RegisteredOwner/> 170 | 171 | </component> 172 | </settings> 173 | 174 | <settings pass="offlineServicing"> 175 | 176 | <!-- disable notifications when programs try to make changes to the computer. --> 177 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 178 | <EnableLUA>false</EnableLUA> 179 | </component> 180 | </settings> 181 | 182 | <cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/wim/install.wim#Windows Server 2012 R2 SERVERSTANDARD"/> 183 | 184 | </unattend> 185 | -------------------------------------------------------------------------------- /windows/floppy/windows-2012-R2-standard/Autounattend.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <unattend xmlns="urn:schemas-microsoft-com:unattend"> 3 | <settings pass="windowsPE"> 4 | 5 | <!-- look for drivers on floppy --> 6 | <component name="Microsoft-Windows-PnpCustomizationsWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 7 | <DriverPaths> 8 | <PathAndCredentials wcm:keyValue="1" wcm:action="add"> 9 | <Path>A:\</Path> 10 | </PathAndCredentials> 11 | </DriverPaths> 12 | </component> 13 | 14 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 15 | <SetupUILanguage> 16 | <UILanguage>en-US</UILanguage> 17 | </SetupUILanguage> 18 | <InputLocale>en-US</InputLocale> 19 | <SystemLocale>en-US</SystemLocale> 20 | <UILanguage>en-US</UILanguage> 21 | <UILanguageFallback>en-US</UILanguageFallback> 22 | <UserLocale>en-US</UserLocale> 23 | </component> 24 | 25 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 26 | <DiskConfiguration> 27 | <Disk wcm:action="add"> 28 | <CreatePartitions> 29 | <CreatePartition wcm:action="add"> 30 | <Type>Primary</Type> 31 | <Order>1</Order> 32 | <Size>350</Size> 33 | </CreatePartition> 34 | <CreatePartition wcm:action="add"> 35 | <Order>2</Order> 36 | <Type>Primary</Type> 37 | <Extend>true</Extend> 38 | </CreatePartition> 39 | </CreatePartitions> 40 | <ModifyPartitions> 41 | <ModifyPartition wcm:action="add"> 42 | <Active>true</Active> 43 | <Format>NTFS</Format> 44 | <Label>boot</Label> 45 | <Order>1</Order> 46 | <PartitionID>1</PartitionID> 47 | </ModifyPartition> 48 | <ModifyPartition wcm:action="add"> 49 | <Format>NTFS</Format> 50 | <Label>Windows 2012 R2</Label> 51 | <Letter>C</Letter> 52 | <Order>2</Order> 53 | <PartitionID>2</PartitionID> 54 | </ModifyPartition> 55 | </ModifyPartitions> 56 | <DiskID>0</DiskID> 57 | <WillWipeDisk>true</WillWipeDisk> 58 | </Disk> 59 | </DiskConfiguration> 60 | 61 | <ImageInstall> 62 | <OSImage> 63 | <InstallFrom> 64 | <MetaData wcm:action="add"> 65 | <Key>/IMAGE/NAME </Key> 66 | <Value>Windows Server 2012 R2 SERVERSTANDARD</Value> 67 | </MetaData> 68 | </InstallFrom> 69 | <InstallTo> 70 | <DiskID>0</DiskID> 71 | <PartitionID>2</PartitionID> 72 | </InstallTo> 73 | </OSImage> 74 | </ImageInstall> 75 | 76 | <UserData> 77 | <!-- Product Key from http://technet.microsoft.com/en-us/library/jj612867.aspx --> 78 | <ProductKey> 79 | <!-- Do not uncomment the Key element if you are using trial ISOs --> 80 | <!-- You must uncomment the Key element (and optionally insert your own key) if you are using retail or volume license ISOs --> 81 | <!-- <Key></Key> --> 82 | <WillShowUI>OnError</WillShowUI> 83 | </ProductKey> 84 | <AcceptEula>true</AcceptEula> 85 | <FullName>Vagrant</FullName> 86 | <Organization>Vagrant</Organization> 87 | </UserData> 88 | </component> 89 | </settings> 90 | <settings pass="specialize"> 91 | 92 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 93 | <OEMInformation> 94 | <HelpCustomized>false</HelpCustomized> 95 | </OEMInformation> 96 | <ComputerName>windows-2012-r2</ComputerName> 97 | <TimeZone>Central Europe Standard Time</TimeZone> 98 | <RegisteredOwner/> 99 | </component> 100 | 101 | <!-- disable server manager auto-start --> 102 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-ServerManager-SvrMgrNc" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 103 | <DoNotOpenServerManagerAtLogon>true</DoNotOpenServerManagerAtLogon> 104 | </component> 105 | 106 | <!-- disable annoying IE security --> 107 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-IE-ESC" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 108 | <IEHardenAdmin>false</IEHardenAdmin> 109 | <IEHardenUser>false</IEHardenUser> 110 | </component> 111 | 112 | </settings> 113 | 114 | <settings pass="oobeSystem"> 115 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 116 | 117 | <!-- logon this user automatically 118 | which runs first logon commands --> 119 | <AutoLogon> 120 | <Password> 121 | <Value>vagrant</Value> 122 | <PlainText>true</PlainText> 123 | </Password> 124 | <Enabled>true</Enabled> 125 | <Username>vagrant</Username> 126 | </AutoLogon> 127 | 128 | <FirstLogonCommands> 129 | 130 | <SynchronousCommand wcm:action="add"> 131 | <CommandLine>cmd /c a:\configure.bat</CommandLine> 132 | <Description>Run configure script</Description> 133 | <Order>1</Order> 134 | </SynchronousCommand> 135 | 136 | </FirstLogonCommands> 137 | 138 | <OOBE> 139 | <HideEULAPage>true</HideEULAPage> 140 | <HideLocalAccountScreen>true</HideLocalAccountScreen> 141 | <HideOEMRegistrationScreen>true</HideOEMRegistrationScreen> 142 | <HideOnlineAccountScreens>true</HideOnlineAccountScreens> 143 | <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 144 | <NetworkLocation>Home</NetworkLocation> 145 | <ProtectYourPC>1</ProtectYourPC> 146 | </OOBE> 147 | 148 | <UserAccounts> 149 | 150 | <AdministratorPassword> 151 | <Value>vagrant</Value> 152 | <PlainText>true</PlainText> 153 | </AdministratorPassword> 154 | 155 | <LocalAccounts> 156 | <LocalAccount wcm:action="add"> 157 | <Password> 158 | <Value>vagrant</Value> 159 | <PlainText>true</PlainText> 160 | </Password> 161 | <Group>administrators</Group> 162 | <DisplayName>Vagrant</DisplayName> 163 | <Name>vagrant</Name> 164 | <Description>Vagrant User</Description> 165 | </LocalAccount> 166 | </LocalAccounts> 167 | </UserAccounts> 168 | 169 | <RegisteredOwner/> 170 | 171 | </component> 172 | </settings> 173 | 174 | <settings pass="offlineServicing"> 175 | 176 | <!-- disable notifications when programs try to make changes to the computer. --> 177 | <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS"> 178 | <EnableLUA>false</EnableLUA> 179 | </component> 180 | </settings> 181 | 182 | <cpi:offlineImage xmlns:cpi="urn:schemas-microsoft-com:cpi" cpi:source="wim:c:/wim/install.wim#Windows Server 2012 R2 SERVERSTANDARD"/> 183 | 184 | </unattend> 185 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.117/NetKVM/2k12R2/amd64/netkvm.inf: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------- 2 | ; netkvm.INF 3 | ; 4 | ; Red Hat VirtIO Ethernet Adapter 5 | ; 6 | ; Copyright (c) 2008-2016 Red Hat, Inc. All rights reserved. 7 | ; 8 | ;------------------------------------------------------------------------------- 9 | 10 | [version] 11 | Signature = "$Windows NT$" 12 | Class = Net 13 | CatalogFile = netkvm.cat 14 | ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} 15 | Provider = %RedHat% 16 | DriverVer=04/08/2016,62.73.104.11700 17 | DriverPackageType = PlugAndPlay 18 | DriverPackageDisplayName = %kvmnet6.DeviceDesc% 19 | 20 | [Manufacturer] 21 | %RedHat% = RedHat, NTamd64 22 | 23 | [RedHat.NTamd64] 24 | %kvmnet6.DeviceDesc% = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1000&SUBSYS_00011AF4&REV_00 25 | 26 | [kvmnet6.ndi.hw] 27 | AddReg = kvmnet6.EnableMSI 28 | 29 | [kvmnet6.EnableMSI] 30 | ;HKR, "Interrupt Management",, 0x00000010 31 | ;HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 32 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1 33 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 2048 34 | ;HKR, "Interrupt Management\Affinity Policy",, 0x00000010 35 | HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 0 36 | HKR, "Interrupt Management\Affinity Policy", DevicePriority, 0x00010001, 2 37 | 38 | [kvmnet6.ndi] 39 | Characteristics = 0x84 ; NCF_PHYSICAL | NCF_HAS_UI 40 | BusType = 5 ; PCI 41 | AddReg = kvmnet6.Reg, Parameters 42 | CopyFiles = kvmnet6.CopyFiles 43 | *IfType = 6 44 | *MediaType = 0 ; NdisMedium802_3 45 | *PhysicalMediaType = 0 ; NdisPhysicalMediumUnspecified 46 | 47 | [kvmnet6.ndi.Services] 48 | AddService = netkvm, 2, kvmnet6.Service, kvmnet6.EventLog 49 | 50 | ;----------------------------------------------------------------------------- 51 | ; Red Hat ParaVirtualized Miniport Common 52 | ;----------------------------------------------------------------------------- 53 | 54 | [kvmnet6.Reg] 55 | HKR, , BusNumber, 0, "0" 56 | HKR, Ndi, Service, 0, "netkvm" 57 | HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" 58 | HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" 59 | 60 | HKR, Ndi\params\*RSS, ParamDesc, 0, "Receive Side Scaling" 61 | HKR, Ndi\params\*RSS, Type, 0, "enum" 62 | HKR, Ndi\params\*RSS, Default, 0, "1" 63 | HKR, Ndi\params\*RSS, Optional, 0, "0" 64 | HKR, Ndi\params\*RSS\enum, "0", 0, "Disabled" 65 | HKR, Ndi\params\*RSS\enum, "1", 0, "Enabled" 66 | 67 | HKR, Ndi\params\*NumRssQueues, ParamDesc, 0, "Maximum Number of RSS Queues" 68 | HKR, Ndi\params\*NumRssQueues, type, 0, "int" 69 | HKR, Ndi\params\*NumRssQueues, default, 0, "8" 70 | HKR, Ndi\params\*NumRssQueues, min, 0, "1" 71 | HKR, Ndi\params\*NumRssQueues, max, 0, "16" 72 | HKR, Ndi\params\*NumRssQueues, step, 0, "1" 73 | 74 | [Parameters] 75 | 76 | HKR, Ndi\Params\ConnectRate, ParamDesc, 0, %ConnectRate% 77 | HKR, Ndi\Params\ConnectRate, Default, 0, "10000" 78 | HKR, Ndi\Params\ConnectRate, type, 0, "enum" 79 | HKR, Ndi\Params\ConnectRate\enum, "10", 0, %10M% 80 | HKR, Ndi\Params\ConnectRate\enum, "100", 0, %100M% 81 | HKR, Ndi\Params\ConnectRate\enum, "1000", 0, %1G% 82 | HKR, Ndi\Params\ConnectRate\enum, "10000", 0, %10G% 83 | 84 | HKR, Ndi\Params\Priority, ParamDesc, 0, %Priority% 85 | HKR, Ndi\Params\Priority, Default, 0, "1" 86 | HKR, Ndi\Params\Priority, type, 0, "enum" 87 | HKR, Ndi\Params\Priority\enum, "1", 0, %Enable% 88 | HKR, Ndi\Params\Priority\enum, "0", 0, %Disable% 89 | 90 | HKR, Ndi\Params\*PriorityVLANTag, ParamDesc, 0, %PriorityVlanTag% 91 | HKR, Ndi\Params\*PriorityVLANTag, Default, 0, "3" 92 | HKR, Ndi\Params\*PriorityVLANTag, type, 0, "enum" 93 | HKR, Ndi\Params\*PriorityVLANTag\enum, "3", 0, %Priority_Vlan% 94 | HKR, Ndi\Params\*PriorityVLANTag\enum, "2", 0, %VLan% 95 | HKR, Ndi\Params\*PriorityVLANTag\enum, "1", 0, %PriorityOnly% 96 | HKR, Ndi\Params\*PriorityVLANTag\enum, "0", 0, %Disable% 97 | 98 | HKR, Ndi\Params\DoLog, ParamDesc, 0, %EnableLogging% 99 | HKR, Ndi\Params\DoLog, Default, 0, "1" 100 | HKR, Ndi\Params\DoLog, type, 0, "enum" 101 | HKR, Ndi\Params\DoLog\enum, "1", 0, %Enable% 102 | HKR, Ndi\Params\DoLog\enum, "0", 0, %Disable% 103 | 104 | HKR, Ndi\params\DebugLevel, ParamDesc, 0, %DebugLevel% 105 | HKR, Ndi\params\DebugLevel, type, 0, "int" 106 | HKR, Ndi\params\DebugLevel, default, 0, "0" 107 | HKR, Ndi\params\DebugLevel, min, 0, "0" 108 | HKR, Ndi\params\DebugLevel, max, 0, "8" 109 | HKR, Ndi\params\DebugLevel, step, 0, "1" 110 | 111 | HKR, Ndi\params\MTU, ParamDesc, 0, %MTU% 112 | HKR, Ndi\params\MTU, type, 0, "long" 113 | HKR, Ndi\params\MTU, default, 0, "1500" 114 | HKR, Ndi\params\MTU, min, 0, "576" 115 | HKR, Ndi\params\MTU, max, 0, "65500" 116 | HKR, Ndi\params\MTU, step, 0, "1" 117 | 118 | HKR, Ndi\params\TxCapacity, ParamDesc, 0, %TxCapacity% 119 | HKR, Ndi\params\TxCapacity, type, 0, "enum" 120 | HKR, Ndi\params\TxCapacity, default, 0, "1024" 121 | HKR, Ndi\Params\TxCapacity\enum, "16", 0, %String_16% 122 | HKR, Ndi\Params\TxCapacity\enum, "32", 0, %String_32% 123 | HKR, Ndi\Params\TxCapacity\enum, "64", 0, %String_64% 124 | HKR, Ndi\Params\TxCapacity\enum, "128", 0, %String_128% 125 | HKR, Ndi\Params\TxCapacity\enum, "256", 0, %String_256% 126 | HKR, Ndi\Params\TxCapacity\enum, "512", 0, %String_512% 127 | HKR, Ndi\Params\TxCapacity\enum, "1024", 0, %String_1024% 128 | 129 | HKR, Ndi\params\RxCapacity, ParamDesc, 0, %RxCapacity% 130 | HKR, Ndi\params\RxCapacity, type, 0, "enum" 131 | HKR, Ndi\params\RxCapacity, default, 0, "256" 132 | HKR, Ndi\Params\RxCapacity\enum, "16", 0, %String_16% 133 | HKR, Ndi\Params\RxCapacity\enum, "32", 0, %String_32% 134 | HKR, Ndi\Params\RxCapacity\enum, "64", 0, %String_64% 135 | HKR, Ndi\Params\RxCapacity\enum, "128", 0, %String_128% 136 | HKR, Ndi\Params\RxCapacity\enum, "256", 0, %String_256% 137 | HKR, Ndi\Params\RxCapacity\enum, "512", 0, %String_512% 138 | HKR, Ndi\Params\RxCapacity\enum, "1024", 0, %String_1024% 139 | 140 | HKR, Ndi\params\NetworkAddress, ParamDesc, 0, %NetworkAddress% 141 | HKR, Ndi\params\NetworkAddress, type, 0, "edit" 142 | HKR, Ndi\params\NetworkAddress, Optional, 0, "1" 143 | 144 | HKR, Ndi\Params\OffLoad.TxChecksum, ParamDesc, 0, %OffLoad.TxChecksum% 145 | HKR, Ndi\Params\OffLoad.TxChecksum, Default, 0, "31" 146 | HKR, Ndi\Params\OffLoad.TxChecksum, type, 0, "enum" 147 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "31", 0, %All% 148 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "27", 0, %TCPUDPAll% 149 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "3", 0, %TCPUDPv4% 150 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "1", 0, %TCPv4% 151 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "0", 0, %Disable% 152 | 153 | HKR, Ndi\Params\OffLoad.TxLSO, ParamDesc, 0, %OffLoad.TxLSO% 154 | HKR, Ndi\Params\OffLoad.TxLSO, Default, 0, "2" 155 | HKR, Ndi\Params\OffLoad.TxLSO, type, 0, "enum" 156 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "2", 0, %Maximal% 157 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "1", 0, %IPv4% 158 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "0", 0, %Disable% 159 | 160 | HKR, Ndi\Params\OffLoad.RxCS, ParamDesc, 0, %OffLoad.RxCS% 161 | HKR, Ndi\Params\OffLoad.RxCS, Default, 0, "31" 162 | HKR, Ndi\Params\OffLoad.RxCS, type, 0, "enum" 163 | HKR, Ndi\Params\OffLoad.RxCS\enum, "31", 0, %All% 164 | HKR, Ndi\Params\OffLoad.RxCS\enum, "27", 0, %TCPUDPAll% 165 | HKR, Ndi\Params\OffLoad.RxCS\enum, "3", 0, %TCPUDPv4% 166 | HKR, Ndi\Params\OffLoad.RxCS\enum, "1", 0, %TCPv4% 167 | HKR, Ndi\Params\OffLoad.RxCS\enum, "0", 0, %Disable% 168 | 169 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, ParamDesc, 0, %Std.IPChecksumOffloadv4% 170 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, Default, 0, "3" 171 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, type, 0, "enum" 172 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 173 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "2", 0, %Rx% 174 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "1", 0, %Tx% 175 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "0", 0, %Disable% 176 | 177 | HKR, Ndi\Params\*LsoV2IPv4, ParamDesc, 0, %Std.LsoV2IPv4% 178 | HKR, Ndi\Params\*LsoV2IPv4, Default, 0, "1" 179 | HKR, Ndi\Params\*LsoV2IPv4, type, 0, "enum" 180 | HKR, Ndi\Params\*LsoV2IPv4\enum, "1", 0, %Enable% 181 | HKR, Ndi\Params\*LsoV2IPv4\enum, "0", 0, %Disable% 182 | 183 | HKR, Ndi\Params\*LsoV2IPv6, ParamDesc, 0, %Std.LsoV2IPv6% 184 | HKR, Ndi\Params\*LsoV2IPv6, Default, 0, "1" 185 | HKR, Ndi\Params\*LsoV2IPv6, type, 0, "enum" 186 | HKR, Ndi\Params\*LsoV2IPv6\enum, "1", 0, %Enable% 187 | HKR, Ndi\Params\*LsoV2IPv6\enum, "0", 0, %Disable% 188 | 189 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, ParamDesc, 0, %Std.UDPChecksumOffloadIPv4% 190 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, Default, 0, "3" 191 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, type, 0, "enum" 192 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 193 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "2", 0, %Rx% 194 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "1", 0, %Tx% 195 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "0", 0, %Disable% 196 | 197 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, ParamDesc, 0, %Std.TCPChecksumOffloadIPv4% 198 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, Default, 0, "3" 199 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, type, 0, "enum" 200 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 201 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "2", 0, %Rx% 202 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "1", 0, %Tx% 203 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "0", 0, %Disable% 204 | 205 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, ParamDesc, 0, %Std.TCPChecksumOffloadIPv6% 206 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, Default, 0, "3" 207 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, type, 0, "enum" 208 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "3", 0, %TxRx% 209 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "2", 0, %Rx% 210 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "1", 0, %Tx% 211 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "0", 0, %Disable% 212 | 213 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, ParamDesc, 0, %Std.UDPChecksumOffloadIPv6% 214 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, Default, 0, "3" 215 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, type, 0, "enum" 216 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "3", 0, %TxRx% 217 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "2", 0, %Rx% 218 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "1", 0, %Tx% 219 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "0", 0, %Disable% 220 | 221 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, ParamDesc, 0, %NumberOfHandledRXPackersInDPC% 222 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, type, 0, "long" 223 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, default, 0, "1000" 224 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, min, 0, "1" 225 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, max, 0, "10000" 226 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, step, 0, "1" 227 | 228 | [kvmnet6.CopyFiles] 229 | netkvm.sys,,,2 230 | 231 | [kvmnet6.Service] 232 | DisplayName = %kvmnet6.Service.DispName% 233 | ServiceType = 1 ;%SERVICE_KERNEL_DRIVER% 234 | StartType = 3 ;%SERVICE_DEMAND_START% 235 | ErrorControl = 1 ;%SERVICE_ERROR_NORMAL% 236 | ServiceBinary = %12%\netkvm.sys 237 | LoadOrderGroup = NDIS 238 | AddReg = TextModeFlags.Reg 239 | 240 | [kvmnet6.EventLog] 241 | AddReg = kvmnet6.AddEventLog.Reg 242 | 243 | [kvmnet6.AddEventLog.Reg] 244 | HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll" 245 | HKR, , TypesSupported, 0x00010001, 7 246 | 247 | [TextModeFlags.Reg] 248 | HKR,,TextModeFlags,0x00010001, 0x0001 249 | HKR,Parameters,DisableMSI,,"0" 250 | HKR,Parameters,EarlyDebug,,"3" 251 | 252 | [SourceDisksNames] 253 | 1 = %DiskId1%,,,"" 254 | 255 | [SourceDisksFiles] 256 | netkvm.sys = 1,, 257 | 258 | [DestinationDirs] 259 | kvmnet6.CopyFiles = 12 260 | 261 | [Strings] 262 | RedHat = "Red Hat, Inc." 263 | kvmnet6.DeviceDesc = "Red Hat VirtIO Ethernet Adapter" 264 | kvmnet6.Service.DispName = "Red Hat VirtIO Ethernet Adapter Service" 265 | DiskId1 = "Red Hat VirtIO Ethernet Adapter Driver Disk #1" 266 | NetworkAddress = "Assign MAC" 267 | ConnectRate = "Init.ConnectionRate(Mb)" 268 | Priority = "Init.Do802.1PQ" 269 | MTU = "Init.MTUSize" 270 | TxCapacity = "Init.MaxTxBuffers" 271 | RxCapacity = "Init.MaxRxBuffers" 272 | Offload.TxChecksum = "Offload.Tx.Checksum" 273 | Offload.TxLSO = "Offload.Tx.LSO" 274 | Offload.RxCS = "Offload.Rx.Checksum" 275 | EnableLogging = "Logging.Enable" 276 | DebugLevel = "Logging.Level" 277 | Tx = "Tx Enabled"; 278 | Rx = "Rx Enabled"; 279 | TxRx = "Rx & Tx Enabled"; 280 | NumberOfHandledRXPackersInDPC = "TestOnly.RXThrottle" 281 | Std.LsoV2IPv4 = "Large Send Offload V2 (IPv4)" 282 | Std.LsoV2IPv6 = "Large Send Offload V2 (IPv6)" 283 | Std.UDPChecksumOffloadIPv4 = "UDP Checksum Offload (IPv4)" 284 | Std.TCPChecksumOffloadIPv4 = "TCP Checksum Offload (IPv4)" 285 | Std.UDPChecksumOffloadIPv6 = "UDP Checksum Offload (IPv6)" 286 | Std.TCPChecksumOffloadIPv6 = "TCP Checksum Offload (IPv6)" 287 | Std.IPChecksumOffloadv4 = "IPv4 Checksum Offload" 288 | Disable = "Disabled" 289 | Enable = "Enabled" 290 | Enable* = "Enabled*" 291 | String_16 = "16" 292 | String_32 = "32" 293 | String_64 = "64" 294 | String_128 = "128" 295 | String_256 = "256" 296 | String_512 = "512" 297 | String_1024 = "1024" 298 | PriorityVlanTag = "Priority and VLAN tagging" 299 | PriorityOnly = "Priority" 300 | VLan = "VLan" 301 | Priority_Vlan = "All" 302 | 10M = "10M" 303 | 100M = "100M" 304 | 1G = "1G" 305 | 10G = "10G" 306 | TCPv4 = "TCP(v4)" 307 | TCPUDPv4 = "TCP/UDP(v4)" 308 | TCPUDPAll = "TCP/UDP(v4,v6)" 309 | All = "All" 310 | IPv4 = "IPv4" 311 | Maximal = "Maximal" 312 | 313 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k12R2/amd64/netkvm.inf: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------- 2 | ; netkvm.INF 3 | ; 4 | ; Red Hat VirtIO Ethernet Adapter 5 | ; 6 | ; Copyright (c) 2008-2017 Red Hat, Inc. All rights reserved. 7 | ; 8 | ;------------------------------------------------------------------------------- 9 | 10 | [version] 11 | Signature = "$Windows NT$" 12 | Class = Net 13 | CatalogFile = netkvm.cat 14 | ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} 15 | Provider = %RedHat% 16 | DriverVer=03/27/2017,63.74.104.13500 17 | DriverPackageType = PlugAndPlay 18 | DriverPackageDisplayName = %kvmnet6.DeviceDesc% 19 | 20 | [Manufacturer] 21 | %RedHat% = RedHat, NTamd64.6.3 22 | 23 | [RedHat.NTamd64.6.3] 24 | %kvmnet6.DeviceDesc% = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1000&SUBSYS_00011AF4&REV_00 25 | %kvmnet6.DeviceDesc% = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1041&SUBSYS_11001AF4&REV_01 26 | 27 | [kvmnet6.ndi.hw] 28 | AddReg = kvmnet6.EnableMSI 29 | 30 | [kvmnet6.EnableMSI] 31 | ;HKR, "Interrupt Management",, 0x00000010 32 | ;HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 33 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1 34 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 2048 35 | ;HKR, "Interrupt Management\Affinity Policy",, 0x00000010 36 | HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 0 37 | HKR, "Interrupt Management\Affinity Policy", DevicePriority, 0x00010001, 2 38 | 39 | [kvmnet6.ndi] 40 | Characteristics = 0x84 ; NCF_PHYSICAL | NCF_HAS_UI 41 | BusType = 5 ; PCI 42 | AddReg = kvmnet6.Reg, Parameters 43 | CopyFiles = kvmnet6.CopyFiles 44 | *IfType = 6 45 | *MediaType = 0 ; NdisMedium802_3 46 | *PhysicalMediaType = 0 ; NdisPhysicalMediumUnspecified 47 | 48 | [kvmnet6.ndi.Services] 49 | AddService = netkvm, 2, kvmnet6.Service, kvmnet6.EventLog 50 | 51 | ;----------------------------------------------------------------------------- 52 | ; Red Hat ParaVirtualized Miniport Common 53 | ;----------------------------------------------------------------------------- 54 | 55 | [kvmnet6.Reg] 56 | HKR, , BusNumber, 0, "0" 57 | HKR, Ndi, Service, 0, "netkvm" 58 | HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" 59 | HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" 60 | 61 | HKR, Ndi\params\*RSS, ParamDesc, 0, "Receive Side Scaling" 62 | HKR, Ndi\params\*RSS, Type, 0, "enum" 63 | HKR, Ndi\params\*RSS, Default, 0, "1" 64 | HKR, Ndi\params\*RSS, Optional, 0, "0" 65 | HKR, Ndi\params\*RSS\enum, "0", 0, "Disabled" 66 | HKR, Ndi\params\*RSS\enum, "1", 0, "Enabled" 67 | 68 | HKR, Ndi\params\*NumRssQueues, ParamDesc, 0, "Maximum Number of RSS Queues" 69 | HKR, Ndi\params\*NumRssQueues, type, 0, "int" 70 | HKR, Ndi\params\*NumRssQueues, default, 0, "8" 71 | HKR, Ndi\params\*NumRssQueues, min, 0, "1" 72 | HKR, Ndi\params\*NumRssQueues, max, 0, "16" 73 | HKR, Ndi\params\*NumRssQueues, step, 0, "1" 74 | 75 | HKR, Ndi\params\*RscIPv4, ParamDesc, 0, "Recv Segment Coalescing (IPv4)" 76 | HKR, Ndi\params\*RscIPv4, Type, 0, "enum" 77 | HKR, Ndi\params\*RscIPv4, Default, 0, "1" 78 | HKR, Ndi\params\*RscIPv4, Optional, 0, "0" 79 | HKR, Ndi\params\*RscIPv4\enum, "0", 0, "Disabled" 80 | HKR, Ndi\params\*RscIPv4\enum, "1", 0, "Enabled" 81 | 82 | HKR, Ndi\params\*RscIPv6, ParamDesc, 0, "Recv Segment Coalescing (IPv6)" 83 | HKR, Ndi\params\*RscIPv6, Type, 0, "enum" 84 | HKR, Ndi\params\*RscIPv6, Default, 0, "1" 85 | HKR, Ndi\params\*RscIPv6, Optional, 0, "0" 86 | HKR, Ndi\params\*RscIPv6\enum, "0", 0, "Disabled" 87 | HKR, Ndi\params\*RscIPv6\enum, "1", 0, "Enabled" 88 | 89 | [Parameters] 90 | 91 | HKR, Ndi\Params\ConnectRate, ParamDesc, 0, %ConnectRate% 92 | HKR, Ndi\Params\ConnectRate, Default, 0, "10000" 93 | HKR, Ndi\Params\ConnectRate, type, 0, "enum" 94 | HKR, Ndi\Params\ConnectRate\enum, "10", 0, %10M% 95 | HKR, Ndi\Params\ConnectRate\enum, "100", 0, %100M% 96 | HKR, Ndi\Params\ConnectRate\enum, "1000", 0, %1G% 97 | HKR, Ndi\Params\ConnectRate\enum, "10000", 0, %10G% 98 | 99 | HKR, Ndi\Params\Priority, ParamDesc, 0, %Priority% 100 | HKR, Ndi\Params\Priority, Default, 0, "1" 101 | HKR, Ndi\Params\Priority, type, 0, "enum" 102 | HKR, Ndi\Params\Priority\enum, "1", 0, %Enable% 103 | HKR, Ndi\Params\Priority\enum, "0", 0, %Disable% 104 | 105 | HKR, Ndi\Params\*PriorityVLANTag, ParamDesc, 0, %PriorityVlanTag% 106 | HKR, Ndi\Params\*PriorityVLANTag, Default, 0, "3" 107 | HKR, Ndi\Params\*PriorityVLANTag, type, 0, "enum" 108 | HKR, Ndi\Params\*PriorityVLANTag\enum, "3", 0, %Priority_Vlan% 109 | HKR, Ndi\Params\*PriorityVLANTag\enum, "2", 0, %VLan% 110 | HKR, Ndi\Params\*PriorityVLANTag\enum, "1", 0, %PriorityOnly% 111 | HKR, Ndi\Params\*PriorityVLANTag\enum, "0", 0, %Disable% 112 | 113 | HKR, Ndi\Params\DoLog, ParamDesc, 0, %EnableLogging% 114 | HKR, Ndi\Params\DoLog, Default, 0, "1" 115 | HKR, Ndi\Params\DoLog, type, 0, "enum" 116 | HKR, Ndi\Params\DoLog\enum, "1", 0, %Enable% 117 | HKR, Ndi\Params\DoLog\enum, "0", 0, %Disable% 118 | 119 | HKR, Ndi\params\DebugLevel, ParamDesc, 0, %DebugLevel% 120 | HKR, Ndi\params\DebugLevel, type, 0, "int" 121 | HKR, Ndi\params\DebugLevel, default, 0, "0" 122 | HKR, Ndi\params\DebugLevel, min, 0, "0" 123 | HKR, Ndi\params\DebugLevel, max, 0, "8" 124 | HKR, Ndi\params\DebugLevel, step, 0, "1" 125 | 126 | HKR, Ndi\params\MTU, ParamDesc, 0, %MTU% 127 | HKR, Ndi\params\MTU, type, 0, "long" 128 | HKR, Ndi\params\MTU, default, 0, "1500" 129 | HKR, Ndi\params\MTU, min, 0, "576" 130 | HKR, Ndi\params\MTU, max, 0, "65500" 131 | HKR, Ndi\params\MTU, step, 0, "1" 132 | 133 | HKR, Ndi\params\TxCapacity, ParamDesc, 0, %TxCapacity% 134 | HKR, Ndi\params\TxCapacity, type, 0, "enum" 135 | HKR, Ndi\params\TxCapacity, default, 0, "1024" 136 | HKR, Ndi\Params\TxCapacity\enum, "16", 0, %String_16% 137 | HKR, Ndi\Params\TxCapacity\enum, "32", 0, %String_32% 138 | HKR, Ndi\Params\TxCapacity\enum, "64", 0, %String_64% 139 | HKR, Ndi\Params\TxCapacity\enum, "128", 0, %String_128% 140 | HKR, Ndi\Params\TxCapacity\enum, "256", 0, %String_256% 141 | HKR, Ndi\Params\TxCapacity\enum, "512", 0, %String_512% 142 | HKR, Ndi\Params\TxCapacity\enum, "1024", 0, %String_1024% 143 | 144 | HKR, Ndi\params\RxCapacity, ParamDesc, 0, %RxCapacity% 145 | HKR, Ndi\params\RxCapacity, type, 0, "enum" 146 | HKR, Ndi\params\RxCapacity, default, 0, "256" 147 | HKR, Ndi\Params\RxCapacity\enum, "16", 0, %String_16% 148 | HKR, Ndi\Params\RxCapacity\enum, "32", 0, %String_32% 149 | HKR, Ndi\Params\RxCapacity\enum, "64", 0, %String_64% 150 | HKR, Ndi\Params\RxCapacity\enum, "128", 0, %String_128% 151 | HKR, Ndi\Params\RxCapacity\enum, "256", 0, %String_256% 152 | HKR, Ndi\Params\RxCapacity\enum, "512", 0, %String_512% 153 | HKR, Ndi\Params\RxCapacity\enum, "1024", 0, %String_1024% 154 | 155 | HKR, Ndi\params\NetworkAddress, ParamDesc, 0, %NetworkAddress% 156 | HKR, Ndi\params\NetworkAddress, type, 0, "edit" 157 | HKR, Ndi\params\NetworkAddress, Optional, 0, "1" 158 | 159 | HKR, Ndi\Params\OffLoad.TxChecksum, ParamDesc, 0, %OffLoad.TxChecksum% 160 | HKR, Ndi\Params\OffLoad.TxChecksum, Default, 0, "31" 161 | HKR, Ndi\Params\OffLoad.TxChecksum, type, 0, "enum" 162 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "31", 0, %All% 163 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "27", 0, %TCPUDPAll% 164 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "3", 0, %TCPUDPv4% 165 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "1", 0, %TCPv4% 166 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "0", 0, %Disable% 167 | 168 | HKR, Ndi\Params\OffLoad.TxLSO, ParamDesc, 0, %OffLoad.TxLSO% 169 | HKR, Ndi\Params\OffLoad.TxLSO, Default, 0, "2" 170 | HKR, Ndi\Params\OffLoad.TxLSO, type, 0, "enum" 171 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "2", 0, %Maximal% 172 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "1", 0, %IPv4% 173 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "0", 0, %Disable% 174 | 175 | HKR, Ndi\Params\OffLoad.RxCS, ParamDesc, 0, %OffLoad.RxCS% 176 | HKR, Ndi\Params\OffLoad.RxCS, Default, 0, "31" 177 | HKR, Ndi\Params\OffLoad.RxCS, type, 0, "enum" 178 | HKR, Ndi\Params\OffLoad.RxCS\enum, "31", 0, %All% 179 | HKR, Ndi\Params\OffLoad.RxCS\enum, "27", 0, %TCPUDPAll% 180 | HKR, Ndi\Params\OffLoad.RxCS\enum, "3", 0, %TCPUDPv4% 181 | HKR, Ndi\Params\OffLoad.RxCS\enum, "1", 0, %TCPv4% 182 | HKR, Ndi\Params\OffLoad.RxCS\enum, "0", 0, %Disable% 183 | 184 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, ParamDesc, 0, %Std.IPChecksumOffloadv4% 185 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, Default, 0, "3" 186 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, type, 0, "enum" 187 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 188 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "2", 0, %Rx% 189 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "1", 0, %Tx% 190 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "0", 0, %Disable% 191 | 192 | HKR, Ndi\Params\*LsoV2IPv4, ParamDesc, 0, %Std.LsoV2IPv4% 193 | HKR, Ndi\Params\*LsoV2IPv4, Default, 0, "1" 194 | HKR, Ndi\Params\*LsoV2IPv4, type, 0, "enum" 195 | HKR, Ndi\Params\*LsoV2IPv4\enum, "1", 0, %Enable% 196 | HKR, Ndi\Params\*LsoV2IPv4\enum, "0", 0, %Disable% 197 | 198 | HKR, Ndi\Params\*LsoV2IPv6, ParamDesc, 0, %Std.LsoV2IPv6% 199 | HKR, Ndi\Params\*LsoV2IPv6, Default, 0, "1" 200 | HKR, Ndi\Params\*LsoV2IPv6, type, 0, "enum" 201 | HKR, Ndi\Params\*LsoV2IPv6\enum, "1", 0, %Enable% 202 | HKR, Ndi\Params\*LsoV2IPv6\enum, "0", 0, %Disable% 203 | 204 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, ParamDesc, 0, %Std.UDPChecksumOffloadIPv4% 205 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, Default, 0, "3" 206 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, type, 0, "enum" 207 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 208 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "2", 0, %Rx% 209 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "1", 0, %Tx% 210 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "0", 0, %Disable% 211 | 212 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, ParamDesc, 0, %Std.TCPChecksumOffloadIPv4% 213 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, Default, 0, "3" 214 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, type, 0, "enum" 215 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 216 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "2", 0, %Rx% 217 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "1", 0, %Tx% 218 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "0", 0, %Disable% 219 | 220 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, ParamDesc, 0, %Std.TCPChecksumOffloadIPv6% 221 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, Default, 0, "3" 222 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, type, 0, "enum" 223 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "3", 0, %TxRx% 224 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "2", 0, %Rx% 225 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "1", 0, %Tx% 226 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "0", 0, %Disable% 227 | 228 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, ParamDesc, 0, %Std.UDPChecksumOffloadIPv6% 229 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, Default, 0, "3" 230 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, type, 0, "enum" 231 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "3", 0, %TxRx% 232 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "2", 0, %Rx% 233 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "1", 0, %Tx% 234 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "0", 0, %Disable% 235 | 236 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, ParamDesc, 0, %NumberOfHandledRXPackersInDPC% 237 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, type, 0, "long" 238 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, default, 0, "1000" 239 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, min, 0, "1" 240 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, max, 0, "10000" 241 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, step, 0, "1" 242 | 243 | [kvmnet6.CopyFiles] 244 | netkvm.sys,,,2 245 | 246 | [kvmnet6.Service] 247 | DisplayName = %kvmnet6.Service.DispName% 248 | ServiceType = 1 ;%SERVICE_KERNEL_DRIVER% 249 | StartType = 3 ;%SERVICE_DEMAND_START% 250 | ErrorControl = 1 ;%SERVICE_ERROR_NORMAL% 251 | ServiceBinary = %12%\netkvm.sys 252 | LoadOrderGroup = NDIS 253 | AddReg = TextModeFlags.Reg 254 | 255 | [kvmnet6.EventLog] 256 | AddReg = kvmnet6.AddEventLog.Reg 257 | 258 | [kvmnet6.AddEventLog.Reg] 259 | HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll" 260 | HKR, , TypesSupported, 0x00010001, 7 261 | 262 | [TextModeFlags.Reg] 263 | HKR,,TextModeFlags,0x00010001, 0x0001 264 | HKR,Parameters,DisableMSI,,"0" 265 | HKR,Parameters,EarlyDebug,,"3" 266 | 267 | [SourceDisksNames] 268 | 1 = %DiskId1%,,,"" 269 | 270 | [SourceDisksFiles] 271 | netkvm.sys = 1,, 272 | 273 | [DestinationDirs] 274 | kvmnet6.CopyFiles = 12 275 | 276 | [Strings] 277 | RedHat = "Red Hat, Inc." 278 | kvmnet6.DeviceDesc = "Red Hat VirtIO Ethernet Adapter" 279 | kvmnet6.Service.DispName = "Red Hat VirtIO Ethernet Adapter Service" 280 | DiskId1 = "Red Hat VirtIO Ethernet Adapter Driver Disk #1" 281 | NetworkAddress = "Assign MAC" 282 | ConnectRate = "Init.ConnectionRate(Mb)" 283 | Priority = "Init.Do802.1PQ" 284 | MTU = "Init.MTUSize" 285 | TxCapacity = "Init.MaxTxBuffers" 286 | RxCapacity = "Init.MaxRxBuffers" 287 | Offload.TxChecksum = "Offload.Tx.Checksum" 288 | Offload.TxLSO = "Offload.Tx.LSO" 289 | Offload.RxCS = "Offload.Rx.Checksum" 290 | EnableLogging = "Logging.Enable" 291 | DebugLevel = "Logging.Level" 292 | Tx = "Tx Enabled"; 293 | Rx = "Rx Enabled"; 294 | TxRx = "Rx & Tx Enabled"; 295 | NumberOfHandledRXPackersInDPC = "TestOnly.RXThrottle" 296 | Std.LsoV2IPv4 = "Large Send Offload V2 (IPv4)" 297 | Std.LsoV2IPv6 = "Large Send Offload V2 (IPv6)" 298 | Std.UDPChecksumOffloadIPv4 = "UDP Checksum Offload (IPv4)" 299 | Std.TCPChecksumOffloadIPv4 = "TCP Checksum Offload (IPv4)" 300 | Std.UDPChecksumOffloadIPv6 = "UDP Checksum Offload (IPv6)" 301 | Std.TCPChecksumOffloadIPv6 = "TCP Checksum Offload (IPv6)" 302 | Std.IPChecksumOffloadv4 = "IPv4 Checksum Offload" 303 | Disable = "Disabled" 304 | Enable = "Enabled" 305 | Enable* = "Enabled*" 306 | String_16 = "16" 307 | String_32 = "32" 308 | String_64 = "64" 309 | String_128 = "128" 310 | String_256 = "256" 311 | String_512 = "512" 312 | String_1024 = "1024" 313 | PriorityVlanTag = "Priority and VLAN tagging" 314 | PriorityOnly = "Priority" 315 | VLan = "VLan" 316 | Priority_Vlan = "All" 317 | 10M = "10M" 318 | 100M = "100M" 319 | 1G = "1G" 320 | 10G = "10G" 321 | TCPv4 = "TCP(v4)" 322 | TCPUDPv4 = "TCP/UDP(v4)" 323 | TCPUDPAll = "TCP/UDP(v4,v6)" 324 | All = "All" 325 | IPv4 = "IPv4" 326 | Maximal = "Maximal" 327 | 328 | -------------------------------------------------------------------------------- /windows/floppy/drivers/virtio-win-0.1.135/NetKVM/2k16/amd64/netkvm.inf: -------------------------------------------------------------------------------- 1 | ;------------------------------------------------------------------------------- 2 | ; netkvm.INF 3 | ; 4 | ; Red Hat VirtIO Ethernet Adapter 5 | ; 6 | ; Copyright (c) 2008-2017 Red Hat, Inc. All rights reserved. 7 | ; 8 | ;------------------------------------------------------------------------------- 9 | 10 | [version] 11 | Signature = "$Windows NT$" 12 | Class = Net 13 | CatalogFile = netkvm.cat 14 | ClassGUID = {4d36e972-e325-11ce-bfc1-08002be10318} 15 | Provider = %RedHat% 16 | DriverVer=03/27/2017,100.74.104.13500 17 | DriverPackageType = PlugAndPlay 18 | DriverPackageDisplayName = %kvmnet6.DeviceDesc% 19 | 20 | [Manufacturer] 21 | %RedHat% = RedHat, NTamd64.10.0 22 | 23 | [RedHat.NTamd64.10.0] 24 | %kvmnet6.DeviceDesc% = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1000&SUBSYS_00011AF4&REV_00 25 | %kvmnet6.DeviceDesc% = kvmnet6.ndi, PCI\VEN_1AF4&DEV_1041&SUBSYS_11001AF4&REV_01 26 | 27 | [kvmnet6.ndi.hw] 28 | AddReg = kvmnet6.EnableMSI 29 | 30 | [kvmnet6.EnableMSI] 31 | ;HKR, "Interrupt Management",, 0x00000010 32 | ;HKR, "Interrupt Management\MessageSignaledInterruptProperties",, 0x00000010 33 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MSISupported, 0x00010001, 1 34 | HKR, "Interrupt Management\MessageSignaledInterruptProperties", MessageNumberLimit, 0x00010001, 2048 35 | ;HKR, "Interrupt Management\Affinity Policy",, 0x00000010 36 | HKR, "Interrupt Management\Affinity Policy", DevicePolicy, 0x00010001, 0 37 | HKR, "Interrupt Management\Affinity Policy", DevicePriority, 0x00010001, 2 38 | 39 | [kvmnet6.ndi] 40 | Characteristics = 0x84 ; NCF_PHYSICAL | NCF_HAS_UI 41 | BusType = 5 ; PCI 42 | AddReg = kvmnet6.Reg, Parameters 43 | CopyFiles = kvmnet6.CopyFiles 44 | *IfType = 6 45 | *MediaType = 0 ; NdisMedium802_3 46 | *PhysicalMediaType = 0 ; NdisPhysicalMediumUnspecified 47 | 48 | [kvmnet6.ndi.Services] 49 | AddService = netkvm, 2, kvmnet6.Service, kvmnet6.EventLog 50 | 51 | ;----------------------------------------------------------------------------- 52 | ; Red Hat ParaVirtualized Miniport Common 53 | ;----------------------------------------------------------------------------- 54 | 55 | [kvmnet6.Reg] 56 | HKR, , BusNumber, 0, "0" 57 | HKR, Ndi, Service, 0, "netkvm" 58 | HKR, Ndi\Interfaces, UpperRange, 0, "ndis5" 59 | HKR, Ndi\Interfaces, LowerRange, 0, "ethernet" 60 | 61 | HKR, Ndi\params\*RSS, ParamDesc, 0, "Receive Side Scaling" 62 | HKR, Ndi\params\*RSS, Type, 0, "enum" 63 | HKR, Ndi\params\*RSS, Default, 0, "1" 64 | HKR, Ndi\params\*RSS, Optional, 0, "0" 65 | HKR, Ndi\params\*RSS\enum, "0", 0, "Disabled" 66 | HKR, Ndi\params\*RSS\enum, "1", 0, "Enabled" 67 | 68 | HKR, Ndi\params\*NumRssQueues, ParamDesc, 0, "Maximum Number of RSS Queues" 69 | HKR, Ndi\params\*NumRssQueues, type, 0, "int" 70 | HKR, Ndi\params\*NumRssQueues, default, 0, "8" 71 | HKR, Ndi\params\*NumRssQueues, min, 0, "1" 72 | HKR, Ndi\params\*NumRssQueues, max, 0, "16" 73 | HKR, Ndi\params\*NumRssQueues, step, 0, "1" 74 | 75 | HKR, Ndi\params\*RscIPv4, ParamDesc, 0, "Recv Segment Coalescing (IPv4)" 76 | HKR, Ndi\params\*RscIPv4, Type, 0, "enum" 77 | HKR, Ndi\params\*RscIPv4, Default, 0, "1" 78 | HKR, Ndi\params\*RscIPv4, Optional, 0, "0" 79 | HKR, Ndi\params\*RscIPv4\enum, "0", 0, "Disabled" 80 | HKR, Ndi\params\*RscIPv4\enum, "1", 0, "Enabled" 81 | 82 | HKR, Ndi\params\*RscIPv6, ParamDesc, 0, "Recv Segment Coalescing (IPv6)" 83 | HKR, Ndi\params\*RscIPv6, Type, 0, "enum" 84 | HKR, Ndi\params\*RscIPv6, Default, 0, "1" 85 | HKR, Ndi\params\*RscIPv6, Optional, 0, "0" 86 | HKR, Ndi\params\*RscIPv6\enum, "0", 0, "Disabled" 87 | HKR, Ndi\params\*RscIPv6\enum, "1", 0, "Enabled" 88 | 89 | [Parameters] 90 | 91 | HKR, Ndi\Params\ConnectRate, ParamDesc, 0, %ConnectRate% 92 | HKR, Ndi\Params\ConnectRate, Default, 0, "10000" 93 | HKR, Ndi\Params\ConnectRate, type, 0, "enum" 94 | HKR, Ndi\Params\ConnectRate\enum, "10", 0, %10M% 95 | HKR, Ndi\Params\ConnectRate\enum, "100", 0, %100M% 96 | HKR, Ndi\Params\ConnectRate\enum, "1000", 0, %1G% 97 | HKR, Ndi\Params\ConnectRate\enum, "10000", 0, %10G% 98 | 99 | HKR, Ndi\Params\Priority, ParamDesc, 0, %Priority% 100 | HKR, Ndi\Params\Priority, Default, 0, "1" 101 | HKR, Ndi\Params\Priority, type, 0, "enum" 102 | HKR, Ndi\Params\Priority\enum, "1", 0, %Enable% 103 | HKR, Ndi\Params\Priority\enum, "0", 0, %Disable% 104 | 105 | HKR, Ndi\Params\*PriorityVLANTag, ParamDesc, 0, %PriorityVlanTag% 106 | HKR, Ndi\Params\*PriorityVLANTag, Default, 0, "3" 107 | HKR, Ndi\Params\*PriorityVLANTag, type, 0, "enum" 108 | HKR, Ndi\Params\*PriorityVLANTag\enum, "3", 0, %Priority_Vlan% 109 | HKR, Ndi\Params\*PriorityVLANTag\enum, "2", 0, %VLan% 110 | HKR, Ndi\Params\*PriorityVLANTag\enum, "1", 0, %PriorityOnly% 111 | HKR, Ndi\Params\*PriorityVLANTag\enum, "0", 0, %Disable% 112 | 113 | HKR, Ndi\Params\DoLog, ParamDesc, 0, %EnableLogging% 114 | HKR, Ndi\Params\DoLog, Default, 0, "1" 115 | HKR, Ndi\Params\DoLog, type, 0, "enum" 116 | HKR, Ndi\Params\DoLog\enum, "1", 0, %Enable% 117 | HKR, Ndi\Params\DoLog\enum, "0", 0, %Disable% 118 | 119 | HKR, Ndi\params\DebugLevel, ParamDesc, 0, %DebugLevel% 120 | HKR, Ndi\params\DebugLevel, type, 0, "int" 121 | HKR, Ndi\params\DebugLevel, default, 0, "0" 122 | HKR, Ndi\params\DebugLevel, min, 0, "0" 123 | HKR, Ndi\params\DebugLevel, max, 0, "8" 124 | HKR, Ndi\params\DebugLevel, step, 0, "1" 125 | 126 | HKR, Ndi\params\MTU, ParamDesc, 0, %MTU% 127 | HKR, Ndi\params\MTU, type, 0, "long" 128 | HKR, Ndi\params\MTU, default, 0, "1500" 129 | HKR, Ndi\params\MTU, min, 0, "576" 130 | HKR, Ndi\params\MTU, max, 0, "65500" 131 | HKR, Ndi\params\MTU, step, 0, "1" 132 | 133 | HKR, Ndi\params\TxCapacity, ParamDesc, 0, %TxCapacity% 134 | HKR, Ndi\params\TxCapacity, type, 0, "enum" 135 | HKR, Ndi\params\TxCapacity, default, 0, "1024" 136 | HKR, Ndi\Params\TxCapacity\enum, "16", 0, %String_16% 137 | HKR, Ndi\Params\TxCapacity\enum, "32", 0, %String_32% 138 | HKR, Ndi\Params\TxCapacity\enum, "64", 0, %String_64% 139 | HKR, Ndi\Params\TxCapacity\enum, "128", 0, %String_128% 140 | HKR, Ndi\Params\TxCapacity\enum, "256", 0, %String_256% 141 | HKR, Ndi\Params\TxCapacity\enum, "512", 0, %String_512% 142 | HKR, Ndi\Params\TxCapacity\enum, "1024", 0, %String_1024% 143 | 144 | HKR, Ndi\params\RxCapacity, ParamDesc, 0, %RxCapacity% 145 | HKR, Ndi\params\RxCapacity, type, 0, "enum" 146 | HKR, Ndi\params\RxCapacity, default, 0, "256" 147 | HKR, Ndi\Params\RxCapacity\enum, "16", 0, %String_16% 148 | HKR, Ndi\Params\RxCapacity\enum, "32", 0, %String_32% 149 | HKR, Ndi\Params\RxCapacity\enum, "64", 0, %String_64% 150 | HKR, Ndi\Params\RxCapacity\enum, "128", 0, %String_128% 151 | HKR, Ndi\Params\RxCapacity\enum, "256", 0, %String_256% 152 | HKR, Ndi\Params\RxCapacity\enum, "512", 0, %String_512% 153 | HKR, Ndi\Params\RxCapacity\enum, "1024", 0, %String_1024% 154 | 155 | HKR, Ndi\params\NetworkAddress, ParamDesc, 0, %NetworkAddress% 156 | HKR, Ndi\params\NetworkAddress, type, 0, "edit" 157 | HKR, Ndi\params\NetworkAddress, Optional, 0, "1" 158 | 159 | HKR, Ndi\Params\OffLoad.TxChecksum, ParamDesc, 0, %OffLoad.TxChecksum% 160 | HKR, Ndi\Params\OffLoad.TxChecksum, Default, 0, "31" 161 | HKR, Ndi\Params\OffLoad.TxChecksum, type, 0, "enum" 162 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "31", 0, %All% 163 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "27", 0, %TCPUDPAll% 164 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "3", 0, %TCPUDPv4% 165 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "1", 0, %TCPv4% 166 | HKR, Ndi\Params\OffLoad.TxChecksum\enum, "0", 0, %Disable% 167 | 168 | HKR, Ndi\Params\OffLoad.TxLSO, ParamDesc, 0, %OffLoad.TxLSO% 169 | HKR, Ndi\Params\OffLoad.TxLSO, Default, 0, "2" 170 | HKR, Ndi\Params\OffLoad.TxLSO, type, 0, "enum" 171 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "2", 0, %Maximal% 172 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "1", 0, %IPv4% 173 | HKR, Ndi\Params\OffLoad.TxLSO\enum, "0", 0, %Disable% 174 | 175 | HKR, Ndi\Params\OffLoad.RxCS, ParamDesc, 0, %OffLoad.RxCS% 176 | HKR, Ndi\Params\OffLoad.RxCS, Default, 0, "31" 177 | HKR, Ndi\Params\OffLoad.RxCS, type, 0, "enum" 178 | HKR, Ndi\Params\OffLoad.RxCS\enum, "31", 0, %All% 179 | HKR, Ndi\Params\OffLoad.RxCS\enum, "27", 0, %TCPUDPAll% 180 | HKR, Ndi\Params\OffLoad.RxCS\enum, "3", 0, %TCPUDPv4% 181 | HKR, Ndi\Params\OffLoad.RxCS\enum, "1", 0, %TCPv4% 182 | HKR, Ndi\Params\OffLoad.RxCS\enum, "0", 0, %Disable% 183 | 184 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, ParamDesc, 0, %Std.IPChecksumOffloadv4% 185 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, Default, 0, "3" 186 | HKR, Ndi\Params\*IPChecksumOffloadIPv4, type, 0, "enum" 187 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 188 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "2", 0, %Rx% 189 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "1", 0, %Tx% 190 | HKR, Ndi\Params\*IPChecksumOffloadIPv4\enum, "0", 0, %Disable% 191 | 192 | HKR, Ndi\Params\*LsoV2IPv4, ParamDesc, 0, %Std.LsoV2IPv4% 193 | HKR, Ndi\Params\*LsoV2IPv4, Default, 0, "1" 194 | HKR, Ndi\Params\*LsoV2IPv4, type, 0, "enum" 195 | HKR, Ndi\Params\*LsoV2IPv4\enum, "1", 0, %Enable% 196 | HKR, Ndi\Params\*LsoV2IPv4\enum, "0", 0, %Disable% 197 | 198 | HKR, Ndi\Params\*LsoV2IPv6, ParamDesc, 0, %Std.LsoV2IPv6% 199 | HKR, Ndi\Params\*LsoV2IPv6, Default, 0, "1" 200 | HKR, Ndi\Params\*LsoV2IPv6, type, 0, "enum" 201 | HKR, Ndi\Params\*LsoV2IPv6\enum, "1", 0, %Enable% 202 | HKR, Ndi\Params\*LsoV2IPv6\enum, "0", 0, %Disable% 203 | 204 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, ParamDesc, 0, %Std.UDPChecksumOffloadIPv4% 205 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, Default, 0, "3" 206 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4, type, 0, "enum" 207 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 208 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "2", 0, %Rx% 209 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "1", 0, %Tx% 210 | HKR, Ndi\Params\*UDPChecksumOffloadIPv4\enum, "0", 0, %Disable% 211 | 212 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, ParamDesc, 0, %Std.TCPChecksumOffloadIPv4% 213 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, Default, 0, "3" 214 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4, type, 0, "enum" 215 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "3", 0, %TxRx% 216 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "2", 0, %Rx% 217 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "1", 0, %Tx% 218 | HKR, Ndi\Params\*TCPChecksumOffloadIPv4\enum, "0", 0, %Disable% 219 | 220 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, ParamDesc, 0, %Std.TCPChecksumOffloadIPv6% 221 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, Default, 0, "3" 222 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6, type, 0, "enum" 223 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "3", 0, %TxRx% 224 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "2", 0, %Rx% 225 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "1", 0, %Tx% 226 | HKR, Ndi\Params\*TCPChecksumOffloadIPv6\enum, "0", 0, %Disable% 227 | 228 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, ParamDesc, 0, %Std.UDPChecksumOffloadIPv6% 229 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, Default, 0, "3" 230 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6, type, 0, "enum" 231 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "3", 0, %TxRx% 232 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "2", 0, %Rx% 233 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "1", 0, %Tx% 234 | HKR, Ndi\Params\*UDPChecksumOffloadIPv6\enum, "0", 0, %Disable% 235 | 236 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, ParamDesc, 0, %NumberOfHandledRXPackersInDPC% 237 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, type, 0, "long" 238 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, default, 0, "1000" 239 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, min, 0, "1" 240 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, max, 0, "10000" 241 | HKR, Ndi\params\NumberOfHandledRXPackersInDPC, step, 0, "1" 242 | 243 | [kvmnet6.CopyFiles] 244 | netkvm.sys,,,2 245 | 246 | [kvmnet6.Service] 247 | DisplayName = %kvmnet6.Service.DispName% 248 | ServiceType = 1 ;%SERVICE_KERNEL_DRIVER% 249 | StartType = 3 ;%SERVICE_DEMAND_START% 250 | ErrorControl = 1 ;%SERVICE_ERROR_NORMAL% 251 | ServiceBinary = %12%\netkvm.sys 252 | LoadOrderGroup = NDIS 253 | AddReg = TextModeFlags.Reg 254 | 255 | [kvmnet6.EventLog] 256 | AddReg = kvmnet6.AddEventLog.Reg 257 | 258 | [kvmnet6.AddEventLog.Reg] 259 | HKR, , EventMessageFile, 0x00020000, "%%SystemRoot%%\System32\netevent.dll" 260 | HKR, , TypesSupported, 0x00010001, 7 261 | 262 | [TextModeFlags.Reg] 263 | HKR,,TextModeFlags,0x00010001, 0x0001 264 | HKR,Parameters,DisableMSI,,"0" 265 | HKR,Parameters,EarlyDebug,,"3" 266 | 267 | [SourceDisksNames] 268 | 1 = %DiskId1%,,,"" 269 | 270 | [SourceDisksFiles] 271 | netkvm.sys = 1,, 272 | 273 | [DestinationDirs] 274 | kvmnet6.CopyFiles = 12 275 | 276 | [Strings] 277 | RedHat = "Red Hat, Inc." 278 | kvmnet6.DeviceDesc = "Red Hat VirtIO Ethernet Adapter" 279 | kvmnet6.Service.DispName = "Red Hat VirtIO Ethernet Adapter Service" 280 | DiskId1 = "Red Hat VirtIO Ethernet Adapter Driver Disk #1" 281 | NetworkAddress = "Assign MAC" 282 | ConnectRate = "Init.ConnectionRate(Mb)" 283 | Priority = "Init.Do802.1PQ" 284 | MTU = "Init.MTUSize" 285 | TxCapacity = "Init.MaxTxBuffers" 286 | RxCapacity = "Init.MaxRxBuffers" 287 | Offload.TxChecksum = "Offload.Tx.Checksum" 288 | Offload.TxLSO = "Offload.Tx.LSO" 289 | Offload.RxCS = "Offload.Rx.Checksum" 290 | EnableLogging = "Logging.Enable" 291 | DebugLevel = "Logging.Level" 292 | Tx = "Tx Enabled"; 293 | Rx = "Rx Enabled"; 294 | TxRx = "Rx & Tx Enabled"; 295 | NumberOfHandledRXPackersInDPC = "TestOnly.RXThrottle" 296 | Std.LsoV2IPv4 = "Large Send Offload V2 (IPv4)" 297 | Std.LsoV2IPv6 = "Large Send Offload V2 (IPv6)" 298 | Std.UDPChecksumOffloadIPv4 = "UDP Checksum Offload (IPv4)" 299 | Std.TCPChecksumOffloadIPv4 = "TCP Checksum Offload (IPv4)" 300 | Std.UDPChecksumOffloadIPv6 = "UDP Checksum Offload (IPv6)" 301 | Std.TCPChecksumOffloadIPv6 = "TCP Checksum Offload (IPv6)" 302 | Std.IPChecksumOffloadv4 = "IPv4 Checksum Offload" 303 | Disable = "Disabled" 304 | Enable = "Enabled" 305 | Enable* = "Enabled*" 306 | String_16 = "16" 307 | String_32 = "32" 308 | String_64 = "64" 309 | String_128 = "128" 310 | String_256 = "256" 311 | String_512 = "512" 312 | String_1024 = "1024" 313 | PriorityVlanTag = "Priority and VLAN tagging" 314 | PriorityOnly = "Priority" 315 | VLan = "VLan" 316 | Priority_Vlan = "All" 317 | 10M = "10M" 318 | 100M = "100M" 319 | 1G = "1G" 320 | 10G = "10G" 321 | TCPv4 = "TCP(v4)" 322 | TCPUDPv4 = "TCP/UDP(v4)" 323 | TCPUDPAll = "TCP/UDP(v4,v6)" 324 | All = "All" 325 | IPv4 = "IPv4" 326 | Maximal = "Maximal" 327 | 328 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | --------------------------------------------------------------------------------