FreeNAS on ESXi - how to access disks?

Status
Not open for further replies.

snuffy

Dabbler
Joined
Aug 27, 2012
Messages
10
I have an HP N40L Microserver just purchased and so far on a single disk (just to test) have done the following:

  1. installed bare-metal VMware ESXi on USB flash
  2. created the ESXi datastore on it's default settings (full disk)
  3. created a new FreeBSD 64bit VM with 2GB virtual disk (as per the FreeNAS minimum install requirements)
  4. Installed FreeNAS 8 from the ISO to the above VM

I can access the web GUI for FreeNAS but cannot add volumes/disks as the physical disk does not show up. I added a second physical disk but still cannot access this from FreeNAS.

Can anyone point me in the right direction?

I might not even have got the concept of how to do this correctly?

Do I need to provision the second disk within VMware somehow?

Do the disks need to be included in the install of FreeNAS?

I this because there is no disk space left as it's all taken up by the VMware datastore?

As you can see, I'm a bit lost. My ultimate aim would be to have the one server with 4 or 5 physical disks with ESXi booting from flash disk, and FreeNAS installed as a VM with ZFS volume/s that ESXi can use for VMs and also use the ZFS volume/s for network file shares for Windows and Linux. So that if a drive fails I can pop in a new one and all be ok. I'm not sure if this is possible, or if I would need to investigate some kind of iSCSI set up?

Any pointers would be greatly appreciated.

Tim.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
I regret to inform you that your very clever setup is not feasible.

Your "second physical disk" won't show up because the SATA controller is attached to your ESXi instance. You can create a virtual disk on that physical disk and pass it through to FreeNAS if you wish. That'll work. It may (not sure on the N40L) be possible to detach the SATA controller and use PCI passthru to hand the SATA controller to FreeNAS. That, however, means your ESXi has nowhere to store VM's, and ESXi won't allow you to store them on something like a USB key, even though that seems like it'd work dandy for what you effectively want to do.

But the real problem is ESXi itself: ESXi really really wants your SAN (or NAS) datastores to be available when booting. If they're not, your VM's will not start (and possibly the host itself won't fully start, depending on specifics). This is really a "${foo} isn't actually Magic" problem: VMware acts a lot more like a UNIX/Linux box than they'd let you believe.

I'm not entirely sure the N40L supports PCI passthrough. Area of homework for you. If it does, though, you can approximate what you're trying to do a few different ways:

1) Find a small external NAS to act as primary VM SAN storage. I know it seems ugly, but it'll work with the least complications. iomega makes stuff like the ix2-ng (~$150 for a 2-drive-capable NAS and the unit has about a 5 watt footprint in addition to whatever drives you stuff in it). Then you stick your big disks in the N40L, use a VM instance as a fileserver, and if there are any VM's that need big storage, use NFS or whatever to give it to them via the VM's operating system. ESXi never becomes dependent on your FreeNAS VM that way.

2) Shop carefully for a SATA controller that's ESXi-compatible. Stick an extra drive in the N40L's optical bay (or even something like an ICY DOCK MB994SP-4SB-1) and put a drive (or drives) in as local ESXi VM storage. Then, again, you stick your big disks in the N40L, etc., same as in #1.

If it were me, I'd do #2, with a RAID controller like the M1015 and a pair of SSD's or notebook drives in RAID1.

You also have the option of sticking disks directly in the N40L, and letting ESXi deal with them. Your redundancy options are limited to what the RAID controller on the N40L supports, in that case, and I don't know how well ESXi supports it.
 

Bever

Explorer
Joined
May 3, 2012
Messages
55
If you add a second disk in your system, you need to create a datastore on it. What you really need to do to have a second disk available in your FreeNAS, is add a second disk in the properties of your VM. This will create a second vmdk for your data.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
If you add a second disk in your system, you need to create a datastore on it. What you really need to do to have a second disk available in your FreeNAS, is add a second disk in the properties of your VM. This will create a second vmdk for your data.

snuffy isn't seeing the "first" disk either. The actual disk currently configured in ESXi is going to be holding the install image, and is equivalent to the USB key on a physical FreeNAS installation. Any additional virtual disks added to the FreeNAS VM's ESXi configuration will appear to FreeNAS as potential data drives. However, for any number of reasons, this isn't a particularly grand way to run FreeNAS.
 

snuffy

Dabbler
Joined
Aug 27, 2012
Messages
10
Thanks very much for your thoughts. I thought I might be trying to be a little ambitious in what I wanted to achieve, that seems to be the case. I'll take your comments and try them out.

Thanks,
Tim.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
No, it's pretty clever - though you're not the first to try it. Just a bit beyond what's actually workable right now.
 

Bever

Explorer
Joined
May 3, 2012
Messages
55
I'm running FreeNAS on ESXi right now. One disk for the ESXi OS and as datastore for my VM's. Three disks as RDM's to create a zfs raid. Works fine.
 

snuffy

Dabbler
Joined
Aug 27, 2012
Messages
10
I'm running FreeNAS on ESXi right now. One disk for the ESXi OS and as datastore for my VM's. Three disks as RDM's to create a zfs raid. Works fine.


Ahah, ok, I'll find a relatively small drive for ESX and use Raw Drive Mapping on the other 3 or 4. I know nothing about RDM but get the gist of it from the name. Sounds like what I was hoping for. I'll do some reading.

Thanks Bever!

When I get it working I'll post a how-to for others.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Ahah, ok, I'll find a relatively small drive for ESX and use Raw Drive Mapping on the other 3 or 4. I know nothing about RDM but get the gist of it from the name
If you know so little I would suggest you do not run FreeNAS this way. Several people here have tried and failed when they encountered problems. Can you do it? Certainly, if you are knowledgeable and thorough enough. If you decide to anyway make sure you educate yourself. Most importantly test out all different types of failure to see how you can keep your data when something goes wrong.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
If you know so little I would suggest you do not run FreeNAS this way. Several people here have tried and failed when they encountered problems. Can you do it? Certainly, if you are knowledgeable and thorough enough. If you decide to anyway make sure you educate yourself. Most importantly test out all different types of failure to see how you can keep your data when something goes wrong.

+1 on this. As a general rule, if someone is asking for help with ESXi they likely shouldn't be attempting it. Even some people that were sure they knew what they were doing have lost all data on their FreeNAS pool because they didn't actually know what they were doing. At this point my recommendation would be to do backups regularly and verify they work if you are going to continue down this path. The forum has plenty of threads that have ended with "well, I lost my data and it's my own fault for using ESXi".
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
It's questionable as to the value of using RDM to create a RAIDZ in any case... your ESXi isn't going to like dealing with a failed disk (VM won't start/requires conf twiddling/etc) so you probably need to arrange to use the N40L's RAID capabilities to provide data protection for the ESXi datastore. At that point, there's no reason to run a RAIDZ, just make a virtual disk and share it. That's really one of the few ways to end up with having your VM's protected and your data protected, unless you do what I suggested above.
 

snuffy

Dabbler
Joined
Aug 27, 2012
Messages
10
No worries guys, thanks for the input, I have backups coming out of my ears! It's currently only a test-rig anyway. I'm 1st-line IT at work but like to have a play with the big-boy toys so that I can join in on the geek conversations!

Cheers.
 

anup8788

Cadet
Joined
Oct 2, 2012
Messages
5
Hi,

I'm also trying to install ESXi on my new HP Microserver N40L, did you manage to get it working?

I've installed ESXi on a 16gb USB but when ESXi is loaded, I don't see any datastores in VMware Client :s, I have 2 SATA drives installed in the machine but non of them are recognised in ESXi, I tried RAID 0 and that's also not recognised.

I'm new to all this, want to install FreeNAS after datastore is recognised.

Thanks in advance.
 

matlock

Contributor
Joined
Mar 2, 2012
Messages
114
... Have you used the search feature on the forums?

there are a few write ups on how to do what youre asking. Oh look... in fact, there's a link right above your post!
 

anup8788

Cadet
Joined
Oct 2, 2012
Messages
5
Thankyou

... Have you used the search feature on the forums?

there are a few write ups on how to do what youre asking. Oh look... in fact, there's a link right above your post!

Hi,

Thank you for quick response, I've search and this thread is what I found.

The problem is that I'm not seeing any storage on ESXi client. I tried to follow the instruction on that link but i get stuck on step 3 because i dont have any datastores :s and i cant create any as no storage is being seen on ESXi. I have 2 sata installed but not being seen.

Is there a way to create datastore manually via SSH?
 

pirateghost

Unintelligible Geek
Joined
Feb 29, 2012
Messages
4,219
Hi,

Thank you for quick response, I've search and this thread is what I found.

The problem is that I'm not seeing any storage on ESXi client. I tried to follow the instruction on that link but i get stuck on step 3 because i dont have any datastores :s and i cant create any as no storage is being seen on ESXi. I have 2 sata installed but not being seen.

Is there a way to create datastore manually via SSH?

This is an ESXi problem and not a FreeNAS problem. Why dont you visit the VMWARE forums and read up on compatibility with HARD DRIVE CONTROLLERS and ESXi?
 

tabs

Dabbler
Joined
Oct 31, 2012
Messages
11
Hi

Finally managed to sort this. Am running ESXi 5 off internal usb. First 230 HD using for VMs and isos. I then have a 2tb WD red HD . I set this up to get raw access to it by following this blog post:
http://blog.davidwarburton.net/2010/10/25/rdm-mapping-of-local-sata-storage-for-esxi/

However I didn't read through it all first! As a consequence when he adds at the end;

"One thing I forgot to show in the screen shots, is that you should create your RDM’s on a new SCSI controller!"

I'd already set it up using iSCSI 0:1 , so far seems to be working ok?:confused:

Now just need to start learning how to use freeNAS so I can get my media library up and running!:)
 

snuffy

Dabbler
Joined
Aug 27, 2012
Messages
10
[resolved]

So in the end it was far simpler than I had previously thought:

After creating the Datastores (for three separate disks),

Follow instructions in FreeNAS manual to get the VM up and running:

  1. Create a 4GB VM
  2. Edit the VM settings and add 3 virtual disks of 100GB, one on each of the 3 physical disks (datastores).
  3. Boot VM from FreeNAS ISO and install on the 4GB VM (may appear like it's the ESXi flash drive on the server it's found, but it's not)
  4. Once installed and restarted the disks should be available in the FreeNAS GUI.

To create a RAID set in FreeNAS:

  1. Volumes > Volume Manager
  2. Add the three disks and select the ZFS RAIDZ options
  3. Set the permissions: leave at Unix ACL, and tick all the Read/write/Execute options (yes, not good for security, but this is for testing)

Create a Share:

  1. Windows (CIFS) Shares
  2. Add Windows (CIFS) Share
  3. Path: choose the volume created above
  4. Allow guest access

All good. I'm now going to play with pulling a virtual disk and seeing about how to repair the set.

Thanks for your advice everyone.

Cheers,
Tim.
 

wtfok

Cadet
Joined
Jul 12, 2014
Messages
1
Sorry for thread-jacking this thread, but I still think it's cleaner to do this than opening a new one, and post guidelines state that one should search for old threads before opening a new one :)

I have a similar situation as TS, but I have two separate SATA controllers onboard (Supermicro X9SRL-F). I have passthrough enabled one the 6-port controller and I have provided it to my FreeNAS VM. Strangely though, the VM can't seem to find it. I have passed the controller before installing FreeNAS and according to what I've read, that should pretty much rule out any driver issues, right?
 
Status
Not open for further replies.
Top