Terraforming vSphere and Correct Firmware Config
After countless of hours spent in Terraforming Azure, it was time to roll sleeves and conquer next the Terraforming vSphere quest.
The basic concept is similar, but there are differences, of course. Luckily we have the Google today, so I found plenty of examples. And as seems to be the norm, they all lack some important bits. I know, it's easy to write a very simple howto without too many bells and whistles. But no one will actually use that kind of setup in the real life.
I cloned a GitHub repo, and tried to follow the linked tutorial, except not CentOS 7 but another Linux variant. But it shouldn't be an issue in this exercise. Otherwise everything worked like charm, but it just didn't boot.
My newly created VM couldn't find the boot disk!
Tried again. No luck.
Tried a bit different config. As you can already guess, no luck.
Okay, perhaps the template I created is somehow broken? I tried to deploy the VM from a template via vSphere UI.
Guess what? It worked. Without any issues.
*sigh*
Checked settings for both VMs, and didn't find any issues.
"One more googling, before I'll do something else for a while."
And I found out, that Terraform doesn't do 1:1 clone, it sets some settings to their Terraform default values which breaks things, if you are unlucky. Unlucky = 'A person, who didn't read the manual thoroughly enough and assumed things'.
firmware = "efi" in the VM configuration block of the Terraform config was the solution. No wonder it didn't find the OS disk during boot, because the template was using EFI and Terraform defaults to BIOS.
It seems that I'll need to get a huge cup of tea, and read the documentation again, and more thoroughly this time. I'm quite sure that this is not the only setting which doesn't behave like you would first expect.
The basic concept is similar, but there are differences, of course. Luckily we have the Google today, so I found plenty of examples. And as seems to be the norm, they all lack some important bits. I know, it's easy to write a very simple howto without too many bells and whistles. But no one will actually use that kind of setup in the real life.
I cloned a GitHub repo, and tried to follow the linked tutorial, except not CentOS 7 but another Linux variant. But it shouldn't be an issue in this exercise. Otherwise everything worked like charm, but it just didn't boot.
My newly created VM couldn't find the boot disk!
Tried again. No luck.
Tried a bit different config. As you can already guess, no luck.
Okay, perhaps the template I created is somehow broken? I tried to deploy the VM from a template via vSphere UI.
Guess what? It worked. Without any issues.
*sigh*
Checked settings for both VMs, and didn't find any issues.
"One more googling, before I'll do something else for a while."
And I found out, that Terraform doesn't do 1:1 clone, it sets some settings to their Terraform default values which breaks things, if you are unlucky. Unlucky = 'A person, who didn't read the manual thoroughly enough and assumed things'.
firmware = "efi" in the VM configuration block of the Terraform config was the solution. No wonder it didn't find the OS disk during boot, because the template was using EFI and Terraform defaults to BIOS.
It seems that I'll need to get a huge cup of tea, and read the documentation again, and more thoroughly this time. I'm quite sure that this is not the only setting which doesn't behave like you would first expect.
Comments
Post a Comment