博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
VMware: Deploy multiple VM’s from template with PowerCLI
阅读量:4359 次
发布时间:2019-06-07

本文共 2182 字,大约阅读时间需要 7 分钟。

Last week I was working on a new project, they asked me to install 5 new fileservers based on Windows 2008R2, I installed a new VM and converted it to a template, next I configured a template in “Customization Specifications Manager” with the following details:

Customization template:

Registration information: name company

Computer name: Use the virtual machine name (important)

Product key: Didn’t need it because I’ve configured KMS

Password: Company default local administrator password, selected: Automatically login as the Administrator: 2

Timezone: GMT+0100 (Amsterdam)

Runonce: none

Network: Typical settings

Workgroup or Domain: selected to auto join the domain with domain administrator credentials + domain name (important)

Operation System Options: Selected: Generate New Security ID (SID)

VM template settings:

Hard disk: 40 GB with only OS configured with company standard policy

VMware tools: Latest, this must be installed for Specification Template and NIC

Network: VMXNET3 (needed VMware Tools for driver)

Script: (saved as: FileserverDeploy.ps1)

-vmhost = Target host;

-Name = Name of new VM;

-Template: From wich template you want to deploy the new VM;

-Datastore: Target datastore to place the new VM;

-OSCustomizationspec = Wich “prep” template you want to deploy the new VM;

1
2
3
4
5
New
-vm
-vmhost
esx04.vmpros.local
-Name
FS-SVR01
-Template
WIN2008R2_Template
-Datastore
datastore2
-OSCustomizationspec
WIN2008R2_Template
New
-vm
-vmhost
esx04.vmpros.local
-Name
FS-SVR02
-Template
WIN2008R2_Template
-Datastore
datastore2
-OSCustomizationspec
WIN2008R2_Template
New
-vm
-vmhost
esx04.vmpros.local
-Name
FS-SVR03
-Template
WIN2008R2_Template
-Datastore
datastore2
-OSCustomizationspec
WIN2008R2_Template
New
-vm
-vmhost
esx04.vmpros.local
-Name
FS-SVR04
-Template
WIN2008R2_Template
-Datastore
datastore2
-OSCustomizationspec
WIN2008R2_Template
New
-vm
-vmhost
esx04.vmpros.local
-Name
FS-SVR05
-Template
WIN2008R2_Template
-Datastore
datastore2
-OSCustomizationspec
WIN2008R2_Template

PowerCLI:

Running the script:

image

image

image

Final result:

image

The 5 fileservers deployed from template and joined the domain.. great!

转载于:https://www.cnblogs.com/chinajsks/p/4554151.html

你可能感兴趣的文章
那些美到极致的语言!
查看>>
Xamarin的不归路-ios模拟器没有键盘
查看>>
【云笔记】群晖DS218+ NoteStation 折腾
查看>>
jdk安装配置
查看>>
四、RocketMq简单的消费者和生产者(示例代码)
查看>>
json介绍
查看>>
Maven编译unmappable character for encoding Cp1252问题
查看>>
xftp上传文件失败,执行程序发现磁盘满了:No space left on device
查看>>
duplicate symbols for architecture i386 问题?
查看>>
[BZOJ]1027 合金(JSOI2007)
查看>>
poj 1696 Space Ant (几何 : 叉积 应用 + dfs)
查看>>
MySQL:按前缀批量删除表格
查看>>
Route学习笔记之Area的Route注册
查看>>
构建之法--软件工程师自我测评表
查看>>
电子书搜索
查看>>
SQO2008配置管理工具服务显示远程过程调用失败
查看>>
【HDOJ】1009 FatMouse' Trade
查看>>
[Node.js]在windows下不得不防的小错误
查看>>
Java命令运行class文件,报“找不到或无法加载主类”错误
查看>>
docker-compose 部署 Redis
查看>>