vMware 5.5 利用vcenter的powershell 批量创建虚拟机
2016-05-03 17:13
489 查看
vMware 5.5 利用vcenter的powershell 批量创建虚拟机
第一步:登录vcenter服务器,打开powershell,执行C:\Program Files (x86)\VMware|Infrastructure\vSphere PowerCLI>Connect-VIServer -Server 123.123.123.123 -username "administrator@vsphere.local" -password "passwd"
第二步:执行C:\Program Files (x86)\VMware|Infrastructure\vSphere PowerCLI>foreach ($i in 1..10){ New-vm -vmhost 123.123.123.111 -Name aaa+$i -Template aaa_tpl -Datastore "bigstore"}
注释:
(1)123.123.123.123 是venter服务器的ip地址。
(2)123.123.123.111是实际上跑虚拟机的vsphere 服务器的ip地址。
(3)aaa+$i 是虚拟机在列表中的名字。
(4)aa_tpl 是批量创建时使用到的模板。
(5)bigstore是批量创建时使用的存储阵列名字。
第一步:登录vcenter服务器,打开powershell,执行C:\Program Files (x86)\VMware|Infrastructure\vSphere PowerCLI>Connect-VIServer -Server 123.123.123.123 -username "administrator@vsphere.local" -password "passwd"
第二步:执行C:\Program Files (x86)\VMware|Infrastructure\vSphere PowerCLI>foreach ($i in 1..10){ New-vm -vmhost 123.123.123.111 -Name aaa+$i -Template aaa_tpl -Datastore "bigstore"}
注释:
(1)123.123.123.123 是venter服务器的ip地址。
(2)123.123.123.111是实际上跑虚拟机的vsphere 服务器的ip地址。
(3)aaa+$i 是虚拟机在列表中的名字。
(4)aa_tpl 是批量创建时使用到的模板。
(5)bigstore是批量创建时使用的存储阵列名字。
相关文章推荐
- SHELL syntax error:unexpected end of file 提示错误
- 初步认识shell
- shell 中的单行注释和多行注释
- Calabash-android环境搭建
- Vim插件:Conque Shell,在vim中打开终端的功能
- Shell典型应用Nginx之应用日志分析
- XSHELL 5 退格键不能用,删除会有乱码,按截图设置
- Linux IP代理筛选系统(shell+proxy)
- Win10 Bash初体验
- Linux常用工具之XFTP、Xshell配置
- shell之curl用法笔记
- 06- Shell脚本学习--其它
- linux shell自定义函数(定义、返回值、变量作用域)介绍
- 希尔排序(Shell Sort)
- shell中各种括号的作用()、(())、[]、[[]]、{}
- 启动、关闭外部进程ShellExecute() 、CreateProcess()、TerminateProcess()、OpenProcess()==
- 用shell脚本模拟用户按键、触摸操作
- centos 下用shell脚本启动jar包
- shell中循环监控MQ当前深度
- shell脚本:cp某个目录下筛选(find)后的某些文件到另一个目录