New-AzGalleryImageDefinition
Katalógus képdefiníciójának létrehozása.
Syntax
New-AzGalleryImageDefinition
[-ResourceGroupName] <String>
[-GalleryName] <String>
[-Name] <String>
[-AsJob]
[-Location] <String>
-Publisher <String>
-Offer <String>
-Sku <String>
-OsState <OperatingSystemStateTypes>
-OsType <OperatingSystemTypes>
[-Description <String>]
[-DisallowedDiskType <String[]>]
[-EndOfLifeDate <DateTime>]
[-Eula <String>]
[-HyperVGeneration <String>]
[-MinimumMemory <Int32>]
[-MinimumVCPU <Int32>]
[-MaximumMemory <Int32>]
[-MaximumVCPU <Int32>]
[-PrivacyStatementUri <String>]
[-PurchasePlanName <String>]
[-PurchasePlanProduct <String>]
[-PurchasePlanPublisher <String>]
[-ReleaseNoteUri <String>]
[-Tag <Hashtable>]
[-Feature <GalleryImageFeature[]>]
[-Architecture <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Katalógus képdefiníciójának létrehozása.
Példák
1. példa: Képdefiníció létrehozása speciális Linux-rendszerképekhez
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$description = "My gallery"
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Specialized" -OsType "Linux" -Description $description
Létrehoz egy katalógusképdefiníciót, amely a speciális Linux-rendszerképek képverzióit tartalmazza.
2. példa: Képdefiníció létrehozása általános linuxos rendszerképekhez
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$description = "My gallery"
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Linux" -Description $description
Létrehoz egy katalógusképdefiníciót, amely általánosított linuxos rendszerképek képverzióit tartalmazza.
3. példa: Képdefiníció létrehozása speciális windowsos rendszerképekhez
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$description = "My gallery"
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Specialized" -OsType "Windows" -Description $description
Létrehoz egy katalógusképdefiníciót, amely a speciális windowsos rendszerképek képverzióit tartalmazza.
4. példa: Általánosított windowsos rendszerképek képdefiníciójának létrehozása és funkciók beállítása.
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$description = "My gallery"
$IsHibernateSupported = @{Name='IsHibernateSupported';Value='True'}
$IsAcceleratedNetworkSupported = @{Name='IsAcceleratedNetworkSupported';Value='False'}
$ConfidentialVMSupported = @{Name='SecurityType';Value='ConfidentialVMSupported'}
$features = @($IsHibernateSupported,$IsAcceleratedNetworkSupported, $ConfidentialVMSupported)
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Windows" -Description $description -Feature $features -HyperVGeneration "V2"
Létrehoz egy katalógus képdefinícióját, amely általánosított windowsos rendszerképek képverzióit tartalmazza.
5. példa: Képdefiníció létrehozása tervadatokkal
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$purchasePlanName = "myPlanName"
$purchasePlanProduct = "myPlanProduct"
$purchasePlanPublisher = "myPlanPublisher"
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Linux" -PurchasePlanName $purchasePlanName -PurchasePlanProduct $purchasePlanProduct -PurchasePlanPublisher $purchasePlanPublisher
Létrehoz egy katalógusképdefiníciót a linuxos általánosított rendszerképekhez, és meghatározza a csomag nevét, a terméket és a közzétevőt. Ehhez a definícióhoz csak a tervadatoknak megfelelő képverziók vehetők fel.
6. példa: Képdefiníció létrehozása és az élettartam végét jelző dátum
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$endOfLifeDate = "2024-08-02T00:00:00+00:00"
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Linux" -EndOfLifeDate $endOfLifeDate
Ebben a példában a képdefiníciók élettartamának lejárati dátuma 2024. augusztus 2., mignight UTC időpontban van megadva. A képdefiníciókhoz és a képverziókhoz megadható az élettartam lejárati dátuma. A képdefiníciók az élettartam lejárta után is használhatók.
7. példa: Hozzon létre egy képdefiníciót, és javasolja a processzor és a memória minimális és maximális használatát (GB)
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$minMemory = 32
$maxMemory = 128
$minVCPU = 2
$maxVCPU = 8
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Linux" -MinimumMemory $minMemory -MaximumMemory $maxMemory -MinimumVCPU $minVCPU -MaximumVCPU $maxVCPU
Létrehoz egy katalógus képdefinícióját, és javasolja a processzor és a memória minimális és maximális tartományát, amelyet a képdefiníció képverziói támogatnak. A rendszerképverziók továbbra is használhatók memória- és vCPU-beállításokkal rendelkező virtuális gépek létrehozására az ajánlott tartományokon kívül.
8. példa: Hozzon létre egy képdefiníciót, és jelezze, hogy mely operációsrendszer-lemeztípusok nem ajánlottak a lemezképhez
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$disallowedDiskTypes = @("Standard_LRS")
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Linux" -DisallowedDiskType $disallowedDiskTypes
Létrehoz egy katalógusképdefiníciót, és jelzi, hogy mely operációsrendszer-lemeztípusok nem kompatibilisek a képdefiníción belüli képverziókkal. A rendszerképverziók továbbra is használhatók olyan operációsrendszer-lemezzel rendelkező virtuális gépek létrehozására, amelyek egyike a nem engedélyezett lemeztípusoknak.
9. példa: Hozzon létre egy képdefiníciót, és adja meg az EULA-t, az adatvédelmi nyilatkozat URI-ját és a kibocsátási megjegyzések URI-ját
$rgName = "myResourceGroup"
$galleryName = "myGallery"
$galleryImageDefinitionName = "myImage"
$location = "eastus"
$publisherName = "GreatPublisher"
$offerName = "GreatOffer"
$skuName = "GreatSku"
$eula = "https://myeula"
$privacyStatementUri = "https://mystatement"
$releaseNoteUri = "https://myreleasenotes"
New-AzGalleryImageDefinition -ResourceGroupName $rgName -GalleryName $galleryName -Name $galleryImageDefinitionName -Location $location -Publisher $publisherName -Offer $offerName -Sku $skuName -OsState "Generalized" -OsType "Linux" -Eula $eula -PrivacyStatementUri $privacyStatementUri -ReleaseNoteUri $releaseNoteUri
Létrehoz egy katalógusképdefiníciót a linuxos általánosított képekhez, és megadja az EULA-szerződés sztringét vagy elérési útját, az adatvédelmi nyilatkozatot és a képdefiníció összes képverziójára vonatkozó kibocsátási megjegyzést.
Paraméterek
-Architecture
Operációsrendszer-lemez által támogatott CPU-architektúra. Lehetséges értékek: "X64" és "Arm64".
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AsJob
Parancsmag futtatása a háttérben
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Jóváhagyást kér a parancsmag futtatása előtt.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Az Azure-ral való kommunikációhoz használt hitelesítő adatok, fiók, bérlő és előfizetés.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
A katalógus képdefiníciós erőforrásának leírása.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DisallowedDiskType
A nem engedélyezett lemeztípusok.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-EndOfLifeDate
A katalógus képdefiníciójának lejárati dátuma
Type: | DateTime |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Eula
A katalógus képdefiníciójának Eula-szerződése.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Feature
A katalógus képfunkcióinak listája.
Type: | GalleryImageFeature[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GalleryName
A katalógus neve.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-HyperVGeneration
A virtuális gép hipervizor-generációja. Csak operációsrendszer-lemezekre alkalmazható. Az engedélyezett értékek a V1 és a V2.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Location
Erőforrás helye
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaximumMemory
Az ajánlott memória maximális száma
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MaximumVCPU
Az ajánlott processzormag maximális száma
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MinimumMemory
Az ajánlott memória minimális száma
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MinimumVCPU
Az ajánlott processzormag minimális értéke
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
A katalógus képdefiníciójának neve.
Type: | String |
Aliases: | GalleryImageDefinitionName |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Offer
A katalógus képdefiníciós ajánlatának neve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-OsState
Az operációs rendszer állapota
Type: | OperatingSystemStateTypes |
Accepted values: | Generalized, Specialized |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-OsType
Az operációs rendszer típusa
Type: | OperatingSystemTypes |
Accepted values: | Windows, Linux |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PrivacyStatementUri
Az adatvédelmi nyilatkozat uri.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Publisher
A katalógus képdefiníció-közzétevőjének neve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PurchasePlanName
A vásárlási csomag azonosítója.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PurchasePlanProduct
A vásárlási csomag termékazonosítója.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PurchasePlanPublisher
A vásárlási csomag közzétevői azonosítója.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ReleaseNoteUri
A kibocsátási megjegyzés uri.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ResourceGroupName
Az erőforráscsoport neve.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Sku
A katalógus képdefiníciós termékváltozatának neve.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Erőforráscímkék
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Bemutatja, mi történne a parancsmag futtatásakor. A parancsmag nem fut.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Bevitelek
String[]
Kimenetek
Visszajelzés
https://aka.ms/ContentUserFeedback.
Hamarosan elérhető: 2024-ben fokozatosan kivezetjük a GitHub-problémákat a tartalom visszajelzési mechanizmusaként, és lecseréljük egy új visszajelzési rendszerre. További információ:Visszajelzés küldése és megtekintése a következőhöz: