Skip to content

Add govc command to add SATA controller #3780

@MajorDallas

Description

@MajorDallas

PR #3458 added support for creating a SATA controller in the vm.create command. However, an independent command to add a SATA controller later was not added.

By analogy with device.scsi.add for adding additional SCSI controllers to an existing VM, there should be a device.sata.add command for adding SATA controllers to existing VMs.

Even better, imo, would be a more generic command like device.controller.add to allow adding any type of supported controller, specified with command options, rather than allowing 'device.<type>' commands to proliferate with every new technology to come out in the future.

I came across this missing command while trying to automate VM creation, using a hand-made VM as a model. The vSphere GUI adds a SATA controller to new VMs by default; govc does not. The result is that otherwise identically-configured VMs have a different number of PCI devices attached, which in turn changes the names of network interfaces in Linux VMs that generate NIC names based on their PCI address. This can then have effects on anything that was expecting a particular interface name, such as scripts run during guest customization or cloud-init configuration, or any config management solution that may run later on.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions