Commit ad86024d authored by StefanScherer's avatar StefanScherer
Browse files

enable-remote-desktop

parent 1a1d58e4
#!/bin/bash
if [ -f windows_2008_r2_vcloud.box ]; then
rm windows_2008_r2_vcloud.box
fi
packer build -only=vmware-iso windows_2008_r2_vcloud.json
rem from http://networkerslog.blogspot.de/2013/09/how-to-enable-remote-desktop-remotely.html
rem 1) Enable Remote Desktop
rem set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -Value 0
reg add "HKLM\System\CurrentControlSet\Control\Terminal Server" /v "fDenyTSConnections" /t REG_DWORD /d 0 /f
rem 2) Allow incoming RDP on firewall
rem Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
rem 3) Enable secure RDP authentication
rem set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "UserAuthentication" -Value 0
reg add "HKLM\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v "UserAuthentication" /t REG_DWORD /d 0 /f
......@@ -62,6 +62,7 @@
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/enable-remote-desktop.bat",
"./scripts/vagrant-ssh.bat"
]
},
......
{
"builders": [
{
"type": "vmware-iso",
"vm_name": "windows_2008_r2",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso",
"iso_checksum_type": "md5",
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5",
"headless": false,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "windows7srv-64",
"tools_upload_flavor": "windows",
"disk_size": 61440,
"vnc_port_min": 5900,
"vnc_port_max": 5980,
"floppy_files": [
"./answer_files/2008_r2/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1"
],
"vmx_data": {
"RemoteDisplay.vnc.enabled": "false",
"RemoteDisplay.vnc.port": "5900",
"memsize": "2048",
"numvcpus": "2",
"scsi0.virtualDev": "lsisas1068",
"svga.vramSize": "20971520",
"svga.maxWidth": "2560",
"svga.maxHeight": "2048"
}
},
{
"type": "virtualbox-iso",
"iso_url": "http://care.dlservice.microsoft.com/dl/download/7/5/E/75EC4E54-5B02-42D6-8879-D8D3A25FBEF7/7601.17514.101119-1850_x64fre_server_eval_en-us-GRMSXEVAL_EN_DVD.iso",
"iso_checksum_type": "md5",
"iso_checksum": "4263be2cf3c59177c45085c0a7bc6ca5",
"headless": false,
"boot_wait": "2m",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_wait_timeout": "2h",
"shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"",
"guest_os_type": "Windows2008_64",
"disk_size": 61440,
"floppy_files": [
"./answer_files/2008_r2/Autounattend.xml",
"./scripts/win-updates.ps1",
"./scripts/openssh.ps1",
"./scripts/oracle-cert.cer"
],
"vboxmanage": [
["modifyvm", "{{.Name}}", "--memory", "2048"],
["modifyvm", "{{.Name}}", "--cpus", "2"]
]
}
],
"provisioners": [
{
"type": "shell",
"remote_path": "/tmp/script.bat",
"execute_command": "{{.Vars}} cmd /c C:/Windows/Temp/script.bat",
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/enable-remote-desktop.bat",
"./scripts/vagrant-ssh.bat"
]
},
{
"type": "shell", "inline": ["rm -rf /tmp/*"]
}
],
"post-processors": [
{
"type": "vagrant",
"provider": "vcloud",
"keep_input_artifact": false,
"output": "windows_2008_r2_{{.Provider}}.box",
"vagrantfile_template": "vagrantfile-windows_2008_r2.template"
}
]
}
......@@ -62,6 +62,7 @@
"scripts": [
"./scripts/vm-guest-tools.bat",
"./scripts/chef.bat",
"./scripts/enable-remote-desktop.bat",
"./scripts/vagrant-ssh.bat"
]
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment