Skip to content

Commit

Permalink
fix: govc vm.disk.change should only modify CapacityInBytes
Browse files Browse the repository at this point in the history
PR vmware#3424 switched from the deprecated CapacityInKB field to CapacityInBytes.
That PR focus was to fix an issue with the simulator, but broke against real vCenter.
Just leaving CapacityInKB as-is makes vCenter happy again.

Fixes vmware#3464
  • Loading branch information
dougm committed Jun 7, 2024
1 parent 3e3e439 commit 298cfbf
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion govc/vm/disk/change.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ func (cmd *change) Run(ctx context.Context, f *flag.FlagSet) error {

if int64(cmd.bytes) != 0 {
editdisk.CapacityInBytes = int64(cmd.bytes)
editdisk.CapacityInKB = int64(0) // zero deprecated field
}

if editdisk.StorageIOAllocation == nil {
Expand Down

0 comments on commit 298cfbf

Please sign in to comment.