Change Virtual Machine SCSI Controller Type in NexentaStor VSA

Before I say anything, I shouldn’t need to say this, but I will. This is not supported. Now, on to the fun!

The current release of NexentaStor (v3.1.4.1) is made available as an OVA to make it easy to import into VMware environments. Currently this only “works” in full blown vSphere hosts and not Fusion/Workstation/Player (“works”, because with some fenagling, you can get it running in Fusion – don’t have access to Workstation/Player at the moment). Ok, already getting off track. This OVA comes with the following hardware configuration:

1 vCPU
2GB RAM
1 x 8GB Hard Drive (syspool)
– this is configured with a VMware Paravirtual controller
1 Virtual Nic
– this is configured as a VMXNET3 device

If you want to change the scsi controller to LSI Logic Parallel, you’ll be met with the following kernel panic in a boot loop:

lsilogic_panic

When you first start, you can check which driver your VSA is using on your drive/controller by executing

show lun

show_lun_pvscsi

Notice the ‘Attach’ column shows my VMware Paravirtual attached drive as well as a second MPT attached drive. This is a second VMDK on SCSI1:0 with an LSI Logic Parallel controller to show that it can be recognized and what it should look like to the system (mpt driver being used).

So, to change the controller type and still have a booting VSA:

  1. If you’ve switched the controller to LSI Logic Parallel already, change the controller type back to the default of Paravirtual
  2. Boot into the system as normal
  3. Log into NMC (console access, not the web interface) as root
  4. Create a checkpoint of the syspool so we can revert to it
    setup appliance checkpoint create
    
  5. Determine the current checkpoint associated syspool dataset that is used for the root filesystem.  (ie. syspool/rootfs-nmu-000)  This will be listed as the “Current” and “Default” entry when you run the following:
    show appliance checkpoint
    ROOTFS          CREATION           CHECKPOINT-TYPE  CURRENT DEFAULT VERSION
    rootfs-nmu-001  Apr 25 11:58 2013  rollback         No       No     3.1.4
    rootfs-nmu-000  Mar 28  5:40 2013  initial          Yes      Yes    3.1.4
    
  6. Shutdown and reboot into “Safe Mode” from the GRUB menu or boot from CDROM and choose “Recovery Console”
    grub1
  7. If asked for a login, login as “root” with no password.
  8. Force import syspool.
    zpool import -f syspool
    
  9. Create a mountpoint in /tmp and mount the previously noted checkpoint to it.
    mkdir /tmp/a
    mount -F zfs syspool/rootfs-nmu-000 /tmp/a
    
  10. Remove all entries from /tmp/a/dev/[r]dsk
    rm /tmp/a/dev/dsk/*
    rm /tmp/a/dev/rdsk/*
    
  11. Remove all entries from /tmp/a/dev/cfg
    rm -rf /tmp/a/dev/cfg/*
    
  12. Remove the device ID Cache and the mdi_scsi_vhci Cache
    rm /tmp/a/etc/devices/devid_cache
    rm /tmp/a/etc/devices/mdi_scsi_vhci_cache
    
  13. Put down a new device tree via devfsadm directed to the current checkpoint.
    devfsadm -r /tmp/a
    
  14. Update the boot archive of the current checkpoint
    bootadm update-archive -R /tmp/a
    
  15. Unmount the current checkpoint
    umount /tmp/a
    
  16. Power Off the VM
  17. Change the controller type to LSI Logic Parallel
    controller_change
  18. Boot the VM
  19. If the system fails to boot, you can change the controller back to VMware Paravirtual and boot into the checkpoint created in step 1 (root-fs-nmu-001).

If you have VMware Tools installed on a previous version or an upgraded VSA and you want to switch from the LSI Logic to the Paravirtual, just reverse the instructions and it should work.

Credit to Phil Wagstrom, Field Engineer at Nexenta for the device tree reset workflow. He’s a Solaris rockstar.

2 thoughts on “Change Virtual Machine SCSI Controller Type in NexentaStor VSA

Leave a Reply