Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify LUN and Caching for additional Azure data disks on managed image #19

Open
ghost opened this issue Apr 30, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Apr 30, 2021

This issue was originally opened by @alexsab1 as hashicorp/packer#6071. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.


Overview

Since version 1.2.2 packer supports building with additional disks.

I tested this new feature by creating a template that creates additional 127GB managed data disk. After I ran the template I found out that packer defaults certain values for data disks:

  1. LUN is defaulted to 0. I assume that adding more disks will increment LUN to 1, 2, etc.
  2. Caching is set to Read/Write on attached disks.

image

Problem

Once Azure Manager disk is created, it is not possible to change properties of the attached disk in the managed image. For example, Azure CLI does not offer commands to change property of data disk in managed image. Likewise, Azure Powershell, does not offer cmd-lets to change properties of data disk in managed image. I tired changing Lun via powershell in Azure Cloud Shell and received the following error

image

  1. I need to change LUN from 0 to 1 on a single data disk created with the managed disk using packer version 1.2.2. This is the requirement of the Azure Scale Set infrastructure we run.
  2. I also need to set caching to Read-only according to recommendations: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage-performance#disk-caching

Feature Requested

Enhance packer to allow setting LUN and cache value for data disks before creating managed image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants