Description of problem: No payload sent to rhevm4.0 from cfme-5.7.0 Version-Release number of selected component (if applicable): cfme5.7.0 rhevm4.0.5 How reproducible: all the time Steps to Reproduce: 1.provision against rhevm expecting cloud-init to be ran 2. 3. Actual results: no payload can be seen in the debug output of cloudforms or in the informations from rhevm Expected results: the payuload is passed to rhev and used for cloud-init Additional info:
severity update to reflect severity increas on the ticket
I am not 100% yet, but I inclined to think that is is related to the type of operating system set in the template. In the failing scenario it is 'Red Hat Enteprise Linux 7.x x64'. Can we ask the customer to change it, using the RHV GUI, to 'Linux' and then try again the provisioning?
(In reply to Juan Hernández from comment #6) > I am not 100% yet, but I inclined to think that is is related to the type of > operating system set in the template. In the failing scenario it is 'Red Hat > Enteprise Linux 7.x x64'. Can we ask the customer to change it, using the > RHV GUI, to 'Linux' and then try again the provisioning? changing it didn't help. Customer is using for his test the official openstack image from us.
OK. At this point I think that the problem is that in order to enable cloud-init it is necessary to have a customization template that takes the data from the provisiong form and puts it into a cloud-init file that RVH can understand. To do so the user needs to go to Compute -> Infrastructure -> PXE -> Customization templates. Yes, PXE, even if this isn't going to be used with PXE. There click the Configuration button and then the Add a New customization Template. Use "RHV cloud-init" for the name and description (for example), "CentOS-6" (for example) for the Image type and "CloudInit" for the Type. In the "Script" area type something like this: host_name: <%= evm[:hostname] %> user_name: root root_password: <%= MiqPassword.decrypt(evm[:root_password]) %> Then, when deploying the virtual machine from the template make sure to use this "RHV cloud-init" customization template. This will not configure all the details of the virtual machine, like the IP addresses, but will be useful to verify that things work correct. Please ask the user to try it, and to check that it sets the host name and password correctly. I will update the bug later with more information on how to set the IP addresses.
The configuration of the IP addresses depends on the guest operating system. Assuming that it is RHEL 7 and that NetworkManager is enabled in the template, it should be something like this: # Configure basic host parameeters: host_name: <%= evm[:hostname] %> user_name: root root_password: <%= MiqPassword.decrypt(evm[:root_password]) %> # Run commands to configure the network using the NetworkManager command # line tool: runcmd: - nmcli connection down eth0 - nmcli connection modify eth0 ip4 <%= evm[:ip_addr] %>/<%= evm[:subnet_mask] %> gw4 <%= evm[:gateway] %> ipv4.dns "<%= evm[:dns_servers] %>" ipv4.dns-search "<%= evm[:dns_suffixes] %>" - nmcli connection up eth0
Note that the snippet in the previous comment assumes that in the GUI form the network mask has been written using the prefix notation: 24 instead of 255.255.255.0, for example.
The proposed pull request to add the example customization script is here: Add oVirt cloud-init customization template https://github.com/ManageIQ/manageiq/pull/14139
the customer insists he isn't using PXE nor planning to - he mentioned the follwing : " When using RHVM "New VM" button, in Initial Run tab, Use Cloud-Init/SysPrep , all the configuration data given on this screen is passed to cloud-init via openstack formated cdrom image. I am expecting CloudForms would pass the settings same way. Could you please confirm that Cloudforms supports that kind of parameter pass to RHV ? " from what I understood you still need to build the pxe script, right?
CloudForms does not support that, unless you use a customization template, as described in comments 8 and 9. The fact that the customization template is defined in the PXE menu doesn't mean that it is a "PXE script", or that they need to use PXE, it is just the place where customization templates are defined in the GUI.
Felix, please report back after the customer tries it out.
The customer already replied that the problem is solved with the following alternative customization script: ---8<--- # Configure basic host parameeters: host_name: <%= evm[:hostname] %> user_name: root root_password: <%= MiqPassword.decrypt(evm[:root_password]) %> # network config network-interfaces: | iface eth0 inet static address <%= evm[:ip_addr] %> netmask <%= evm[:subnet_mask] %> gateway <%= evm[:gateway] %> # network restart bootcmd: - ifdown eth0 - ifup eth0 --->8--- That is, in my opinion, better than what I suggested in the pull request. Felix, would be really nice if you can kindly ask the customer to send this as a pull request, similar to the one I proposed. If he doesn't want, or can't I'd like to ask him permission to copy his customization script.
forwarding the question...
we're allowed to copy it
I tested the script suggested by the customer. I liked it more than the one I proposed, because it uses the declarative 'network-interfaces' style instead of calling the 'nmcli' command line tool. Unfortunately it doesn't work correctly if NetworkManager is enabled, which is the default in RHEL 7. I guess that the template used by the customer didn't have NetworkManager enabled. So I am sticking to the script that I proposed initially in the pull request.
This bug can't be verified on CFME-5.8.0.13, since without the fix for bug 1448231 RHV just ignores the payload.