Create VMware virtual machines in batches with Git-bash

Source: Internet
Author: User

#cd e:/Interim Framework/
#sh new\ 3.bash

#删除快照
#vmrun-t ws deletesnapshot "f:/interim Architecture/templating Machine" VM11

#进入虚拟机安装位置 (where Vmrun.exe is located)
CD c:/' program Files (x86) '/vmware/' VMware VIX '

#关闭虚拟机
Vmrun-t ws Stop "f:/Interim Architecture/template machine/template machine. VMX"
Sleep 10

#给虚拟机创建快照, named Vm11
Vmrun-t ws Snapshot "f:/Interim architecture/template machine/template machine. VMX" VM11

#利用for循环, bulk cloning of virtual machines (connection clones)
For i in ' seq 5 ';
Do
Vmrun.exe-t ws clone "f:/Interim Architecture/template machine/template machine. VMX" f:/vms-2018/$i/$i. VMX linked-snapshot=vm11-clonename= $i;
Done

#利用for循环, batch turn on virtual machines
For i in ' seq 5 ';
Do
Vmrun.exe-t ws start f:/vms-2018/$i/$i. VMX
Ping-n 127.0.0.1 >nul;
Done

#利用for循环, bulk shutdown of virtual machines
#for i in ' seq 5 ';
#do
#vmrun. exe-t ws Stop f:/vms-2018/$i/$i. VMX
#ping-N-127.0.0.1 >nul;
#done

Create VMware virtual machines in batches with Git-bash

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.