Running ESXi on Unraid


Recommended Posts

I have a pretty nice UnRaid box and would like do some Vmware lab work. I would like to install some ESX VMs to test setups. I was able to get 6.5 to run but it doesn't detect and network adapters. What are the tips and tricks for getting that to run? Is there a possible OVA import feature coming? 

Link to comment

If you really want to use Esxi I wouldn't recommend installing it on unRAID, I would recommend installing it on bare metal. You are not likely to find Esxi running on unRAID as a production server in the real world. There are lots of inexpensive HP, Dell, Lenovo servers you can buy off eBay that are a few generations old that should run up to Esxi 6.0. That would be a better experience for Exsi in my opinion.

Link to comment
22 hours ago, ashman70 said:

If you really want to use Esxi I wouldn't recommend installing it on unRAID, I would recommend installing it on bare metal. You are not likely to find Esxi running on unRAID as a production server in the real world. There are lots of inexpensive HP, Dell, Lenovo servers you can buy off eBay that are a few generations old that should run up to Esxi 6.0. That would be a better experience for Exsi in my opinion.

Plus you could run unRAID as an ESXi VM.  I did that for several years and it worked well.  I might be switching back to that if I cannot get a PCI (note not PCIexpress) tuner to pass through in unRAID.  ESXi 5.0 had no problem and I'm hoping 6.5 will as well.

Edited by BobPhoenix
Link to comment
  • 5 months later...

Pick up a cheap NUC. Put lots of RAM In it. Not sure if it will be as beefy as getting a Dell etc off of eBay. I can vouch for the NUC though, it works flawlessly. Sipping electricity, and the form factor rocks. And works out of the box. Mine is an older i5 Dual Core job, with 512GB M2 SSD, with 16GB RAM. Whereas my unRAID box is a Xeon Hex Core with 6GB RAM. :) Needless to say, I run all my VMs on the NUC. I don't do much with the VMs other than to run Docker containers sometimes or playing around with monitoring systems, and general DevOps kind of work. I've most 99% of my Dockers to unRAID, such as Plex, and a few other things. 

Link to comment

I also ran unraid virtualized on ESXi for years, but recently switched to running it BM and I'm now discovering and playing with the wonderful world of dockers.

I still have another ESXi host to play with as well. :)

 

As I was curious if I would be able to get this to work, I just was able to get esxi 6.0 update 1 installed on my unraid box as follows:

- create a new VM using the coreos template (probably not really imported what template to choose)

- make sure to select to provision 2 cpu cores (not threads) to the VM, just assigning 2 threads from a single core failed, with following error:

CPU_CORES_ERROR: This host has [1] cpu core(s) which is less than recommended [2] cpu cores

 

  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='2' threads='2'/>
  </cpu>

 

- edit the xml and change

1) the network model from virtio to e1000

 

       <model type='e1000'/>
 

2) storage disk to type 'sata' if not already the case

 

       <target dev='hdc' bus='sata'/>
 

All other settings can be left default.

 

During installation I did get a few warnings though:

 

1) HARDWARE VIRTUALIZATION is not a feature of the CPU, or is not enabled in the BIOS.

-> I believe this is related to 'nested' virtualization setting as explained here https://allyourco.de/running-vmware-esxi-under-qemu-kvm/

 

I did not test, but probably following might work:

- stop qemu

- edit /etc/modprobe.d/kvm.conf as needed / explain on the previous site

- unload / reload the kvm, kvm-intel modules

- start qemu

 

2) UNSUPPORTED_DEVICES_WARNING: This host has unsupported devices [some pci device]

-> I can probably go into the xml and remove the device, but it doesn't seem to cause an issue

 

I did not test creating/running a VM inside this ESXi instance, since I believe this requires having the hardware virtualization enabled.

I also don't know how well a VM will run.  I have played with VMs running in nested ESXi running on ESXi and it ran well enough to play and run basic stuff.

 

 

 

 

Link to comment
  • 2 years later...

I stumbled across this thread and thought I might update it with my experience.

Installing ESXi 6.5 on Unraid 6.8

 

My experience was almost identical to the above withe the following additional info:

OS

 <type arch='x86_64' machine='pc-i440fx-4.2'>hvm</type>

Disk

<target dev='hda' bus='ide'/>

NIC

<model type='e1000'/>

 

Some notes;

ESXi was unable to see a disk target to install to with vdisk bus type SATA and a Q35 machine type. I didn't test SCSI or SATA with pc-i440 machine type.

*Edit - SATA Works with pc-i440 machine type.

Any change to the config whatsoever in form view resets the NIC model type back to virtio. This needs to be manually changed back to e1000 after any alteration to the VM config in xml view. Probably a feature request for form view to provide nic model field.

NFS export configured in unraid then mounted as a datastore to ESXi no probs.

Import of an OVA - no probs.

*Edit - if you want esxi to be usable - nested virtualization should be enabled. Excellent guide from Spaceinvader One here:

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwiY5MqGlPLpAhUTheYKHZeIBT0QwqsBMAF6BAgLEAQ&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2-saWn6ZbHc&usg=AOvVaw2dBFaVjPVA3Tu_xXODOr-M

 

 

Edited by Chenomics
Update
Link to comment
  • 1 month later...
  • 3 weeks later...

I recently made a try with esxi 7 but without success, I got nic (using vmxnet3 or e1000 as the network card instead of virtio) to work but I didn't found a way to detect hard drive. However I have been able to install esxi 6.7  thanks to this

https://www.cloudgardens.eu/blog/vmware-esxi-running-under-qemu-kvm/

It was working but not properly. I'm frequently losing network connection. I have been able to copy isos to the datastorage but I've not been able to copy a VM through vcenter standalone converter.

For now I have to keep my esxi server.

 

 

I take a look at the guide from  @SpaceInvaderOne and download the scripts. They are not working for AMD. Next changes have to be done:

In "Nested Off" folder, file "script" replace:
Line 19
            elif [ "$pushnotifications" -eq 2 ]; then
by
            elif [ "$cputype" -eq 2 ]; then

The same in "Nested On" folder, file "script" on line 20
            elif [ "$pushnotifications" -eq 2 ]; then

 

 

Edited by AlexMex
Link to comment
  • 6 months later...
  • 7 months later...
On 3/4/2021 at 4:06 PM, F3nris said:

I just ran across this guide when I was looking into the possibility of doing this as well. I have not tried it. 

 

https://www.rootisgod.com/2020/ESXi-On-Unraid/

 

 

This guide does work. If you can use the 2 CPU, 4Core allocation, you do not need to make many changes.

 

To speed things up,  (qcow type) is mentioned in the high level text, but not the image example if you are just following the picture for configuration.

 

I found the guide to be excellent.

  • Like 1
Link to comment
  • 2 months later...

I used the above guide to install ESXi 6.7 and 7.0 up2a.  I had no issues with NIC's . However, I have a weired problem. I cannot copy anything to ESXi "datastores", either using webbrowser or SCP.  Forums attribute this behaviour to certificates, I have tried to resolve that too. However, this still does not work.

 

No files can be copied to datastores..either during OVA deployment or direct upload to datastores.. Has anybody encountered this type of issue ? any help would be appreciated

Link to comment
  • 1 year later...

Following rootisgod.com guide I got esxi 7.0.u1 running on UR 6.12.3 without issue. Here is my VM XML.

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='6'>
  <name>ESXi-7.0.1</name>
  <uuid>da949910-4a06-9bdc-2af9-0f9f29fe7cb3</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>33554432</memory>
  <currentMemory unit='KiB'>33554432</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>16</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='24'/>
    <vcpupin vcpu='2' cpuset='9'/>
    <vcpupin vcpu='3' cpuset='25'/>
    <vcpupin vcpu='4' cpuset='10'/>
    <vcpupin vcpu='5' cpuset='26'/>
    <vcpupin vcpu='6' cpuset='11'/>
    <vcpupin vcpu='7' cpuset='27'/>
    <vcpupin vcpu='8' cpuset='12'/>
    <vcpupin vcpu='9' cpuset='28'/>
    <vcpupin vcpu='10' cpuset='13'/>
    <vcpupin vcpu='11' cpuset='29'/>
    <vcpupin vcpu='12' cpuset='14'/>
    <vcpupin vcpu='13' cpuset='30'/>
    <vcpupin vcpu='14' cpuset='15'/>
    <vcpupin vcpu='15' cpuset='31'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-5.1'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='8' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
    <feature policy='require' name='vmx'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/user/domains/Linux/vdisk1.img' index='3'/>
      <backingStore/>
      <target dev='hdc' bus='usb'/>
      <serial>vdisk1</serial>
      <boot order='1'/>
      <alias name='usb-disk2'/>
      <address type='usb' bus='0' port='1'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/user/domains/Linux/vdisk2.img' index='2'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <serial>vdisk2</serial>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/isos/VMware-VMvisor-Installer-7.0U1-16850804.x86_64.iso' index='1'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:da:f9:0e'/>
      <source bridge='br0'/>
      <target dev='vnet5'/>
      <model type='vmxnet3'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/3'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-6-Linux/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='2'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>
 

Edited by tjsyl
Mislable
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.