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
junkoi
Contributor
Contributor
Jump to solution

I tried to work around by SFTP to the ESXi some existing image, but the connection is always dropped very quickly after few seconds of uploading. My image is around 10GB, so not sure if this causes the problem?

Anyway, if I cannot upload existing image, I am stuck without any clue on how to run a guest on ESXi now :-(.

This is pretty desperate situation for me, so any help will be very appreciated.

Thanks.

Reply
0 Kudos
CloudMatt
Contributor
Contributor
Jump to solution

Hi junkoi,

does your ESX Host VM have a working network connection through the bridge on the KVM Host ?

-> I assume it has because it seems you can ssh into it

Any details in the ESX logfiles when you connecting with the vClient ?

I am actually accessing the ESX via the VMware perl-SDK which works absolutely fine here.

My recommendation is to check the vGhetto Script repo - vGhetto Script Repository

or to use openQRM - Open Source IaaS Cloud and infrastructure orchestration: Virtualization with VMware ESX and openQRM ...

Hope it helps,

Matt

Reply
0 Kudos
CloudMatt
Contributor
Contributor
Jump to solution

Hi again junkoi,

just saw your second posting. Seems to be a network/bridging issue in your KVM host setup.

I would like to kindly recommend to re-check your network, ip and bridge configuration on the KVM host.

Also make sure you have set the network type to vmxnet3 when starting the ESX VM.

Hope it helps,

Matt

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

CloudMatt, if that is the network/bridging issue, how can i still SSH to ESXi?

Thanks

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

bdereims wrote:

Thanks jmattson but only works with 32 bit OSes.

I can't launch OVA like vCenter that is 64 bits appliance.

Screen Shot 2014-05-26 at 10.11.00 PM.png

Any tricks to do that?

/b

The trick is to add the missing features to kvm.  I downloaded the latest kvm sources from the git repository, and it looks like three things are missing:

1. For the CPU based controls, there should be a set of "always on" bits, just as there are for the pin-based controls, VM-exit controls and VM-entry controls.  Without these bits, kvm's implementation of VT-x does not conform to Intel's specification.  Adding this should be trivial.  Just take a look at how PIN_BASED_ALWAYSON_WITHOUT_TRUE_MSR is handled.  The required bits for the CPU based controls are bits 1, 4–6, 8, 13–16, and 26.  Let's just hope that the features represented by these bits have been implemented!

2. ESXi requires VM_EXIT_ACK_INTR_ON_EXIT.  Every Intel CPU with VT-x supports this feature.  Though kvm doesn't support it, a Google search reveals a proposed patch from December 2012 to add support for it.  I don't know if that patch will work, but it's a start.

3. ESXi requires CPU_BASED_TPR_SHADOW.  Note that this is different from "FlexPriority."  Every 64-bit Intel CPU with VT-x supports this feature.  Though kvm doesn't support it, a Google search reveals a proposed patch from March 2014 to add support for it.  Again, I don't know if that patch will work, but it's a start.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Unreliable networking sounds like the problem people were having with the e1000 virtual NIC.  Are you using vmxnet3 as the virtual NIC?

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

yes i am using vmxnet3.

i did exactly as described in the blog entry of Matt: Matt's blog: Install and run a full functional VMware ESX Hypervisor within a KVM virtual machine

now how can i debug this issue?

thanks.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

What is the output of 'uname -a' and 'esxcfg-nics -l' under ESX?

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

jmattson, here is the output of those commands:

~ # uname -a

VMkernel localhost 5.5.0 #1 SMP Release build-1623387 Feb 21 2014 17:19:17 x86_64 GNU/Linux

~ # esxcfg-nics -l

Name    PCI           Driver      Link Speed     Duplex MAC Address       MTU    Description                  

vmnic0  0000:00:03.00 vmxnet3     Up   1000Mbps  Full   52:54:00:12:34:56 1500   VMware Inc. vmxnet3 Virtual Ethernet Controller

To make sure i did everything right about bridges, here is the content of the KVM host's /etc/network/interfaces

### /etc/network/interfaces - Ubuntu 14.04 - 64bit

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet manual

auto br0

iface br0 inet dhcp

bridge_ports eth0

bridge_stp off

bridge_fd 0

bridge_maxwait 0

###

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

What kind of CPU do you have?

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

That is Intel Xeon CPU with 8 CPUs. Below is a part of my /proc/cpuinfo

processor    : 0

vendor_id    : GenuineIntel

cpu family    : 6

model        : 30

model name    : Intel(R) Xeon(R) CPU           X3460  @ 2.80GHz

stepping    : 5

microcode    : 0x3

cpu MHz        : 2793.114

cache size    : 8192 KB

physical id    : 0

siblings    : 8

core id        : 0

cpu cores    : 4

apicid        : 0

initial apicid    : 0

fpu        : yes

fpu_exception    : yes

cpuid level    : 11

wp        : yes

flags        : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 popcnt lahf_lm ida dtherm tpr_shadow vnmi flexpriority ept vpid

bogomips    : 5586.22

clflush size    : 64

cache_alignment    : 64

address sizes    : 36 bits physical, 48 bits virtual

power management:

Thanks.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Well, that's interesting.  Your CPU is old enough that it doesn't have EPT support.  Perhaps you are running into issues with kvm's shadow paging implementation.

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

oh, this is interesting to know.

however, KVM can work without EPT, right? is there any workaround for me?

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Right, kvm does not require EPT.  The only difference I can see between your setup and mine, though, is that I am using EPT.  When I get a chance, I will try this with EPT disabled to see if it makes any difference.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

My setup works fine with or without EPT.

Is the physical NIC attached to br0 a wireless adapter, by any chance?

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

the NIC is Ethernet card, not WIFI.

thanks.

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

If you install a different guest with the same bridge settings (but an e1000 NIC), does networking work to that guest?

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

what do you mean by "installing a different guest"? do you mean different ESXi??

Reply
0 Kudos
junkoi
Contributor
Contributor
Jump to solution

i am wondering if there is any other KVM's NIC supported by ESXi (besides VMXnet3 & e1000), so i can try to see if the problem is gone?

thanks

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

junkoi wrote:

what do you mean by "installing a different guest"? do you mean different ESXi??

I was thinking perhaps Linux.

Reply
0 Kudos