Skip to content

Commit

Permalink
roachprod: add --os-volume-size support for Azure
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
rail committed Jun 8, 2021
1 parent c6d85fe commit a38fddc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cmd/roachprod/vm/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,11 @@ func (p *Provider) createVM(
tags[tagLifetime] = to.StringPtr(opts.Lifetime.String())
tags[tagRoachprod] = to.StringPtr("true")

osVolumeSize := int32(opts.OsVolumeSize)
if osVolumeSize < 32 {
log.Print("WARNING: increasing the OS volume size to minimally allowed 32GB")
osVolumeSize = 32
}
// Derived from
// https://github.com/Azure-Samples/azure-sdk-for-go-samples/blob/79e3f3af791c3873d810efe094f9d61e93a6ccaa/compute/vm.go#L41
vm = compute.VirtualMachine{
Expand All @@ -520,6 +525,7 @@ func (p *Provider) createVM(
ManagedDisk: &compute.ManagedDiskParameters{
StorageAccountType: compute.StorageAccountTypesStandardSSDLRS,
},
DiskSizeGB: to.Int32Ptr(osVolumeSize),
},
},
OsProfile: &compute.OSProfile{
Expand Down

0 comments on commit a38fddc

Please sign in to comment.