cloudfoundry/bosh-vsphere-cpi-release

How to set SCSI controller type?

Closed this issue · 5 comments

Support Question

Is it possible to change SCSI controller type? All VMs are created with LSI Logic Parallel and I want to change it to VMware Paravirtual. I checked CPI code and found

disk_controller_id: replicated_stemcell_vm.system_disk.controller_key,
and
disk_config_spec = disk.create_disk_attachment_spec(disk_controller_id: system_disk.controller_key)

which suggests that it is copied from stemcell. I don't want to modify stemcells, so is it possible to change this on deployment basis?

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

Hi @pgasior ,

Is it possible to change SCSI controller type?

Other than changing it through the vCenter GUI, no.

which suggests that it is copied from stemcell. I don't want to modify stemcells, so is it possible to change this on deployment basis?

Although BOSH-deployed are cloned from the stemcell, we found that the controller appears to be overwritten later in a subsequent step: We modified a stemcell to use the Paravirtual driver, and used the modified stemcell to deploy a VM, and the deployed VM, surprisingly, had the "LSI Logic Parallel" driver, not the Paravirtual driver. BOSH clones VMs from the stemcell's snapshot, not the stemcell itself.

We are continuing to explore this.

@pgasior

I want to give a more in-depth answer to your question, "is it possible to change this [SCSI controller driver] on deployment basis?"

A roundabout way of doing this is modifying a stemcell, say ubuntu-bionic v1.14, and using that stemcell exclusively for the deployment which you'd like to use with the Paravirtual driver.

  • type bosh ss to find your stemcell's CID (e.g. sc-fad26eb2-2d98-4581-a1ec-a03a66ce90e1)
  • search for the CID in your vCenter GUI; you'll find a powered-off VM
  • modify that VM to use the VMware Paravirtual SCSI controller
  • click on the snapshots tab
  • delete the "Initial" snapshot
  • click "Take Snapshot..."; the name of the snapshot is not important

Any subsequent deployment with that stemcell will be deployed with the Paravirtual driver. We've tested this procedure on one of our vCenters, and BOSH deployed VMs with the Paravirtual driver without problem.

We're exploring whether to switch stemcells to use the PV driver, but that's a much longer discussion.

Blog posts of note:

@cunnie thanks for those detailed steps.
One question though - do you expect that switch to PV driver or making it configurable in a near future?

@miro-grapeup:

do you expect that switch to PV driver

We don't know. In the short term, no. In the long term, maybe. Our team is re-structuring, so maybe when that's done we'll look at it again.

The problem is that for typical use, the benefits of using the PV driver aren't compelling enough to make a change (I was curious, so I ran some benchmarks and wrote a blog post on the results: https://blog.nono.io/post/pvscsi/ ).