Login

AUTOVM Blog > Update > Add Windows se…

Add Windows server 2022 to AutoVM

By Alireza Mahdavi | 10 July 2022 | 1878 views

Add Windows server 2022 to AutoVM

Download and deploy the Windows 2022 template from LAB into your VCenter.
Go to the AutoVM admin area, and go to “Template > list templates”
Click on create button, and enter the fields below:

Name: Windows 2022 64
Username: administrator
Password: 123QWEqwe
Clue: windows_2022_64
Icon: windows
Status: Active

Click on Save and go to “Template > List scripts”
Click on Create button and enter the input below:

Name: Setup
Template: Windows 2022 64
Type: Setup
Where Is Program: cmd.exe
Where To Upload: c:\setup.bat
How to Execute: /c c:\setup.bat
Status: Active
Content:

@echo off

:: SETUP NETWORK
for /f "skip=2 tokens=3*" %%a in ('netsh int show int') do (

  netsh int ip set address "%%b" static @address @netmask @gateway 1
  netsh int ip set dns name="%%b" static 8.8.8.8
  netsh int ip add dns name="%%b" 4.2.2.4
)

:: COMPUTER NAME
wmic computersystem where name="%computername%" call rename name="%random%"

:: WRITE FILE
echo list volume > C:\disk.txt

:: FIND IDENTITY
for /f "skip=8 tokens=2,3" %%a in ('diskpart /s C:\disk.txt') do (

  :: IT MUST BE DRIVE C:\
  if %%b==C (

    :: WRITE FILE
    echo select volume %%a > C:\disk.txt & echo extend >> C:\disk.txt

    :: EXTEND DISK
    diskpart /s C:\disk.txt
  )
)

:: CHANGE PASSWORD
net user @username @password

:: LICENSE
slmgr.vbs //b -dlv
slmgr.vbs //b -rearm

:: DELETE FILE
del C:\disk.txt

:: DELETE FILE
del C:\setup.bat

Click on Save and try to install VM with Windows 2022 server OS.

Related Blogs

Discover Caasify: A Smarter Way to sell Cloud Services

Why Web Hosting Companies need to join Caasify to Resell Cloud Services As demand for cloud infrastructure continues to grow, web hosting companies are […]

RockyLinux 9.1 is available

AlmaLinux version 9.1 has been released for the AutoVM platform. Download and deploy OVA templates into your servers through this address. Then go to […]

AlmaLinux 9.1 is available

AlmaLinux version 9.1 has been released for the AutoVM platform. Download and deploy OVA templates into your servers through this address. Then go to […]

Subscription for email

Future-proof your business by moving to AutoVM