VMware Cloud Community
LesykM
Contributor
Contributor
Jump to solution

ESXi inside KVM

Hello!

I wonder, if it is possible to run ESXi 5.0/5.1 inside KVM (proxmox) ?

I need to run few for testing purposes. I cannot setup any other virtualization software.

I need only ESXi itself, even without virtual machines inside it:)

Thanks!

Tags (3)
180 Replies
admin
Immortal
Immortal
Jump to solution

Cool!  It looks like KVM is getting much closer to being able to run ESXi.

This appears to be the final stumbling block:

The following VT-x features are required for VT-x support in VMware ESX; however, these features are not available on this host:

    Primary Processor-Based VM-Execution Controls:

       Use TPR shadow

Reply
0 Kudos
gneville
Contributor
Contributor
Jump to solution

Good news,

I've applied this patch to linux 3.17 and this has enabled TPR shadow emulation.

     https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=a7c0b07d570848e50fce4d31...

I can now run 64-bit guests using ESX 6.0.0 beta

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Awesome! Thanks for the update.

Reply
0 Kudos
mkuendig
Contributor
Contributor
Jump to solution

Thanks a lot Mat.

I have a setup with one physical host running Ubuntu 14.04LTS with QEMU2.0. Patched as you suggested.

I have three different ESX installed and they boot and installed correctly:

1. ESX 5.5 with libvirt networking (bridging configured from Libvirt)

2. ESX 6Beta with libvirt networking (bridging configured from Libvirt)

3. ESX 5.5 with Qemu command from Mat  (qemu-system-x86_64 -enable-kvm -cpu host -m 4096 -smp 2  -netdev tap,helper=/usr/local/libexec/qemu-bridge-helper,id=hostnet0 -device vmxnet3,netdev=hostnet0,id=net0 -hda esxi00.img -vnc 192.168.1.2:10 &)

All three guests with ESX cannot communicate with a windows server with virtio drivers.

Number 1 and Number 2 can communicate with other Linux VM's with virtio drivers (but not the host itself)

I'm really struggling to get this working.

Any troubleshooting tips to get communication up and running ?

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Try ESXi 6.0 Beta with an E1000 NIC.

Reply
0 Kudos
mkuendig
Contributor
Contributor
Jump to solution

works. thx.

Reply
0 Kudos
jcp0wermac
Enthusiast
Enthusiast
Jump to solution

The method for Qemu that needs to be modified has changed, any chance we could get an update to the patch?

http://git.qemu.org/?p=qemu.git;a=blob;f=hw/i386/pc_piix.c;h=de75cf0e87909a14af323c22ee683408dd692e0...

Reply
0 Kudos
error10
Contributor
Contributor
Jump to solution

That's because qemu now includes this patch, with a command line option: -machine vmport=off

Reply
0 Kudos
error10
Contributor
Contributor
Jump to solution

I seem to be making some progress on getting ESXi 6.0 to run in qemu, but I'm stumped by this "Unexpected exception 13" thrown when the installer starts up.

I have qemu-2.2.1 on an E3-1231v3 (Dell PowerEdge R220).

My command line is:

/usr/bin/qemu-system-x86_64 -machine accel=kvm -name vm1 -S -machine pc-q35-2.1,accel=kvm,usb=off -cpu Haswell,+abm,+pdpe1gb,+rdrand,+f16c,+osxsave,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -m 4096 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 88ef8c53-9b8d-4c86-9284-2e412983a9bc -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew -global kvm-pit.lost_tick_policy=discard -no-hpet -no-shutdown -global PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -boot strict=on -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 -device ich9-usb-ehci1,id=usb,bus=pci.2,addr=0x3.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.2,multifunction=on,addr=0x3 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.2,addr=0x3.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.2,addr=0x3.0x2 -device lsi,id=scsi0,bus=pci.2,addr=0x4 -device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x5 -drive file=/var/lib/libvirt/images/test.qcow2,if=none,id=drive-scsi0-0-0,format=qcow2 -device scsi-hd,bus=scsi0.0,scsi-id=0,drive=drive-scsi0-0-0,id=scsi0-0-0,bootindex=2 -drive file=/var/lib/libvirt/isos/VMware-VMvisor-Installer-6.0.0-2494585.x86_64.iso,if=none,id=drive-ide0-0-0,readonly=on,format=raw -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 -netdev tap,fd=29,id=hostnet0 -device e1000,netdev=hostnet0,id=net0,mac=52:54:00:8c:2a:ea,bus=pci.2,addr=0x1 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev spicevmc,id=charchannel0,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=com.redhat.spice.0 -spice port=5903,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pcie.0,addr=0x1 -device intel-hda,id=sound0,bus=pci.2,addr=0x2 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x6 -machine vmport=off -msg timestamp=on

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

I suspect you need ignore_msrs=1,

Reply
0 Kudos
error10
Contributor
Contributor
Jump to solution

jmattson wrote:

I suspect you need ignore_msrs=1,

Yes, that did it! The installation is now in progress. Thanks!

Reply
0 Kudos
error10
Contributor
Contributor
Jump to solution

OK, I'm almost all the way there!

The last thing is, when I start a nested VM I get a dialog that asks me:

> Virtualized Intel VT-x/EPT is not supported on this platform. Continue without virtualized msg.intel.hvhwmmu?

After I say Yes, the VM starts up.

Is my CPU (Intel Xeon E3-1231v3) really missing this feature? Or did KVM not pass it through properly? Or does KVM not support it at all?

I'm also running Fedora 21, kernel 3.19.3, qemu 2.2.1.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Virtualized VT-x/EPT would only be necessary for another level of nesting. You have apparently checked the box next to "expose hardware assisted virtualization to the guest operating system."  You should uncheck that box..

Reply
0 Kudos
ymichael
Contributor
Contributor
Jump to solution

Hi,

I have installed vmware 5.5 on qemu, it loaded just fine, got IP from dhcp, everyting looks ok, but the problem with vsphere client.

I can https and ssh to it, but when connection from vsphere client it hangs on "Loading Inventory"

qemu 2.3.0

vmxnet3

vmport=off

Am I missing something?

Thanks in advance.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Firewall issues?

Reply
0 Kudos
ymichael
Contributor
Contributor
Jump to solution

Thanks for your quick reply, but I doubt.

let me give more details on how it runs.

Win7,Vmware workstation, qemu, esxi - I know, I know that I don't need qemu and it runs file on nested workstastion, but for me I need to have as it is.

So everything runs on the same PC - what firewall can be on the way? (tried disabling windows one and esxi hosts one too - didn't help)

Thanks

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

You're running qemu on a Linux VM, right?  What about the Linux firewall?

Reply
0 Kudos
ymichael
Contributor
Contributor
Jump to solution

Sure, it runs on ubuntu, but no firewall there, no iptables, no ufw, nothing.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Perhaps hostd (or some other critical service) has crashed on the ESXi VM?  Using the troubleshooting mode, log in and check the vmkernel.log file for errors.

Reply
0 Kudos
ymichael
Contributor
Contributor
Jump to solution

everyting looks fine, but here is the error from the hostd log

2001-01-01T00:03:15.871Z [28AC2B70 error 'SoapAdapter.HTTPService'] Failed to read request; stream: <io_obj p:0x287092b0, h:-1, <TCP '0.0.0.0:0'>, <TCP '0.0.0.0:0'>>, error: N7Vmacore16TimeoutExceptionE(Operation timed out)

Reply
0 Kudos