hgxfg9

人生若只如初见,何事秋风悲画扇。

0%

使用脚本下载最新的ESXI

使用脚本下载最新的ESXI

要求

  • 装有 Powershell 2.0 或更新版本的 Windows 计算机(XP 或更新版本)
  • VMware PowerCLI 5.1 或更高版本

ESXi-Customizer-PS 是您从 Powershell 或 PowerCLI 控制台窗口中启动的 Powershell 脚本。它接受各种命令行选项。其中之一是-help,它将显示此帮助屏幕:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
C:\Desktop> .\ESXi-Customizer-PS.ps1 -help

This is ESXi-Customizer-PS Version 2.8.1 (visit https://ESXi-Customizer-PS.v-front.de for more information!)

Usage:
ESXi-Customizer-PS [-help] | [-izip <bundle> [-update]] [-sip] [-v70|-v67|-v65|-v60|-v55|-v51|-v50]
[-ozip] [-pkgDir <dir>[,...]] [-outDir <dir>] [-vft] [-dpt depot1[,...]]
[-load vib1[,...]] [-remove vib1[,...]] [-log <file>] [-ipname <name>]
[-ipdesc <desc>] [-ipvendor <vendor>] [-nsc] [-test]

Optional parameters:
-help : display this help
-izip <bundle> : use the VMware Offline bundle <bundle> as input instead of the Online depot
-update : only with -izip, updates a local bundle with an ESXi patch from the VMware Online depot,
combine this with the matching ESXi version selection switch
-pzip : use an Offline patch bundle instead of the Online depot with -update.
-pkgDir <dir>[,...]: local directories of Offline bundles and/or VIB files to add (if any, no default)
-ozip : output an Offline bundle instead of an installation ISO
-outDir <dir> : directory to store the customized ISO or Offline bundle (the default is the
script directory. If specified the log file will also be moved here.)
-vft : connect the V-Front Online depot
-dpt depot1[,...] : connect additional Online depots by URL or local Offline bundles by file name
-load vib1[,...] : load additional packages from connected depots or Offline bundles
-remove vib1[,...] : remove named VIB packages from the custom Imageprofile
-sip : select an Imageprofile from the current list
(default = auto-select latest available standard profile)
-v70 |
-v67 | -v65 | -v60 |
-v55 | -v51 | -v50 : Use only ESXi 7.0/6.7/6.5/6.0/5.5/5.1/5.0 Imageprofiles as input, ignore other versions
-nsc : use -NoSignatureCheck with export
-log <file> : Use custom log file <file>
-ipname <name>
-ipdesc <desc>
-ipvendor <vendor> : provide a name, description and/or vendor for the customized
Imageprofile (the default is derived from the cloned input Imageprofile)
-test : skip package download and image build (for testing)

基本上该脚本具有三种不同的操作模式:

  1. 从 VMware Online depot(标准模式)创建 ESXi 安装 ISO 或 Offline Bundle
  2. 从本地 ESXi 脱机包创建 ESXi 安装 ISO 或脱机包(*-izip*模式)
  3. 使用 VMware Online depot 中的 ESXi 补丁包更新本地 ESXi Offline Bundle(*-izip -update*模式)

通过这三种模式,您可以选择从 V-Front 在线仓库、任何其他在线仓库(通过 URL)或本地存储的离线捆绑包和 VIB 文件(例如下载的驱动程序或软件包)添加捆绑包。

开始使用

1、以管理员身份运行PowerShell,安装VMware PowerCLI

1
Install-Module -Name VMware.PowerCLI

2、下ESXi-Customizer-PS.ps1

3、使用PowerShell运行脚本

1
.\ESXi-Customizer-PS.ps1

4、部分人运行PowerShell脚本.ps1时提示没有权限,需要设置执行权限

1
set-executionpolicy remotesigned 

使用实例

1、最简单的使用方法,下载最新的ESXI版本,ISO 文件将在脚本目录中创建

1
.\ESXi-Customizer-PS.ps1

可以使用以下一个或多个参数来修改下载的版本:

  • -v50:创建最新的 ESXi 5.0 ISO
  • -v51:创建最新的 ESXi 5.1 ISO
  • -v55 :创建最新的 ESXi 5.5 ISO
  • -v60 :创建最新的 ESXi 6.0 ISO
  • -v65 :创建最新的 ESXi 6.5 ISO
  • -v67 :创建最新的 ESXi 6.7 ISO
  • -v70 :创建最新的 ESXi 7.0 ISO
  • -outDir:将 ISO 文件写入自定义目录。如果使用此命令,则脚本的日志文件也将移至此处,并以 Imageprofile 名称和时间戳命名。
  • -sip:不自动下载最新的ESXI版本(=补丁级别),而是在菜单中显示所有版本并选择一个特定的。菜单将以发布日期进行排序。它还将列出仅包含安全修复和/或不包含 VMware Tools 的ISO配置文件。
  • -ozip:不输出安装 ISO,而是输出 ESXi Offline Bundle,可用于导入更新管理器、使用 esxcli 进行命令行修补或作为进一步自定义的输入

2、 使用 ESXi Offline Bundle 作为输入(而不是 VMware Online depot):

1
.\ESXi-Customizer-PS.ps1 -izip .\VMware-ESXi-6.0.0-2494585-depot.zip

ESXi Offline Bundles 可以从VMware Patch Download 门户下载。一些硬件供应商(例如 HP和Dell)还提供他们定制的 ESXi 版本作为离线包(这些可以在 vSphere 下载页面上找到),最终可以使用此脚本创建自己的定制的 ESXi 离线包

3、从在线仓库添加额外的包

1
.\ESXi-Customizer-PS.ps1 -v55 -load net-r8168,net-r8169,net-sky2

此脚本调用将构建最新的 ESXi 5.5 安装 ISO,其中添加了 ESXi 5.5 中删除的 NIC 驱动程序。这些软件包仍在 VMware Online Depot 中,因为它们是所有 ESXi 5.0 和 5.1 映像配置文件的一部分,并且脚本只是将它们重新添加到最新的 ESXi 5.5 映像配置文件中

4、添加本地离线包和/或 VIB 文件

1
.\ESXi-Customizer-PS.ps1 -pkgDir C:\temp\pkg

此命令将添加存储在目录C:\temp\pkg中的所有离线包和 VIB 文件。通过这种方式,可以添加第三方或者社区支持的设备驱动程序和软件包

-------- 本文结束 感谢阅读 --------
你的鼓励是我更新的动力!