vmware-archive / vcd-cli

Command Line Interface for VMware vCloud Director
https://vmware.github.io/vcd-cli
Other
163 stars 106 forks source link

Disk detach doesn't work #550

Open sfgets opened 3 years ago

sfgets commented 3 years ago

I'm able to add-disk to vapp/vm without issue!

However when I wish to detach the same there is no way to obtain the proper --idisk-id vm detach-disk module expects nor vapp detach with the name taken from vm info output.

vm info output is the following:

disk-2000            name: Hard disk 1
                     size-MB: 50000
                     adapter-type: LSI Logic Parallel (SCSI)
                     bus: 0
                     unit: 0
disk-2001            name: Hard disk 2
                     size-MB: 50000
                     adapter-type: LSI Logic Parallel (SCSI)
                     bus: 0
                     unit: 1

I get the following regardless what I provide as a disk name. I tried w/wo quotes and just numbers, nothing works!

vcd vapp detach somevapp somevm "disk-2001"
Usage: vcd vapp detach [OPTIONS] <vapp-name> <vm-name> <disk-name>
Try 'vcd vapp detach -h' for help.

Error: No disk found with the given name/id.

the same is returned by vm detach-disk

vcd vm detach-disk --idisk-id disk-2001 someapp somevm
Usage: vcd vm detach-disk [OPTIONS] <vapp-name> <vm-name>
Try 'vcd vm detach-disk -h' for help.

Error: No disk found with the given name/id.
listik-cveta commented 10 months ago

Looks like in this scripts you can deal with only independent disk(s), independent disk difference with vm disk.