Skip to content

Commit

Permalink
Enable DiskPlacementType setting for Azure VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
sharsonia committed Jan 15, 2025
1 parent 6348227 commit 92ec624
Show file tree
Hide file tree
Showing 8 changed files with 1,035 additions and 16 deletions.
3 changes: 2 additions & 1 deletion lisa/features/disks.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ def get_os_disk_controller_type(self) -> schema.DiskControllerType:


DiskEphemeral = partial(
schema.DiskOptionSettings, os_disk_type=schema.DiskType.Ephemeral
schema.DiskOptionSettings,
os_disk_type=schema.DiskType.Ephemeral,
)
DiskPremiumSSDLRS = partial(
schema.DiskOptionSettings,
Expand Down
1 change: 0 additions & 1 deletion lisa/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@ class ResourceDiskType(str, Enum):
DiskControllerType.NVME,
]


os_disk_types: List[DiskType] = [
DiskType.StandardHDDLRS,
DiskType.StandardSSDLRS,
Expand Down
4 changes: 2 additions & 2 deletions lisa/sut_orchestrator/azure/arm_template.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func getEphemeralOSImage(node object) object => {
name: '${node.name}-osDisk'
diffDiskSettings: {
option: 'local'
placement: 'CacheDisk'
placement: node.disk.ephemeral_disk_placement_type
}
caching: 'ReadOnly'
createOption: 'FromImage'
Expand Down Expand Up @@ -333,7 +333,7 @@ resource nodes_data_disks 'Microsoft.Compute/disks@2022-03-02' = [
}
]

resource nodes_vms 'Microsoft.Compute/virtualMachines@2022-08-01' = [for i in range(0, node_count): {
resource nodes_vms 'Microsoft.Compute/virtualMachines@2024-03-01' = [for i in range(0, node_count): {
name: nodes[i].name
location: nodes[i].location
tags: combined_vm_tags
Expand Down
Loading

0 comments on commit 92ec624

Please sign in to comment.