Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No operating system found when applying Terraform plan for Windows 10 template #441

Closed
lawrence-c opened this issue Mar 26, 2018 · 7 comments

Comments

@lawrence-c
Copy link

commented Mar 26, 2018

I've been slowly expanding the operating systems which I play with with Terraform Vsphere's provider, and am having an issue with using a Windows 10 Template. I can manually clone the template in VSphere just fine, and the Virtual Machine works, however when using Terraform it fails with:

* vsphere_virtual_machine.vpshere_build_machine: timeout waiting for a routeable interface

However, looking at the Virtual Machine itself it looks like it's booting from the Network instead?

Network boot from Intel E1000e
Copyright (c)....
CLIENT MAC ADDR: XX XX XX XX XX XX GUID: etc..
PXE-E53: No boot filename received
PXE-M0F: Exiting Intel PXE ROM.
Operating System not found

I'm not sure what I've configured incorrectly? But the Terraform configuration works for a Windows 7 template. Am I missing something?

Thanks!

Terraform Version

Terraform v0.11.3
+ provider.vsphere v1.1.0

Affected Resource(s)

  • vsphere_virtual_machine

Terraform Configuration Files

provider "vsphere" {
	version = "1.1.0"
	vsphere_server = "${var.vsphere_vcenter}"
	user = "${var.vsphere_user}"
	password = "${var.vsphere_password}"
	allow_unverified_ssl = true
}

data "vsphere_datacenter" "dc" {
	name = "${var.vsphere_datacenter}"
}

data "vsphere_datastore" "datastore" {
	name = "${var.vsphere_datastore}"
	datacenter_id = "${data.vsphere_datacenter.dc.id}"
}

data "vsphere_resource_pool" "pool" {
	name = "${var.vsphere_cluster}/Resources"
	datacenter_id = "${data.vsphere_datacenter.dc.id}"
}

data "vsphere_network" "network" {
	name = "VM Network"
	datacenter_id = "${data.vsphere_datacenter.dc.id}"
}

data "vsphere_virtual_machine" "template" {
	name = "${var.vm_template}"
	datacenter_id = "${data.vsphere_datacenter.dc.id}"
}

resource "vsphere_virtual_machine" "vpshere_build_machine" {
	name = "${var.vm_name}"
	folder = "${var.vm_folder}"
	resource_pool_id = "${data.vsphere_resource_pool.pool.id}"
	datastore_id = "${data.vsphere_datastore.datastore.id}"

	num_cpus = "${var.vm_cpu}"
	memory = "${var.vm_ram}"
	guest_id = "${data.vsphere_virtual_machine.template.guest_id}"
	scsi_type = "${data.vsphere_virtual_machine.template.scsi_type}"

	network_interface {
		network_id = "${data.vsphere_network.network.id}"
		adapter_type = "${data.vsphere_virtual_machine.template.network_interface_types[0]}"
	}

	disk {
		name = "${var.vm_name}.vmdk"
		size = "${data.vsphere_virtual_machine.template.disks.0.size}"
	}

	clone {
		template_uuid = "${data.vsphere_virtual_machine.template.id}"
	}
@vancluever vancluever added the question label Mar 28, 2018
@lawrence-c

This comment has been minimized.

Copy link
Author

commented Apr 17, 2018

So, on closer investigation - it was because the template machine has EFI set as the Firmware, while upon cloning, it changed it to BIOS which causes the machine to fail with the error machined above.

Looking to fix this somehow...

Related issue #328.

@vancluever

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2018

@SurferL yeah I think we need to expose the firmware of the source template, this should address this issue straight out. In the meantime you will need to know for sure if the templates you are deploying are EFI or BIOS-based.

Thanks!

@vancluever vancluever added enhancement and removed question labels Apr 17, 2018
@lawrence-c

This comment has been minimized.

Copy link
Author

commented Apr 17, 2018

@vancluever That sounds good! I'm happy for this to be closed and for you to use issue #328 as the main place for that if you want :)

@vancluever

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2018

@SurferL more visibility is fine and helps us track demand for a feature anyway. Let's keep it open! 🙂

@lawrence-c

This comment has been minimized.

Copy link
Author

commented Apr 17, 2018

@vancluever I'm assuming a fix would be to make sure the template is BIOS based?

@vancluever

This comment has been minimized.

Copy link
Contributor

commented Apr 17, 2018

@SurferL - yeah that should be fine. If you standardize all of your templates around BIOS firmware you won't have to worry about which ones are EFI and which ones are not.

@bill-rich

This comment has been minimized.

Copy link
Contributor

commented Apr 24, 2018

@SurferL We just added the firmware attribute to the virtual machine data source in #485, so you can now use that to ensure the firmware in your virtual machine configuration matches the source template.

@bill-rich bill-rich closed this Apr 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.