Update VM tools
This commit is contained in:
@@ -15,6 +15,7 @@ powershell.exe -c "winrm set winrm/config/service '@{AllowUnencrypted=\`"true\`"
|
|||||||
powershell.exe -c "winrm set winrm/config/service/auth '@{Basic=\`"true\`"}'"
|
powershell.exe -c "winrm set winrm/config/service/auth '@{Basic=\`"true\`"}'"
|
||||||
powershell.exe -c "winrm set winrm/config/client/auth '@{Basic=\`"true\`"}'"
|
powershell.exe -c "winrm set winrm/config/client/auth '@{Basic=\`"true\`"}'"
|
||||||
powershell.exe -c "winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port=\`"5985\`"}'"
|
powershell.exe -c "winrm set winrm/config/listener?Address=*+Transport=HTTP '@{Port=\`"5985\`"}'"
|
||||||
|
powershell.exe -c "winrm set winrm/config/client '@{TrustedHosts=\`"*\`"}'"
|
||||||
netsh advfirewall firewall set rule group="Windows Remote Administration" new enable=yes
|
netsh advfirewall firewall set rule group="Windows Remote Administration" new enable=yes
|
||||||
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow remoteip=any
|
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow remoteip=any
|
||||||
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v StartWinRM /t REG_SZ /f /d "cmd.exe /c 'sc config winrm start= auto & sc start winrm'"
|
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v StartWinRM /t REG_SZ /f /d "cmd.exe /c 'sc config winrm start= auto & sc start winrm'"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ if exist "C:\Users\vagrant\windows.iso" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not exist "C:\Windows\Temp\windows.iso" (
|
if not exist "C:\Windows\Temp\windows.iso" (
|
||||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.5.2/15785246/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
|
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.5.5/16285975/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
|
||||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
|
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
|
||||||
FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
|
FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
|
||||||
rd /S /Q "C:\Program Files (x86)\VMWare"
|
rd /S /Q "C:\Program Files (x86)\VMWare"
|
||||||
@@ -38,7 +38,7 @@ if exist "C:\Users\vagrant\VBoxGuestAdditions.iso" (
|
|||||||
)
|
)
|
||||||
|
|
||||||
if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
|
if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
|
||||||
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://download.virtualbox.org/virtualbox/6.1.4/VBoxGuestAdditions_6.1.4.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
|
powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://download.virtualbox.org/virtualbox/6.1.8/VBoxGuestAdditions_6.1.8.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
|
||||||
)
|
)
|
||||||
|
|
||||||
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
|
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ sed -i 's/vb.gui = true/vb.gui = false/g' Vagrantfile
|
|||||||
# Install Packer
|
# Install Packer
|
||||||
mkdir /opt/packer
|
mkdir /opt/packer
|
||||||
cd /opt/packer || exit 1
|
cd /opt/packer || exit 1
|
||||||
wget --progress=bar:force https://releases.hashicorp.com/packer/1.5.6/packer_1.5.6_linux_amd64.zip
|
wget --progress=bar:force https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
|
||||||
unzip packer_1.5.6_linux_amd64.zip
|
unzip packer_1.6.0_linux_amd64.zip
|
||||||
cp packer /usr/local/bin/packer
|
cp packer /usr/local/bin/packer
|
||||||
|
|
||||||
# Make the Packer images headless
|
# Make the Packer images headless
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ apt-get install -y linux-headers-"$(uname -r)" build-essential unzip git ufw apa
|
|||||||
pip install awscli --upgrade --user
|
pip install awscli --upgrade --user
|
||||||
cp /root/.local/bin/aws /usr/local/bin/aws && chmod +x /usr/local/bin/aws
|
cp /root/.local/bin/aws /usr/local/bin/aws && chmod +x /usr/local/bin/aws
|
||||||
|
|
||||||
wget -O VMware-Workstation-Full-15.5.2-15785246.x86_64.bundle "https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-15.5.2-15785246.x86_64.bundle"
|
wget -O VMware-Workstation-Full-15.5.6-16341506.x86_64.bundle "https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-15.5.6-16341506.x86_64.bundle"
|
||||||
chmod +x VMware-Workstation-Full-15.5.2-15785246.x86_64.bundle
|
chmod +x VMware-Workstation-Full-15.5.6-16341506.x86_64.bundle
|
||||||
sudo sh VMware-Workstation-Full-15.5.2-15785246.x86_64.bundle --console --required --eulas-agreed --set-setting vmware-workstation serialNumber $SERIALNUMBER
|
sudo sh VMware-Workstation-Full-15.5.6-16341506.x86_64.bundle --console --required --eulas-agreed --set-setting vmware-workstation serialNumber $SERIALNUMBER
|
||||||
|
|
||||||
# Set up firewall
|
# Set up firewall
|
||||||
ufw allow ssh
|
ufw allow ssh
|
||||||
@@ -47,8 +47,8 @@ sed -i 's/v.gui = true/v.gui = false/g' Vagrantfile
|
|||||||
# Install Packer
|
# Install Packer
|
||||||
mkdir /opt/packer
|
mkdir /opt/packer
|
||||||
cd /opt/packer || exit 1
|
cd /opt/packer || exit 1
|
||||||
wget --progress=bar:force https://releases.hashicorp.com/packer/1.5.6/packer_1.5.6_linux_amd64.zip
|
wget --progress=bar:force https://releases.hashicorp.com/packer/1.6.0/packer_1.6.0_linux_amd64.zip
|
||||||
unzip packer_1.5.6_linux_amd64.zip
|
unzip packer_1.6.0_linux_amd64.zip
|
||||||
cp packer /usr/local/bin/packer
|
cp packer /usr/local/bin/packer
|
||||||
|
|
||||||
# Make the Packer images headless
|
# Make the Packer images headless
|
||||||
|
|||||||
Reference in New Issue
Block a user