VMware: Deploy multiple VM’s from template with PowerCLI

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:

Final result:

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

时间: 2024-10-10 20:51:50

VMware: Deploy multiple VM’s from template with PowerCLI的相关文章

Share single RDM between multiple VM's in ESX

1.Create a VM01 on esx01,Create a VM02 on esx02 2.Create the RDM on your VM01 (using the virtual, not physical)3.Add new disk to VM02 (select existing) and point it at the vmdk that corresponds to the RDM A Raw Disk Mapping (RDM) may be used to prese

How to deploy a vm with lvm enabled

Attach a 15GB disk into the vm Check if the data disk has been attached. Verify if the attached disk could be detected by fdisk -l command. Create new physical volume on the attached disk Create a vg in pv /dev/sdc Create a volume in the vg bruce_vg

Vmware使用Kali vm镜像报错[ 2.732435]--[end Kernel panic-not syncing:corrupted stack end detect

我从kali官网(https://www.kali.org/downloads/)下载了镜像和vm的压缩包如下面两张图的红框所示 由于我使用的版本是12 pro导致在使用时出来现了如下错误: 解决方法: 试了网上很多方法后还是不行偶然发现将“硬件兼容性”更改到5.x又能正常安装镜像,于是猜想可能是我vm版本过低将vmware 12Pro更新到了15然后就可以正常使用了 原文地址:https://www.cnblogs.com/SupPilot/p/11067582.html

vmware 复制一台虚机 (vmware copy/clone vm)

今天同事问关于如何复制一台已经配置好的VM, 本人研究了一下,其实这个功能还挺好用的.主要的方法如下: 1. 选择创建虚机 2. 这步很关健,选择自定义(使用其他设备或特定的配置选项创建虚机) 3. 给虚机命一个响亮的名字 4. 选择虚机文件的目标存储,默认的即可,直接[下一步] 5. 选择虚机的版本,一般主机或集群支持多个VM版本(4, 7, 8),我们选择适合自己的,比如我的是5.5的,所以选择版本8. 6. 选择虚机的客户操作系统(这个依赖于你想clone或备份的VM) 7. 选择虚机中虚

Lesson10 vSphere 管理特性

Lesson10 vSphere 管理特性 1-使用Alarms The first tool vCenter Server provides is its alarms mechanism. The administrator can create alarms for virtual machines, hosts, networks, and datastores based on predefined triggers(预先定 义的触发器) provided with vCenter S

install Mac OS on Vmware

本文将用详尽的图文介绍如何在虚拟机中安装运行Mac OS X,只要严格地按照本教程一步步操作,即使不了解苹果电脑的读者,也能顺利地安装并运行Mac OS X. 一.准备工作 VMWare 12 Pro百度云:http://pan.baidu.com/s/1hrSuPZe 密码:7qz3360云盘:https://yunpan.cn/c67BiTFmzxpVs 访问密码 21cc Unlocker补丁工具百度云:http://pan.baidu.com/s/1pLLBnf1 密码:pcuu360云

VMWare安装Mac OS X

原文作者?谷月K?2016.08.16 18:55 字数3473 随着iPhone.iPad.Mac等苹果产品越来越火爆,越来越多的初学者想要了解和尝试苹果平台,包括苹果操作系统Mac OS X.苹果演示软件Keynote.苹果开发工具Xcode等.然而,苹果电脑价格昂贵,并不是每个人都可以承受. 因此,在Windows下安装虚拟机软件VMWare,再在虚拟机里安装苹果操作系统Mac OS X,就成了一种成本低廉的选择,使初学者可以不必支付巨额开销购置苹果电脑. 本文将用详尽的图文介绍如何在虚拟

CloudStack管理VMware遇到的问题

话说前段安装了CloudStack并使用它来管理XenServer,这回要用它来管理VMware.虽说之前遇到了大大小小的问题都解决了,但在VMware这一块还是遇到了一些麻烦. 在创建资源域.添加集群和主机.存储后,看起来一切都好好的,可系统VM死活起不来.看log发现诸如"InsuffientCapacity"之类的,可是不知道哪些资源不够(在管理XenServer时自己创建的VM起不来,曾发现是Vlan范围没有指定).再看看界面,二级存储显示的大小是0kb,但是在添加二级存储的时

Vm虚拟机安装CentOS7

(1)电脑安装Vmware虚拟机:Vm版本如图 (2)查看宿主主机是否开启CPU64位虚拟化的方法: 第一个64位表示你的电脑最多支持多少位的系统,32或者64. 第二个表示你的硬件是否支持DEP?Yes,支持.No,不支持.OFF,表示支持,但是关闭着的.(数据执行保护(DEP) 是一套软硬件技术,能够在内存上执行额外检查以帮助防止在系统上运行恶意代码.) 第三个表示你的电脑是否支持CPU虚拟化.Yes,支持.No,不支持.OFF,表示支持,但是关闭的,需手动打开.(打开方法:重启进入BIOS