Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ESXiのオフラインバンドルから、ISO イメージファイルをエクスポート。
# Usage:
# PowerCLI> .\export_esxi-offline-bundle_to_iso.ps1 <Offline_Bundle.zip> <Export_Dir>
$offline_bundle_path = $args[0]
$export_dir = $args[1]
Add-EsxSoftwareDepot $offline_bundle_path | Out-Null
Get-EsxImageProfile | where {$_.Name -notmatch "s-standard|-no-tools"} | % {
$img_profile = $_
$img_profile_name = $img_profile.Name
$iso_file_name = Join-Path $export_dir ($img_profile_name + ".iso")
Write-Host "Export ISO File: $iso_file_name"
Export-EsxImageProfile $img_profile -ExportToIso -FilePath $iso_file_name
}
@gowatana

This comment has been minimized.

Copy link
Owner Author

commented Feb 2, 2018

実行例。

PowerCLI> ls | select Name,Length

Name                                     Length
----                                     ------
ESXi650-201712001.zip                 478519869
export_esxi-offline-bundle_to_iso.ps1       502


PowerCLI> .\export_esxi-offline-bundle_to_iso.ps1 .\ESXi650-201712001.zip D:\work\
Export ISO File: D:\work\ESXi-6.5.0-20171204001-standard.iso
@gowatana

This comment has been minimized.

Copy link
Owner Author

commented Feb 2, 2018

下記の投稿むけ。

ESXi のオフライン バンドルから ISO イメージ ファイルを作成してみる。
https://communities.vmware.com/people/gowatana/blog/2018/02/02/offline-bundle-to-iso

@gowatana

This comment has been minimized.

Copy link
Owner Author

commented Oct 8, 2018

PowerCLI 10.x でも大丈夫なはず。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.