瞭解 ImageProfileSoftwarePackageImageProfileDiff 物件的結構有助於管理部署和升級程序。

ImageProfile 物件內容

ImageProfile 物件 (可透過 Get-EsxImageProfilePowerCLI cmdlet 存取) 具有下列內容。

名稱 類型 說明
AcceptanceLevel AcceptanceLevel 決定可以新增到設定檔的 VIB。程度包括 VMwareCertified、VMwareAccepted、PartnerSupported 和 CommunitySupported。請參閱 接受程度
Author System.String 建立設定檔的人員。不超過 60 個字元。
CreationTime System.DateTime 建立時間的時間戳記。
說明 System.String 設定檔完整文字說明。無長度限制。
GUID System.String 映像設定檔的全域唯一識別碼。
ModifiedTime System.DateTime 上次修改時間的時間戳記。
名稱 System.String 映像設定檔的名稱。不超過 80 個字元。
ReadOnly System.Boolean 設定為 true 時,無法編輯設定檔。使用 Set-EsxImageProfile -Readonly 可將自訂映像設定檔設為唯讀。
規則 ImageProfileRule[] 映像設定檔可能具有的任何 OEM 硬體需求和限制。vSphere Auto Deploy 在部署映像設定檔時會確認此內容的值,並在有相符硬體可用時部署設定檔。
廠商 System.String 發佈設定檔的組織。不超過 40 個字元。
VibList SoftwarePackage[] 映像所包含的 VIB 識別碼的清單。

SoftwarePackage 物件內容

準備映像設定檔時,您可以檢查軟體套件來判定適合包含的套件。SoftwarePackage 物件具有下列內容。

名稱 類型 說明
AcceptanceLevel AcceptanceLevel 此 VIB 的接受程度。
衝突 SoftwareConstraint[] 不能與此 VIB 同時安裝的 VIB 的清單。每個限制皆採用下列格式:

package-name[<<|<=|=|>=|<< version]

Depends SoftwareConstraint[] 必須與此 VIB 同時安裝的 VIB 的清單。與 Conflicts 內容的限制格式相同。
說明 System.String VIB 的詳細說明。
Guid System.String VIB 的唯一識別碼。
LiveInstallOk System.Boolean 如果支援即時安裝此 VIB,則為 true。
LiveRemoveOk System.Boolean 如果支援即時移除此 VIB,則為 true。
MaintenanceMode System.Boolean 如果在安裝此 VIB 時主機必須處於維護模式,則為 true。
名稱 System.String VIB 的名稱。通常用於唯一說明執行中 ESXi 系統上的套件。
Provides SoftwareProvides 此 VIB 提供的虛擬套件或介面的清單。請參閱 SoftwareProvide 物件內容
ReferenceURLs SupportReference[] 包含詳盡支援資訊的 SupportReference 物件清單。SupportReference 物件具有 TitleURL 兩個內容,它們的類型皆為 System.String
Replaces SoftwareConstraint[] SoftwareConstraint 物件清單,用於識別取代此 VIB 或使其過時的 VIB。VIB 會自動取代名稱相同但版本較低的 VIB。
ReleaseDate System.DateTime VIB 發佈或發行的日期和時間。
SourceUrls System.String[] 可下載此 VIB 之來源 URL 的清單。
StatelessReady System.Boolean 如果套件支援主機設定檔或使其適合與 vSphere Auto Deploy 結合使用的其他技術,則為 true。
摘要 System.String VIB 的單行摘要。
標籤 System.String[] 廠商或發佈者為此套件定義的一組字串標籤。這些標籤可用於識別套件的特性。
廠商 System.String VIB 廠商或發佈者。
版本 System.String VIB 版本。
VersionObject Software.Version VersionObject 內容屬於 SoftwareVersion 類型。SoftwareVersion 類別會實作靜態 Compare 方法來比較兩個版本字串。請參閱SoftwareVersion 物件內容

ImageProfileDiff 物件內容

執行 Compare-EsxImageProfile cmdlet 時,您可以傳遞兩個參數:首先傳遞參考設定檔,然後是比較設定檔。cmdlet 會傳回 ImageProfileDiff 物件,該物件具有下列內容。

名稱 類型 說明
CompAcceptanceLevel System.String 傳遞到 Compare-EsxImageProfile 的第二個設定檔的接受程度。
DowngradeFromRef System.String[] 第二個設定檔中包含的從第一個設定檔中的 VIB 降級的 VIB 的清單。
Equal System.Boolean 如果兩個映像設定檔具有相同的套件和接受程度,則為 True
OnlyInComp System.String 僅在傳遞到 Compare-EsxImageProfile 的第二個設定檔中找到的 VIB 的清單。
OnlyInRef System.String[] 僅在傳遞到 Compare-EsxImageProfile 的第一個設定檔中找到的 VIB 的清單。
PackagesEqual System.Boolean 如果映像設定檔具有相同的 VIB 套件組,則為 True
RefAcceptanceLevel System.String 傳遞到 Compare-EsxImageProfile 的第一個設定檔的接受程度。
UpgradeFromRef System.String[] 第二個設定檔中包含的從第一個設定檔中的 VIB 升級的 VIB 的清單。

SoftwareVersion 物件內容

SoftwareVersion 物件可讓您比較兩個版本字串。物件包括靜態 Compare 方法,即接受兩個字串做為輸入,如果第一個版本字串高於第二個版本字串,則傳回 1。如果兩個版本字串相等,Compare 會傳回 0。如果第二個版本字串高於第一個字串,Compare 會傳回 -1。該物件具有下列內容。

名稱 類型 描述
版本 System.String 版本中連字號之前的部分。此部分用於指示主要版本。
Release System.String 版本中連字號之後的部分。此部分用於指示發行版本。

SoftwareConstraint 物件內容

SoftwareConstraint 物件會實作 MatchesProvide 方法。該方法接受 SoftwareProvidesSoftwarePackage 物件做為輸入,如果 constraint 符合 SoftwareProvideSoftwarePackage,則傳回 True,否則傳回 False

SoftwareConstraint 物件包括下列內容。

名稱 類型 描述
名稱 System.String constraint 的名稱。此名稱應該與對應的 SoftwareProvideName 內容相符。
Relation System.String 列舉或下列其中一個比較指示器:<<、<=、=、>=、>>。如果 constraint 不具有 RelationVersion 內容,則此內容可能為 $null。
版本 System.String 要與 constraint 進行比對的版本。如果 constraint 不具有 RelationVersion 內容,則此內容可能為 $null。
VersionObject SoftwareVersion SoftwareVersion 物件表示的版本。

SoftwareProvide 物件內容

SoftwareProvide 物件包括下列內容。

名稱 類型 描述
名稱 System.String provide 的名稱。
版本 System.String provide 的版本。如果 provide 未指定版本,則可能為 $null。
Release System.String provide 的版本由 SoftwareVersion 物件表示。請參閱 SoftwareVersion 物件內容