Skip to content

Commit

Permalink
To resolve #661
Browse files Browse the repository at this point in the history
  • Loading branch information
powerkimhub committed May 30, 2022
1 parent 1ed8713 commit a481628
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,20 @@ func (vmHandler *AzureVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, e
if vmImage == "" {
vmImage = vmReqInfo.ImageIID.NameId
}
storageType := getVMDiskTypeInitType(vmReqInfo.RootDiskType)

var managedDisk = new(compute.ManagedDiskParameters)
if vmReqInfo.RootDiskType != "" && vmReqInfo.RootDiskType != "default" {
storageType := getVMDiskTypeInitType(vmReqInfo.RootDiskType)
managedDisk.StorageAccountType = storageType
}
//storageType := getVMDiskTypeInitType(vmReqInfo.RootDiskType)
vmOpts.StorageProfile = &compute.StorageProfile{
OsDisk: &compute.OSDisk{
CreateOption: compute.DiskCreateOptionTypesFromImage,
ManagedDisk: &compute.ManagedDiskParameters{
StorageAccountType: storageType,
},
//ManagedDisk: &compute.ManagedDiskParameters{
// StorageAccountType: storageType,
//},
ManagedDisk: managedDisk,
DeleteOption: compute.DiskDeleteOptionTypesDelete,
},
}
Expand Down

0 comments on commit a481628

Please sign in to comment.