[Solved] Kernel panic in VM running lede-17.01.1-x86-64-combined-ext4.img.gz

I configured ESXi VM running lede-17.01.1-x86-64-combined-ext4.img.gz image following the process described in https://wiki.openwrt.org/doc/howto/vmware . The VM boots fine and then panics a few times then finally boots ok. There can be 2 to say 10 failed boots before I finally have root shell prompt in the VM console. I tried the same configuration with the yesterdays build (https://downloads.lede-project.org/snapshots/targets/x86/64/) with the same result but slightly different kernel panic message. Then I took the openwrt chaos_calmer image (https://downloads.openwrt.org/chaos_calmer/15.05/x86/64/) and this works just fine.

Here is the kernel panic message:

[ 0.966643] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.^M
[ 0.968101] Freeing unused kernel memory: 864K (ffffffff8162d000 - ffffffff8170
[ 1.006861] preinit[1]: segfault at 7fc3fc617860 ip 00007fc8c93346af sp 00007ff
[ 1.009112] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000
[ 1.009112] ^M
[ 1.010916] Kernel Offset: disabled^M
[ 1.011540] Rebooting in 1 seconds..^M

The VM is guestOS = "otherlinux-64" and has 1GB or RAM.

When the VM finally boots the console output of the same section is:

[ 0.452485] EXT4-fs (sda2): mounted filesystem without journal. Opts: (null)^M
[ 0.452702] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.^M
[ 0.452919] Freeing unused kernel memory: 892K (ffffffff8187a000 - ffffffff8195
[ 0.453136] Write protecting the kernel read-only data: 8192k^M
[ 0.453353] Freeing unused kernel memory: 1772K (ffff880001445000 - ffff8800016
[ 0.453570] Freeing unused kernel memory: 284K (ffff8800017b9000 - ffff88000180
[ 0.463465] init: Console is alive^M

Any ideas?

Well, it looks like the issue is limited to 64bit image. Tried 32bit from https://downloads.lede-project.org/snapshots/targets/x86/generic/ with no issues.

Well - here is the final solution: the .vmdk was built 'thick' and the VM disk was configured 'thin'. This was causing the reboots and other issues. There is nothing wrong with the x86 disk image generated by the build. All that is required is to convert it properly to 'thin'. The steps from the 'raw' disk image are:

  1. Convert from raw image to .vmdk on linux:
    qemu-img convert -f raw -O vmdk lede-17.01.1-x86-64-combined-ext4.img lede-17.01.1-x86-64-combined-ext4.vmdk
  2. Copy the converted 'thin' vmdk to ESXi datastore - I use scp.
  3. Convert from 'thick' vmdk to 'thin'. This is in the ssh session to ESXi in the VM directory:
    vmkfstools -i lede-17.01.1-x86-64-combined-ext4.vmdk lede-17.01.1-x86-64-combined-ext4-thin.vmdk -d thin
  4. Add the vmdk as existing disk to the VM
  5. Boot the Lede VM

when use lede on esxi i got esxi panic.

After I create an preallocated vmdk with VMWare Workstation and dd copy the img to that disk, problem gone!

@pzi123
Thanks.
Your howto helped me a lot!
Works like a charm.

You can also boot the IMG file without converting it.