vmware / govmomi

Go library for the VMware vSphere API
Apache License 2.0
2.32k stars 913 forks source link

govc: Attach Disk to SCSI Controller #2117

Open gothicx opened 4 years ago

gothicx commented 4 years ago

Hi,

It would be useful to have a device.scsi.attach to attach a disk to a scsi controller.

govc device.scsi.attach -vm $vm pvscsi-1001

Thank you.

dougm commented 4 years ago

I think we could add a -controller flag to vm.disk.change to support this. What do you think?

gothicx commented 4 years ago

That's ok for me. Thank you !

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

gothicx commented 3 years ago

/remove-lifecycle stale

github-actions[bot] commented 3 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.

gothicx commented 3 years ago

/remove-lifecycle stale

jbertozzi commented 3 years ago

Hello,

It seems the code has been modifed to add this functionnality.

However, it seems not to be working (using a VSAN datastore):

&types.LocalizedMethodFault{
    Fault: &types.SystemError{
        RuntimeFault: types.RuntimeFault{
            MethodFault: types.MethodFault{
                FaultCause:   (*types.LocalizedMethodFault)(nil),
                FaultMessage: []types.LocalizableMessage{
                    {
                        Key:     "vob.fssvec.CreateFile.file.failed",
                        Arg:     nil,
                        Message: "File system specific implementation of CreateFile[file] failed",
                    },
                    {
                        Key:     "vob.fssvec.CreateFile.file.failed",
                        Arg:     nil,
                        Message: "File system specific implementation of CreateFile[file] failed",
                    },
                    {
                        Key:     "vob.fssvec.CreateFile.file.failed",
                        Arg:     nil,
                        Message: "File system specific implementation of CreateFile[file] failed",
                    },
                },
            },
        },
        Reason: "Error creating disk Function not implemented",
    },
    LocalizedMessage: "A general system error occurred: Error creating disk Function not implemented",
}

Should I open a new issue for this?

embano1 commented 3 years ago

Yes, if this issue is not correctly reflecting the bug you're seeing, please open a new one.

gothicx commented 3 years ago

@jbertozzi This bug was reported to add a controller to an existing disk and not while creating a new VM, so you probably want to report a new bug.

jbertozzi commented 3 years ago

New issue opened:

https://github.com/vmware/govmomi/issues/2568

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Mark as fresh by adding the comment /remove-lifecycle stale.