zoukankan      html  css  js  c++  java
  • 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:

    image

    image

    image

    Final result:

    image

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

  • 相关阅读:
    js 百度地图和谷歌地图的选择
    angular4 自定义表单验证Validator
    推荐20个很有帮助的 Web 前端开发教程
    前端同学大福利,最全的面试题目整理
    前端开发:如何写一手漂亮的 Vue
    推荐20个很有帮助的 Web 前端开发教程
    面试分享:一年经验初探阿里巴巴前端社招
    想成为一个高效的Web开发者吗?来看看大牛分享的经验吧~ #精选JAVASCRIPT前端开发
    初学者Web介绍一些前端开发中的基本概念用到的技术
    Web设计新手应知道的10个锦囊妙计
  • 原文地址:https://www.cnblogs.com/chinajsks/p/4554151.html
Copyright © 2011-2022 走看看