Azure Image Builder - Create and Deploy an Image Template

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ก.ค. 2024
  • This is part two of a three-part series on Azure Image Builder. In this video, we create and deploy and Azure Image Builder template that adds AzCopy to the using PoweShell. After that, we build an image from the template and use it to create a new Azure Virtual Machine. This example uses Windows 10 Multi-user as the source of the image build.
    Zero to Hero with Windows Virtual Desktop
    www.udemy.com/course/zero-to-...
    GitHub Page
    github.com/tsrob50/AIB
    ARM JSON formatting
    www.ciraltos.com/json-and-arm...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 14

  • @alanyousif1510
    @alanyousif1510 ปีที่แล้ว

    can we start using winget in these scripts to install apps?

  • @tommi-hovi
    @tommi-hovi 2 ปีที่แล้ว

    Hi Travis! Are the double backslashes only required when using inline script or also in the script files provided using script uri?

  • @lionheart2663
    @lionheart2663 2 ปีที่แล้ว

    3:21 Well, if ultimately Image Builder will run sysprep , then what is the advantage ? Windows like you said has a limitation on running limited number of sysprep on images. Imagine i start with a marketplace image , use image builder to add customization and create a managed image . After few months i pick the managed image , do more customization and use image builder to create a second version of that image. If i keep on doing this at some point i will not be able to sysprep the image anymore. ??

    • @brandonfox3011
      @brandonfox3011 2 ปีที่แล้ว

      I am about to test this process, but it looks like this process always takes the fresh image from the gallery and applies your updates. The only changes you should ever make are to the template file, then redeploy the image using Image Builder. You should never be running Image Builder on top of an already "image built" image. At least, that's what it seems like.

  • @rayhallquist6199
    @rayhallquist6199 หลายเดือนก่อน

    20h1-evd is no longer available. I'm using 20h2-evd instead.

  • @simplymanoj
    @simplymanoj 3 ปีที่แล้ว

    Adding info - if you deploy the image builder template...An image Template is created in your portal.

    • @Ciraltos
      @Ciraltos  3 ปีที่แล้ว +1

      Thanks for the info!

    • @shahzadansari9728
      @shahzadansari9728 2 ปีที่แล้ว

      Hi Manoj , have you worked on it

  • @deanschulze3129
    @deanschulze3129 ปีที่แล้ว

    The newer version of AzureRM module introduced a problem that the version used in the video did not have.
    The command
    New-AzVM -ResourceGroupName $imageResourceGroup -Image $imageId -Name dwsWinVM01 -Credential $Cred -size Standard_D2_v2 -PublicIpSku Standard
    creates a VM without a public IP address, which is worthless.
    The az cli will create a VM from the previously created image with
    az vm create \
    --resource-group $aibResourceGroup \
    --name WinVM01 \
    --admin-username admin_user \
    --admin-password Admin_1234567890 \
    --image $imageId \
    --location $location

  • @deanschulze3129
    @deanschulze3129 ปีที่แล้ว

    I'm getting this error (Powershell 7.3)
    8 | $ArtifactId = (Get-AzImageBuilderRunOutput -ImageTemplateName $imageT …
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    | The term 'Get-AzImageBuilderRunOutput' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was
    I've tried
    Install-Module AzureRM
    But still get the same error.
    Edit:
    I was able to fix this by manually giving the imageId:
    $imageId='/subscriptions//resourceGroups//providers/Microsoft.Compute/images/aibCustomImgWin10'
    Edit:
    The new command is
    Get-AzImageBuilderTemplateRunOutput
    The New-AzVM creates a vm without a public IP address, though. See the az cli create example in my other comment for a work around.

    • @TM-wv1zc
      @TM-wv1zc 7 หลายเดือนก่อน

      It looks like you've resolved the issue by manually providing the imageId. However, it's important to note that the Get-AzImageBuilderRunOutput cmdlet might not be available in the Azure PowerShell module version you have installed.
      Starting with version 6.x of the Azure PowerShell module, the module has been refactored and cmdlet names have been changed. If you are using a version after 6.x, the cmdlet you might be looking for is Get-AzImageBuilderTemplateRunOutput.
      To resolve this issue, you can update your scripts to use the correct cmdlet. Additionally, make sure you have the latest version of the Azure PowerShell module installed. You can check for updates using the following command:
      powershell
      Copy code
      Update-Module -Name Az
      This will update your Azure PowerShell module to the latest version available on the PowerShell Gallery.
      As for the issue with New-AzVM not creating a VM with a public IP address, you might need to explicitly specify the public IP configuration when creating the VM. Here's an example:
      powershell
      Copy code
      $publicIP = New-AzPublicIpAddress -ResourceGroupName -Name "MyPublicIP" -AllocationMethod Dynamic -Sku Standard
      $nic = New-AzNetworkInterface -ResourceGroupName -Name "MyNIC" -PublicIpAddress $publicIP
      $vmConfig = New-AzVMConfig -VMName "MyVM" -VMSize "Standard_DS1_v2"
      $vmConfig = Set-AzVMOperatingSystem -VM $vmConfig -Windows -ComputerName "MyVM" -Credential $cred
      $vmConfig = Add-AzVMNetworkInterface -VM $vmConfig -Id $nic.Id
      $vmConfig = Set-AzVMSourceImage -VM $vmConfig -Id $imageId
      New-AzVM -ResourceGroupName -Location -VM $vmConfig
      This example assumes you have a valid $cred (PSCredential) object containing the credentials for the VM. Adjust the resource group name, location, VM size, and other parameters as needed for your environment.

  • @benjamingerber6782
    @benjamingerber6782 3 ปีที่แล้ว +3

    Great video, but you could take yourself out of the video and put the focus on what you do, and not what you look like with your hand gestures.