We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
govc vm.disk.change
Describe the bug
When govc vm.disk.change is requested to vcsim, govc panics and crashes by nil pointer dereference.
vcsim
govc
To Reproduce Steps to reproduce the behavior:
# check disk in DC0_H0_VM0 $ govc device.info -vm DC0_H0_VM0 disk-* Name: disk-202-0 Type: VirtualDisk Label: disk-202-0 Summary: 10,485,760 KB Key: 204 Controller: pvscsi-202 Unit number: 0 File: [LocalDS_0] DC0_H0_VM0/disk1.vmdk # change the disk's size $ govc vm.disk.change -vm DC0_H0_VM0 -disk.name disk-202-0 -size 10G
Expected behavior
govc raises no errors and vcsim increases the disk's size.
Affected version
Screenshots/Debug Output
$ govc vm.disk.change -vm DC0_H0_VM0 -disk.name disk-202-0 -size 10G panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xd7ee28] goroutine 1 [running]: github.com/vmware/govmomi/govc/vm/disk.(*change).Run(0xc0001ee150, {0x13ddf80, 0xc000130000}, 0xe?) /home/runner/work/govmomi/govmomi/govc/vm/disk/change.go:159 +0x148 github.com/vmware/govmomi/govc/cli.Run({0xc00012e010, 0x7, 0x7}) /home/runner/work/govmomi/govmomi/govc/cli/command.go:165 +0x32d main.main() /home/runner/work/govmomi/govmomi/govc/main.go:114 +0x4f
Additional context Add any other context about the problem here.
Panic is raised by this line.
https://github.com/vmware/govmomi/blob/master/govc/vm/disk/change.go#L159
Since vm.disk.change works with vCenter, this is due to vcsim models.
vm.disk.change
> govc device.info -vm vm1 "disk-*" Name: disk-1000-0 Type: VirtualDisk Label: Hard disk 1 Summary: 1,048,576 KB Key: 2000 Controller: pvscsi-1000 Unit number: 0 File: [datastore1] vm1/vm1.vmdk > govc vm.disk.change -vm vm1 "-disk.name" disk-1000-0 -size 10G > govc device.info -vm vm1 "disk-*" Name: disk-1000-0 Type: VirtualDisk Label: Hard disk 1 Summary: 10,485,760 KB Key: 2000 Controller: pvscsi-1000 Unit number: 0 File: [datastore1] vm1/vm1.vmdk
The text was updated successfully, but these errors were encountered:
vcsim: Fix StorageIOAllocationInfo of VirtualDisk
61032a2
Closes: vmware#2904 Signed-off-by: syuparn <s.hello.spagetti@gmail.com>
Successfully merging a pull request may close this issue.
Describe the bug
When
govc vm.disk.change
is requested tovcsim
,govc
panics and crashes by nil pointer dereference.To Reproduce
Steps to reproduce the behavior:
Expected behavior
govc raises no errors and vcsim increases the disk's size.
Affected version
Screenshots/Debug Output
Additional context
Add any other context about the problem here.
Panic is raised by this line.
https://github.com/vmware/govmomi/blob/master/govc/vm/disk/change.go#L159
Since
vm.disk.change
works with vCenter, this is due to vcsim models.The text was updated successfully, but these errors were encountered: