A
A
Andrey Osty2014-09-01 22:19:43
VMware
Andrey Osty, 2014-09-01 22:19:43

How to make friends FreeNAS iSCSI and VMware ESXi on the same hardware?

Will it work like this?

Let's say there is the following chain of actions:
1) VMware ESXi 5.5 installed on bare metal.
2) FreeNAS 9.xx VMDK for VMWare with a RAID controller thrown into it.
3) FreeNAS is configured with iSCSI.
4) VMware ESXi is set to iSCSI created.
5) A virtual machine has been created on iSCSI and the OS has been installed. Everything is working.
6) We reboot and all ESXi does not rise (does not work), since FreeNAS is offline (did not have time to boot) and, accordingly, iSCSI is not available. And ESXi does not want to boot (not fully initialized), as it is looking for a deployed virtual machine on iSCSI. This is where the vicious circle comes in. Advise how to get around the problem, if of course the proposed configuration is working.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Diman89, 2014-09-02
@2king2

NFS to help you

S
setw, 2015-04-15
@setw

The chain needs to be corrected, namely to get rid of FreeNAS and take a clean FreeBSD 10.1 (at the current time).
1. 2 disks are installed in the mirror to accommodate the hypervisor and VM with FreeBSD.
2. ESXi is installed (now it's better to choose version 6, the free edition allows you to keep up to 2 physical processors without memory limits) on bare metal.
3. A VM under FreeBSD is created with a network controller of the "vmxnet3" type, and the OS is installed.
4. Local disks are transferred to the VM via RDM.
5. Thrown disks are called GPT partitions.
6. A fault-tolerant ZFS pool of the required RAID level is created (as an additional bonus, you can add an SSD cache for reading -L2ARC).
7. The pool is shared using the native ctld client via iSCSI (do not forget to add everything necessary to raise services to rc.conf).
8. A software "storage adapter" iSCSI is added to ESXi and in its settings we cling to the created moon.
9. Rescan datastores and format moons under VMFS.
10. After each reboot of the physical server, you need to turn on the VM with FreeBSD and after loading in the "storage" menu, select "rescan all", then the missing datastore will appear and the VMs previously hosted on it will be available.

C
cccco, 2014-09-01
@cccco

Maybe I didn’t understand something, but maybe remove the second item, for example?

P
Pavel, 2015-06-10
@pbt39

try to look in the direction of autostarting the VM with FreeNAS
if after starting the VM from p5 it is grayed out then there is a powershell script like this (I'll try to paste it here)
#Get Inaccessible Virtual Machines
$VMs = Get-View -ViewType VirtualMachine | ?{$_.Runtime.ConnectionState -eq "invalid" -or $_.Runtime.ConnectionState -eq "inaccessible"} | select name,@{Name="GuestConnectionState";E={$_.Runtime.ConnectionState}}
write-host "------------------------ ---"
Write-host "Inaccessible VMs"
write-host "---------------------"
$VMs
#Reload VMs into inventory
Get-View -ViewType VirtualMachine | ?{$VMs} | %{$_.reload()}
#Show new state of reloaded VMs
$ReloadedVMs = Get-View -ViewType VirtualMachine | ?{$VMs} | select name,@{Name="GuestConnectionState";E={$_.Runtime.ConnectionState}}
write-host "------------------------ ---"
write-host "Reloaded VMs"
write-host "---------------------------"
$ReloadedVMs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question