147 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
			
		
		
	
	
			147 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			JSON
		
	
	
	
	
	
{
 | 
						|
  "builders": [
 | 
						|
    {
 | 
						|
      "type": "vmware-iso",
 | 
						|
      "vm_name":"windows_10",
 | 
						|
      "communicator": "winrm",
 | 
						|
      "iso_url": "{{user `iso_url`}}",
 | 
						|
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
 | 
						|
      "iso_checksum": "{{user `iso_checksum`}}",
 | 
						|
      "headless": false,
 | 
						|
      "boot_wait": "6m",
 | 
						|
      "boot_command": "",
 | 
						|
      "winrm_username": "vagrant",
 | 
						|
      "winrm_password": "vagrant",
 | 
						|
      "winrm_timeout": "4h",
 | 
						|
      "shutdown_timeout": "2h",
 | 
						|
      "shutdown_command": "a:/sysprep.bat",
 | 
						|
      "guest_os_type": "windows9-64",
 | 
						|
      "disk_size": "{{user `disk_size`}}",
 | 
						|
      "vnc_port_min": 5900,
 | 
						|
      "vnc_port_max": 5980,
 | 
						|
      "version": 11,
 | 
						|
      "floppy_files": [
 | 
						|
        "{{user `autounattend`}}",
 | 
						|
        "./floppy/WindowsPowershell.lnk",
 | 
						|
        "./floppy/PinTo10.exe",
 | 
						|
        "./scripts/fixnetwork.ps1",
 | 
						|
        "./scripts/rearm-windows.ps1",
 | 
						|
        "./scripts/disable-screensaver.ps1",
 | 
						|
        "./scripts/disable-winrm.ps1",
 | 
						|
        "./scripts/enable-winrm.ps1",
 | 
						|
        "./scripts/microsoft-updates.bat",
 | 
						|
        "./scripts/win-updates.ps1",
 | 
						|
        "./scripts/unattend.xml",
 | 
						|
        "./scripts/sysprep.bat"
 | 
						|
      ],
 | 
						|
      "vmx_data": {
 | 
						|
        "RemoteDisplay.vnc.enabled": "false",
 | 
						|
        "RemoteDisplay.vnc.port": "5900",
 | 
						|
        "memsize": "2048",
 | 
						|
        "numvcpus": "2",
 | 
						|
        "scsi0.virtualDev": "lsisas1068"
 | 
						|
      }
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "virtualbox-iso",
 | 
						|
      "vm_name":"windows_10",
 | 
						|
      "communicator": "winrm",
 | 
						|
      "iso_url": "{{user `iso_url`}}",
 | 
						|
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
 | 
						|
      "iso_checksum": "{{user `iso_checksum`}}",
 | 
						|
      "headless": false,
 | 
						|
      "boot_wait": "6m",
 | 
						|
      "boot_command": "",
 | 
						|
      "winrm_username": "vagrant",
 | 
						|
      "winrm_password": "vagrant",
 | 
						|
      "winrm_timeout": "4h",
 | 
						|
      "shutdown_timeout": "2h",
 | 
						|
      "shutdown_command": "a:/sysprep.bat",
 | 
						|
      "guest_os_type": "Windows81_64",
 | 
						|
      "guest_additions_mode": "disable",
 | 
						|
      "disk_size": "{{user `disk_size`}}",
 | 
						|
      "floppy_files": [
 | 
						|
        "{{user `autounattend`}}",
 | 
						|
        "./floppy/WindowsPowershell.lnk",
 | 
						|
        "./floppy/PinTo10.exe",
 | 
						|
        "./scripts/fixnetwork.ps1",
 | 
						|
        "./scripts/rearm-windows.ps1",
 | 
						|
        "./scripts/disable-screensaver.ps1",
 | 
						|
        "./scripts/disable-winrm.ps1",
 | 
						|
        "./scripts/enable-winrm.ps1",
 | 
						|
        "./scripts/microsoft-updates.bat",
 | 
						|
        "./scripts/win-updates.ps1",
 | 
						|
        "./scripts/unattend.xml",
 | 
						|
        "./scripts/sysprep.bat"
 | 
						|
      ],
 | 
						|
      "vboxmanage": [
 | 
						|
        [
 | 
						|
          "modifyvm",
 | 
						|
          "{{.Name}}",
 | 
						|
          "--memory",
 | 
						|
          "2048"
 | 
						|
        ],
 | 
						|
        [
 | 
						|
          "modifyvm",
 | 
						|
          "{{.Name}}",
 | 
						|
          "--cpus",
 | 
						|
          "2"
 | 
						|
        ]
 | 
						|
      ]
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "provisioners": [
 | 
						|
    {
 | 
						|
      "type": "windows-shell",
 | 
						|
      "remote_path": "/tmp/script.bat",
 | 
						|
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
 | 
						|
      "scripts": [
 | 
						|
        "./scripts/vm-guest-tools.bat",
 | 
						|
        "./scripts/enable-rdp.bat"
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "powershell",
 | 
						|
      "scripts": [
 | 
						|
        "./scripts/debloat-windows.ps1"
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "windows-restart"
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "powershell",
 | 
						|
      "scripts": [
 | 
						|
        "./scripts/set-powerplan.ps1",
 | 
						|
        "./scripts/docker/disable-windows-defender.ps1"
 | 
						|
      ]
 | 
						|
    },
 | 
						|
    {
 | 
						|
      "type": "windows-shell",
 | 
						|
      "remote_path": "/tmp/script.bat",
 | 
						|
      "execute_command": "{{ .Vars }} cmd /c \"{{ .Path }}\"",
 | 
						|
      "scripts": [
 | 
						|
        "./scripts/pin-powershell.bat",
 | 
						|
        "./scripts/compile-dotnet-assemblies.bat",
 | 
						|
        "./scripts/set-winrm-automatic.bat",
 | 
						|
        "./scripts/dis-updates.bat"
 | 
						|
      ]
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "post-processors": [
 | 
						|
    {
 | 
						|
      "type": "vagrant",
 | 
						|
      "keep_input_artifact": false,
 | 
						|
      "output": "windows_10_{{.Provider}}.box",
 | 
						|
      "vagrantfile_template": "vagrantfile-windows_10.template"
 | 
						|
    }
 | 
						|
  ],
 | 
						|
  "variables": {
 | 
						|
    "iso_checksum": "ab4862ba7d1644c27f27516d24cb21e6b39234eb3301e5f1fb365a78b22f79b3",
 | 
						|
    "iso_checksum_type": "sha256",
 | 
						|
    "iso_url": "https://software-download.microsoft.com/download/pr/18362.30.190401-1528.19h1_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso",
 | 
						|
    "autounattend": "./answer_files/10/Autounattend.xml",
 | 
						|
    "disk_size": "61440"
 | 
						|
  }
 | 
						|
}
 |