-
Notifications
You must be signed in to change notification settings - Fork 174
Build VM from ISO file #16
Comments
Hi @rszentmihalyi, thanks for your note and sorry for the delay with the answer! |
I think this feature is very important, as relying on a "template" from which you do not really control the lifecycle, can lead to inconsistent outcomes on the long term if using many different environments. Or it would require a 2 step build process for templates, which could be pretty bothersome. That said I really like the full API approach of this builder. (if we could have both, it would be fantastic ;-) ) 👍 |
I totally understand your points. Having a native remote ISO builder is definitely a desired feature. That's just a question of time and priorities. But actually, 2-step build process is exactly the reason we started this development. Creating VMs from scratch is complicated, but possible. Incremental builds where we can split the work into a hierarchy of layers - this is an unique ability. |
Is there any suggestion for the baseline? E.g. an example with 'upload this starting image, we keep it fresh'. Any requirements on the base image? |
We are still using VMware Player and THere are two requirements
|
@mkuzmin is there a specific requirement for VMware branded VMtools? We've switched almost entirely to open-vm-tools as that's what VMware recommends. Thanks! |
yes, |
+1 for iso support. Once we have this feature I am willing to champion the Packer pull request. Even if I have to update the docs and get it past @mwhooker |
I believe this fork, https://github.com/martezr/packer-builder-vsphere, has build from .iso but does not have provisioning capabilities. Some work to integrate the .iso build? |
Good news, everyone! We have started developing ISO-builder. Thanks, @xosmig! We still need to implement |
Thank you for implementing this! Any plans to support http server with this? Many other builders (including the stock |
I've published v2.0-beta1 release. |
And now we have @tallaxes I have no plans to implement |
Thanks for this mkuzmin, it looks really promising. I'm just trying it out however, it doesn't seem to find my host properly. I get the following error - vpshere-iso: error creating vm: resource pool '/DATACENTER/host/HOSTNAME/Resources not found. Can you point me in the right direction? |
Thanks for the response. Yes all our hosts are in a cluster so looks like it is related. I tried to specify the cluster in place of the host and a datastore name but I get an error about resolving to multiple hosts. Any other suggestions or is this a bug? |
I've published v2.0-beta3 with macOS support (#54). It's going to be the last pre-release build. |
@mkuzmin FYI, packer-builder-vsphere-clone works fine with clusters. It's just the packer-builder-vsphere-iso that throws this error: ==> Some builds didn't complete successfully and had errors: Config: |
packer-builder-vsphere-iso validated succesfully, yet during the build throwed the following error: JSON: MOB shows the path to reosource pool should be: 'Datacenter/hostFolder/childEntry/Resources/' or 'Datacenter/hostFolder/childEntry/Resources/resourcePool' . In contrast, the path to esxi hosts is 'Datacenter/hostFolder/childEntry/host/' In a complex vSphere implementation, it is likely that multiple datacenters, clusters, and resource pools, etc. are in use. It appears the RCA is due to improper enumeration of the path. |
@ScriptXaaS I think is would be useful if you could provide the Packer JSON template you are using that produces this error. Thanks! |
I have a few additional questions:
Could someone elaborate where is it {template_dir} defined? In the vSphere-iso context, where is the directory to the template for the build? Is it the datastore where the iso file resided? On VM configuration, floppy files has to point to either a physical drive or, a floppy image(flp). The example is pointing directly to a cfg file.
Here is the JSON template:
] |
@ScriptXaaS here is the info on https://www.packer.io/docs/templates/engine.html I have a work in progress pull request #56 to document all the You can view the pretty version of my work in progress docs at the below URL. https://github.com/KohlsTechnology/packer-builder-vsphere/blob/doc-updates/README.md |
@seanmalloy Thanks for updating the doc. Do you know the right syntax for vmx_data? When adding the following configuration key of vmx_data in the JSON template: I got the error during validation: Error validating build 'vsphere-iso'. 1 error occured:
|
@ScriptXaaS I don't think |
I've named this setting to follow UI language, not internals:
But for network adapters there is a dedicated setting:
|
@mkuzmin: Two cd-roms got mounted in the new VM, but cd-rom1 (with Win10 v1709 ISO) is NOT connected. In contrast, cd-rom2 is shown as connected. Deducing the only one cd-rom drive with the following configuration: "iso_paths": [
The cd-rom still shows NOT connected. It appears cd-rom1 is NOT connected by default. Please fix or even better, give an option to have it connected or not. |
Interesting - I can't reproduce that issue. My config looks the same. "iso_paths": [ |
Hello, Is there way bypass the "datastore write permission" requirement? |
Having no datastore file write privilege, how are you uploading ISO files there? Anyway, I'd try to obtain these privileges - there are many other reasons where direct file access is helpful. |
I'm going to close this issue. The feature is now complete, critical bugs are fixed, and we are preparing a release. Feel free to open separate issues for any your questions and problems. |
i am trying to create a VM from ISO using the below pluggin https://github.com/jetbrains-infra/packer-builder-vsphere/releases i have full administrator permissions on the entire Vcenter and the Datacenter is not nested inside a folder. Sill when i am running packer build rhel.json i am getting errors. Attached the error log along with this. could you please help me on this Regards |
@zenvenki in your log there's |
hi even if i manually create the folder the error message is the same {
], "provisioners": [ |
@zenvenki Please post comment to the issue you've created. |
Late to the party, but I ran into this today. Make sure your ISO path is the correct case exactly, when interacting with non-Windows this matters. |
It would be great if it was possible to use an ISO file as source instead of having to clone a VM (the vmware-iso builder does not support the vSphere API)
The text was updated successfully, but these errors were encountered: