-
Notifications
You must be signed in to change notification settings - Fork 453
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
New 'vapp properties' do not work with Ubuntu 14.04/16.04 OVA #381
Comments
I have been able to get this work. In order to inject ovfEnv variables into a vSphere VM, an CDROM device with an appropriate ISO needs to be attached. The If I add a CDROM, then the VM boots as expected with the desired configurations:
|
Hey @sdemura, thanks for opening this. Funny enough I was looking at this last night! I'll investigate this a bit more to see why, but I didn't have much success getting this working 100% by just doing a OVF import from govc and just booting the VM without setting any of the options. Not too sure why, but on my end the OVF would not boot properly - I got an error upon startup and then it hung for a significant period of time waiting for fd0. I'll work on repros using the path that you mentioned too to see what's different, however right off the bat I did notice that the Ubuntu OVF uses the ISO transport and not the guestinfo transport like CoreOS does. Not too sure if that has anything to do with it though. Will update when I have more info. Thanks! |
@vancluever looks like we posted at the same time. see above ^ |
@sdemura I saw! Glad you figured it out and I was suspecting this might be the case. Sounds like we need to prioritize some of the CDROM update work to ensure that OVF templates with ISO transports work as expected. We have other work that is pending here (#300 and #358), so maybe we can group this all together. |
Great. Its quite a coincidence, I have been grappling, struggling and learning from similar work with ubuntu OVA images in the last week as well. Did anyone notice a method for providing network config through user-data? This gist seems to imply, that the OVF transport of ISO at least supports network-config as independent from user-data. If that is so, why does the current ubuntu 16.04 OVA envelope does not have a key for it. EDIT: maybe as this page mentions,
Its in |
In #74, @jason-azze suggested a trick to create an empty CDROM device, which works. I am noticing however that the cloud init bootstrap over ISO doesn't work over that. If I shutdown the machine, changing it to a client device from datastore ISO, and reboot, it works. @vancluever is there a roadmap or expected date when empty client device CDROM support is coming to this provider - last I heard, you said its just a matter of time. Excited about being able to bootstrap my VMs end-to-end without manual tinkering. |
@charandas did you base64 encode your data? Here's an example where I added user-data:
|
Yes @sdemura. The problem isn’t that the user data is invalid. In my countless experiments, the ovf transport hasn’t worked for me on my Ubuntu boxes. But ovf iso transport works everytime. I just check the option to make available the vapp properties as a cdrom in the template itself on vsphere. This has made me think that cloud-init on vsphere cannot read the data out unless it’s from the cdrom. Maybe you know a way about that, if you do, please share. |
@charandas not that I can speak from 100% experience on the Ubuntu template, but there is a OTOH, if a template does not have a vApp configuration defined, it will fall back to the specific This work was initially contributed here, if I understand correctly. Of course, Hopefully we can work on getting this completely resolved soon the correct way for Ubuntu - delivery via the ISO transport. We are working on a number of updates to CDROM device handling, of which this will be one of them. Thanks! |
Thanks @vancluever for the detailed answer. This works for me on coreos without needing the CDROM gymnastics also. My template AFAIK for ubuntu (like my coreos ones) has vApp configuration keys, and they are defined with the help of this provider when provisioning (using the new
Since that works, I have decided to not fight the tigers, and roll with the CDROM option. If in future however, I see the Thanks much! |
Howdi, is this fix for this on; Looking at that commit it would allow you to specify ClientDevice as CDROm to not force an ISO only mount. From my testing providing you have a CDROM on the VM which is in ClientDevice mode, then vSphere will pass through the OVF properties in the ISO format in to the running VM, which cloud-init picks up fine. ** Just compiled the provider from master and looks good;
|
Hi @eperdeme, support for mapping CDROMs to client devices does partially resolve this issue. When a CDROM with |
@charandas did you find a way to configure network using vapp properties? |
@mcanevet I am not sure what exactly you are after, the cloud-config part or the terraform-vsphere integration part. For the latter, ensure, that the OVF environment transport allows ISO as shown in the screenshot. You would need to convert the template into a VM to access that dialog. Once done, convert it back to a template. For the cloud-init itself, something like this pseudo-code (depending on your tools - I use jsonnet prior to terraform) worked for me. You would have to base64 encode this before passing to terraform.
|
Thanks for the feedback on this issue everyone! Support for delivering vApp properties using ISO transport has been added in GH-440. A CDROM with |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform
issue trackers reserved for bug reports and feature requests. For general usage
questions, please see: https://www.terraform.io/community.html.
Terraform Version
vSphere Provider Version
Affected Resource(s)
Please list the resources as a list, for example:
vsphere_virtual_machine
Terraform Configuration Files
Expected Behavior
VM should have been created, and configured with the provided vApp properties.
Actual Behavior
VM hostname and password are not changed.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Using
govc import.ova -options=xenial.json
works as expected, where xenial.json looks like:When deploying via vSphere GUI, these options are configurable and work as well.
References
vApp options were added in #303
The text was updated successfully, but these errors were encountered: