-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathInstall-ScaleIT-VM.bat
39 lines (30 loc) · 1.24 KB
/
Install-ScaleIT-VM.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
rem ***************************************
rem *** ScaleIT I40 Installations-Skript
rem ***
rem *** (C) 2019, Ondics GmbH
rem ***************************************
set installpath=C:\Program Files\Oracle\VirtualBox\VBoxManage.exe
set natname=ScaleITNAT
"%installpath%" natnetwork add --netname %natname% --network "10.0.2.0/24" --enable
"%installpath%" natnetwork list
"%installpath%" hostonlyif create > .temp.txt
set /p result=<.temp.txt
set adaptername=%result:~11,-26%
echo %adaptername%
"%installpath%" hostonlyif ipconfig "%adaptername%" --ip 10.0.3.10 --netmask 255.255.255.0
echo importieren...
"%installpath%" import "ScaleIT-CE VM.ova" --vsys 0 --eula accept > .temp1.txt
findstr "^[0-9]*.*Suggested\sVM name.*" .temp1.txt > .temp2.txt
set /p result=<.temp2.txt
set machinename=%result:~23,-1%
echo %machinename%
"%installpath%" modifyvm "%machinename%" --nat-network1 "%natname%"
"%installpath%" modifyvm "%machinename%" --nic1 natnetwork
"%installpath%" modifyvm "%machinename%" --hostonlyadapter2 "%adaptername%"
"%installpath%" modifyvm "%machinename%" --nic2 hostonly
echo ----Erfolgreich eingerichtet----
del /f .temp.txt
del /f .temp1.txt
del /f .temp2.txt
echo ----Einrichtung abgeschlossen----
"%installpath%" startvm "%machinename%"