I have a Packer build procedure, that works like a charm, when with CentOS 6.7.
1- Packer (with virtio disk) + QEmu + CentOS 6.7 ISO;
2- Create a RAW image;
3- Convert the RAW image into QCOW2 for KVM hypervisors (okay);
4- Convert the RAW image into VMDK for ESXi hypervisors (okay).
However, when doing the very same procedure, with CentOS 7.2 ISO, it does not boot on ESXi!
After research, I realized that it is not auto-loading the sd_mod on ESXi.
I’m seeing errors like this:
dracut-initqueue timeout dracut-initqueue timeout ….
And it drops to “dracut#” shell, where I can see that there is no
/dev/sda listed on /proc/partitions.
I think I tried everything!
My last try was, during Packer build, to append “add_drivers+=”
sd_mod” to /etc/dracut.conf and re-building initramdisk by running
“dracut -f”. However, it does not boot either (on ESXi)!
I can still boot using Rescue mode on VMWare, then, I can see that sd_mod is inside of initramfs as expected (lsinitrd FTW) but, dracut does not load it! I tried “force_drivers+=” sd_mod”, doesn’t work too…
Weird is that, while during Rescue, if I run “dracut -f” again, then, it works! Normal boot proceeds… But this is unacceptable, because I
can not ship a half-broken VMDK and tell customers to first boot on Rescue, run “dracut -f” and then, use the system.
So, why the heck the “dracut -f” executed when as a KVM guest have no effect for later ESXi usage?
What am I missing?
I really appreciate any help!