Issues Provisioning CentOS 7 and Ubuntu 16.04 on ESXi

Hello all!

I’m attempting to use Foreman to automate provisioning of new VMs in my ESXi environment (two hosts running ESXi 6.0, managed by vCenter 6.5) but so far I’ve not been able to get a single VM successfully provisioned.

I’ve installed Foreman 1.15.6 on a Ubuntu 16.04 VM hosted on one of my two ESXi hosts. I’ve created a dedicated Provisioning network with its own VLAN that is configured on both hosts. I’ve configured Foreman to serve DHCP, TFTP and act as a DNS proxy. It is also configured to provision VMs through vCenter.

I’ve tried to provision both CentOS 7 and Ubuntu 16.04 VMs and neither is working. In both cases, the VM itself is created fine in ESXi with the appropriate specs (CPU, RAM, disk, etc.) and boots up, so I think the ESXi half is working fine.

In the CentOS provisioning flow, after creating the host in Foreman the VM is created in ESXi and begins to boot. It pulls the files over TFTP to boot with PXE but then fails at the point of trying to write anything to disk (Screenshot). I’m using the default CentOS mirror, Kickstart Default partition table, and PXELinux BIOS PXE Loader. My assumption is that something’s up with the partition table config, but after doing some research it appears to be fine and should auto-partition the disk based upon its size. Changing the SCSI controller on the ESXi side has no effect.

In the Ubuntu provisioning flow, I can’t even get booted into an installer. Using the default Ubuntu mirror, Preseed Default partition table, and PXELinux BIOS PXE loader, upon booting the VM I get stuck at a generic Foreman grub boot menu with several options, but none will take me to the Ubuntu installer (Screenshot). I’ve tried different PXE loaders but the only ones that will get me this far are the PXELinux ones - I can’t use any of the Grub ones - Foreman complains that I’m missing some configuration that for the life of me I can’t find.

Forgive me if I’ve left out some important details - I’m just trying to get this to work. I’m no stranger to traditional installation methods of these operating systems, but I’m a little out of my depth with Foreman. Any help would be greatly appreciated!

Hello,

just a wild guess, the images has not been downloaded on the proxy before the
provisioning started. If you reboot the machine after a while, does it work?
Also can you check installation media on you tftp foreman proxy? See /var/lib/
tftpboot/boot and also check that files sizes looks correct.

Hope this helps

I ended up finding my answer in a thread on Reddit.

To save you a click, here’s what I did:

  1. Global Parameters - Add:
    a. enable-puppet4 -> true
    b. enable-puppetlabs-pc1-repo -> true
  2. Operating Systems -> Ubuntu 16.04.3 LTS
    a. Partition Tables -> Preseed default
    b. Installation Media -> ``
    c. Templates -> (In Order) Preseed default finish, Preseed default PXELinux, Preseed default, No Selection
  3. Configure -> Host Groups -> (Default)
    a. Operating System -> PXE Loader -> PXELinux BIOS
  4. Infrastructure -> Compute Profiles -> 1-Small -> VMware -> Firmware -> BIOS

After that, everything started working perfectly.

1 Like

same issue i am facing detect disk error. while started the provisioning by Foreman but gets stucked in middle and error “detect disk” failed Thanks