1

I'm in the process of building a home lab environment for Cisco and VMware that will also double as a NAS. The system runs ESXi v6.0 bare metal. Part of my design is that I have a Lenovo TS440 with LSI2008, which I've used VT-d to give to a guest, and that guest runs ZFS with LIO providing a LUN that I can then use as a datastore for other VMs.

This design was inspired by this:

Hosting a ZFS server as a virtual guest

The performance is amazing and it runs really well. However a problem that I'm running into is that if I ever reboot the ESXi host (which I do on occasion since this is a lab environment) then the VMs that are using the iSCSI datastore can't come up (they are greyed out and show inaccessible.)

I have to fix it every time after a reboot by re-adding the datastore, not only that but the boot stage takes longer because it tries to reach the iSCSI target and fails.

The main question is this:

Is it possible to configure ESXi to wait until a given VM is online before it attempts to load any datastores? If not, what are my alternatives? I understand I can just use a larger ESXi boot disk, but I'd rather be able to ZFSify the vmdisks.

Dragoon
  • 111
  • 2
  • You should use NFS... but I don't have an answer for your iSCSI situation. – ewwhite Jun 26 '15 at 03:56
  • I originally used NFS, but didn't like the performance (Ubuntu server took about 10 times longer just to install.) NFS has the same issue, by the way. – Dragoon Jun 26 '15 at 14:44

1 Answers1

1

AFAIK you cannot make ESXi to wait for a VM to start before mounting the datastores. I may be wrong though.

The datastores are mounted way before any VM can boot up.

In general iSCSI connects right away if you do a rescan on the iSCSI sw adapter after your storage VM boots up (and rescan it works way better than NFS, where if it gets disconnected/inactive for a while it may take quite some time until it even retries to connect)

You could try on your storage VM to write a bash script that after the guest OS & services are started it will connect via SSH to the ESXi and issue a iscsi adapter rescan command so that ESXi will see and mount the iscsi datastore.

Still though that won't be perfect as you would have to manually boot all the rest of the VMs that will be become accessible after that.

Cha0s
  • 2,432
  • 2
  • 15
  • 26