My ramblings on the stuff that holds it all together
Cannot Set Static IP in OpenFiler When Running as a VM
As a result of a power outage last week my home lab needed a reboot as my 2 x ESX D530 boxes didn’t have auto-power on setting set in BIOS, so I dutifully braved the snow to get to the garage and power them on manually.
However nothing came back online.. ESX started but my VMs didn’t auto-restart as it couldn’t find them.
The run up to xmas was a busy month and I had vague recollections of being in the midst of using storage vMotion to move all my VMs away from local storage to an OpenFiler VM in preparation for some testing.
However, in my rush to get things working the OpenFiler box didn’t have a static IP address set and was using DHCP (see where this is going…?)
So my domain controller/DNS/DHCP and Virtual Centre server were stored on the OpenFiler VM which my ESX box was running and accessed over iSCSI. As such when ESX started it couldn’t locate the iSCSI volume hosting the VM and couldn’t start anything.
Once I’d figured out what was going on, it was simple enough to get things going again;
- Temporary DHCP scope on my router,
- IPCONFIG/ RENEW to get a temporary DHCP address on my laptop
- VI client directly to ESX box rather than VC and reboot the OpenFiler VM
- Web browser to OpenFiler appliance on temporary DHCP addresss
However at this point I would have expected to be able to set a static IP address and resolve the issue for the future, however I couldn’t see any NICs in the OpenFiler config screen (see screenshot below)
I thought this was a bit odd, and maybe I was looking in the wrong part of the UI, but sure enough it was the correct place.
I tried updating it to the most recent software releases via the handy system update feature, which completed ok (no reboot required – beat that Windows Storage Server! :)) but still no NICs showing up, even after a couple of reboots to be absolutely sure.
Then, I stumbled across this thread and it seems this may be a bug (tracker here) following Jason’s suggestion I used the nano text editor via the VI remote console to edit the /opt/openfiler/var/www/includes/network.inc file on the OpenFiler VM as follows;
I then refreshed the system tab in my browser session and the NICs show up;
note as part of my initial troubleshooting I added a 2nd virtual NIC to the VM, but the principal should apply regardless.
And I can now set a static IP etc.
I had to reboot my ESX host to get all my VM’s back from being inaccessible, I’m sure there is a cleverer way to do that, but in my case I wanted to test that the start-up procedure worked as expected now that I’ve set a static IP and re-jigged the start-up sequence so that OpenFiler starts before any other VMs that are dependent on it for their storage.