Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion perfkitbenchmarker/providers/azure/azure_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,12 @@ def _Detach(self):
def GetDevicePath(self):
"""Returns the path to the device inside the VM."""
if self.disk_type == disk.LOCAL:
# by-index path is not supported on v5 and older verions.
if LocalDriveIsNvme(self.machine_type):
return '/dev/nvme%sn1' % str(self.lun)
if self.vm.TryRemoteCommand('test -e /dev/disk/azure/local/by-index'):
return f'/dev/disk/azure/local/by-index/{self.lun}'
else:
return '/dev/nvme%sn1' % str(self.lun)
# Temp disk naming isn't always /dev/sdb:
# https://github.com/MicrosoftDocs/azure-docs/issues/54055
return '/dev/disk/cloud/azure_resource'
Expand Down
Loading