Skip to content

Commit

Permalink
fix crash (#1371)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlmorris3827 authored Mar 16, 2021
1 parent 0820364 commit ff4befc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crm-platforms/vcd/vcd-vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ func (v *VcdPlatform) updateVM(ctx context.Context, vm *govcd.VM, vmparams vmlay

flavorName := vmparams.FlavorName
flavor, err := v.GetFlavor(ctx, flavorName)
if err != nil {
return fmt.Errorf("Error getting flavor: %s - %v", flavorName, err)
}
vmSpecSec := vm.VM.VmSpecSection
vmSpecSec.NumCpus = TakeIntPointer(int(flavor.Vcpus))
vmSpecSec.MemoryResourceMb.Configured = int64(flavor.Ram)
Expand Down

0 comments on commit ff4befc

Please sign in to comment.