From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: Re: ESXi under KVM Date: Tue, 17 May 2016 12:47:32 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Cc: kvm@vger.kernel.org To: Oleg Ilyin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46267 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbcEQQre (ORCPT ); Tue, 17 May 2016 12:47:34 -0400 In-Reply-To: (Oleg Ilyin's message of "Tue, 17 May 2016 16:42:05 +0300") Sender: kvm-owner@vger.kernel.org List-ID: Oleg Ilyin writes: > Hi, > could you help me please to solve my issue with run VM on ESXi which > running on KVM? > > > I have Ubuntu 14.04.4 LTS > ESX 6.0 vmware-201601001-3380124-iso > Running hypervisor: QEMU 2.4.0 > > I try to run VM on EXSi which running under KVM. > So, ESXi was successfull installed, the command in ps : > > qemu-system-x86_64 -enable-kvm -name esx -S -machine > pc-i440fx-2.4,accel=kvm,usb=off -cpu Nehalem,+invpcid,+vmx -m 8096 > -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 -uuid > b2c3b37b-9596-98ab-8e0d-f05df89d2920 -no-user-config -nodefaults > -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/esx.monitor,server,nowait > -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc > -no-shutdown -boot strict=on -device > piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive > file=/var/lib/libvirt/images/esx-20.img,if=none,id=drive-ide0-0-0,format=raw > -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 > -drive if=none,id=drive-ide0-1-0,readonly=on,format=raw -device > ide-cd,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -netdev > tap,fd=26,id=hostnet0 -device > e1000,netdev=hostnet0,id=net0,mac=52:54:00:96:74:1c,bus=pci.0,addr=0x3 > -chardev pty,id=charserial0 -device > isa-serial,chardev=charserial0,id=serial0 -vnc 0.0.0.0:0 -device > cirrus-vga,id=video0,bus=pci.0,addr=0x2 -device > virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4 > > But I always get error like : > Virtualized INtel VT-x/EPT is not supported on this platform. > Continure without virtualized msg.intel.hvhwmmu? during starting VM on > ESXi I haven't tried to figure out that virtual hardware mode ESX has but with testing help from infernix on #qemu, I know these are the things ESX looks for: invept global invept single context (easy to advertise a dummy, kvm actually used to but we removed it sometime in the past) ept execute only bit (on my todo list) vpid: global/single context/single context retaining globals I first two are advertised, the last one isn't and just advertising this bit seems to work atleast for the boot part. Also, you probably need kvm=off. If you get to the log when esx tries to launch the guest, we will have a clearer picture of what's actually failing but I suspect what I mentioned above is what you are hitting. > cat /proc/cpuinfo on 0 host machine > 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 pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts > rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq > dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid > dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer xsave avx > f16c rdrand lahf_lm abm ida arat epb xsaveopt pln pts dtherm > tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 avx2 > smep bmi2 erms invpcid > > I added these options in /etc/vmware/config > > vhv.allow = "TRUE" > hv.assumeEnabled="TRUE" > vhv.enable = "TRUE" As far as I know, this won't work. You have to trick esx into thinking it's running on real hardware. vhv has esx-isms we probably don't know of yet. Bandan > vmx.allowNested = "TRUE" > > But, it didn't help me. ( I rebooted ESXi also) > > It affected only for 32-bit VM, which failed with new error . > > > cat /sys/module/kvm_intel/parameters/nested > Y > cat /sys/module/kvm/parameters/ignore_msrs > Y > cat /sys/module/kvm_intel/parameters/ept > Y > > lsmod |grep kvm > kvm_intel 143148 6 > kvm 451729 1 kvm_intel > > > my xml: > > > esx > b2c3b37b-9596-98ab-8e0d-f05df89d2920 > 8290304 > 8290304 > 4 > > /machine > > > hvm > > > > > > > > > Nehalem > Intel > > > > > > > > > destroy > restart > restart > > /usr/bin/kvm-spice > > > > > >
> > > > > > >
> > > >
function='0x2'/> > > > > > > >
function='0x1'/> > > > > > > > >
function='0x0'/> > > > > > > > > > > > > > > > > >