-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathESXi-7.0U2-17630552-standard.ps
74 lines (54 loc) · 4.02 KB
/
ESXi-7.0U2-17630552-standard.ps
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Set execution policy to allow script execution
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
# Check if VMware.PowerCLI module is imported
if (-not (Get-Module -Name VMware.PowerCLI)) {
Install-Module -Name VMware.PowerCLI -SkipPublisherCheck
}
##############################################################################
# Configuration Settings
##############################################################################
# Disable Customer Experience Improvement Program participation
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
# Set Python path for VMware PowerCLI (specific to Python 3.7 compatibility)
Set-PowerCLIConfiguration -PythonPath "c:\python37\python.exe" -Scope User
##############################################################################
# Fetch ESXi Image Depot for 7.0 Update 2
##############################################################################
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
# Optional: List available image profiles for 7.0 Update 2 (adjust version accordingly)
# Get-EsxImageProfile | Where-Object {$_.Name -like "ESXi-7.0U2*"}
# Download desired ESXi image profile bundle for 7.0 Update 2
Export-ESXImageProfile -ImageProfile "ESXi-7.0U2-17630552-standard" -ExportToBundle -filepath ESXi-7.0U2-17630552-standard.zip
# Remove the depot from configuration
Remove-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
# Add the downloaded base ESXi image files to the installation media
Add-EsxSoftwareDepot .\ESXi-7.0U2-17630552-standard.zip
##############################################################################
# Download Additional Drivers
##############################################################################
# Get community network driver (from VMware Fling for ESXi 7.0U2)
Invoke-WebRequest -Uri https://download3.vmware.com/software/vmw-tools/community-network-driver/Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip -OutFile Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip
# Get USB NIC driver for ESXi 7.0U2 (from VMware Fling)
Invoke-WebRequest -Uri https://download3.vmware.com/software/vmw-tools/USBNND/ESXi702-VMKUSB-NIC-FLING-40599856-component-17078334.zip -OutFile ESXi702-VMKUSB-NIC-FLING-40599856-component-17078334.zip
##############################################################################
# Add the Additional Drivers
##############################################################################
# Add community network driver to depot
Add-EsxSoftwareDepot .\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip
# Add USB NIC driver to depot
Add-EsxSoftwareDepot .\ESXi702-VMKUSB-NIC-FLING-40599856-component-17078334.zip
##############################################################################
# Create a New Custom Image Profile with Additional Drivers
##############################################################################
# Create a new custom profile for ESXi 7.0 Update 2 with network drivers
New-EsxImageProfile -CloneProfile "ESXi-7.0U2-17630552-standard" -name "ESXi-7.0U2-17630552-standard-Net-Drivers" -Vendor "homelab"
# Optional: Remove existing network driver (example for ne1000)
# Remove-EsxSoftwarePackage -ImageProfile "ESXi-7.0U2-17630552-standard-Net-Drivers" -SoftwarePackage "ne1000"
# Add community network driver package to custom profile
Add-EsxSoftwarePackage -ImageProfile "ESXi-7.0U2-17630552-standard-Net-Drivers" -SoftwarePackage "net-community"
# Add USB NIC driver package to custom profile
Add-EsxSoftwarePackage -ImageProfile "ESXi-7.0U2-17630552-standard-Net-Drivers" -SoftwarePackage "vmkusb-nic-fling"
##############################################################################
# Export the Custom Image Profile to ISO
##############################################################################
Export-ESXImageProfile -ImageProfile "ESXi-7.0U2-17630552-standard-Net-Drivers" -ExportToIso -filepath ESXi-7.0U2-17630552-standard-Net-Drivers.iso