* I have a base VM that was created with a normal kickstart. * I shut the VM down in preparation for a snapshot. * I snapshot it so I can put it back to its original state. * I start the VM and install https://people.redhat.com/rmccabe/cloud-init/cloud-init-0.7.9-20.el7.x86_64.rpm * I shut the VM down in preparation for the template creation * I create a template checking the “seal the template” box * I modify the template and check “use cloud-init/sysprep”, set a generic hostname that will be changed when creating the VM, specify a time zone, specify root authentication and its password, expand networks and supply a DNS server list, a search domain, check in-guest network interface name of eth0, specify the IPV4 boot protocol as static, enter a dummy IP address and the correct netmask and gateway, and set IPV6 boot protocol to none. * I create a VM from the template and supply a hostname under “Name” in the general tab, and then in the Initial Run tab I enter an FQDN in the VM hostname field, and then replace the dummy IP address with the correct one. * After the VM is created I click Run, not Run Once, and all boots up correctly. * If I reboot the server with “shutdown -r” everything networking comes up correctly on these boots. * If I shut down the server, and click Run in oVirt, not run once, the VM comes up with a DHCP address and the /etc/sysconfig/network-scripts/ifcfg-eth0 file is missing all of the network configuration and instead is set up for DHCP.
Checking the version of cloud-init on the newly created VM shows the correct version as listed above. I have not used the REST API for any of this, it’s all been done with the standard GUI interface. Thanks, --Sandy From: users-boun...@ovirt.org [mailto:users-boun...@ovirt.org] On Behalf Of Eitan Raviv Sent: Tuesday, March 20, 2018 3:42 AM To: users@ovirt.org; Berger, Sandy <sber...@qg.com> Subject: Re: [ovirt-users] Fw: Network issues with oVirt 4.2 and cloud-init Hi Sandy, Can you elaborate some more about the steps you have taken? Specifically, how\where do you apply cloud-init-0.7.9-20 rpm? Can you make sure that rpm -q cloud-init after VM reboot is still this one? How do you apply the static IP settings that do persist to the VM - via oVirt web-admin\REST API\other? When you restart the VM via oVirt GUI - do you 'Run' it or 'Run Once'? Thanks, Eitan oVirt networking team On Tue, Mar 20, 2018 at 10:22 AM, Dominik Holler <dhol...@redhat.com<mailto:dhol...@redhat.com>> wrote: Begin forwarded message: Date: Mon, 19 Mar 2018 13:17:08 +0000 From: "Berger, Sandy" <sber...@qg.com<mailto:sber...@qg.com>> To: "users@ovirt.org<mailto:users@ovirt.org>" <users@ovirt.org<mailto:users@ovirt.org>> Subject: [ovirt-users] Network issues with oVirt 4.2 and cloud-init We're using cloud-init to customize VMs built from a template. We're using static IPV4 settings so we're specifying an IP address, subnet mask, and gateway. There is apparently a bug in the current version of cloud-init shipping as part of CentOS 7.4 (https://bugzilla.redhat.com/show_bug.cgi?id=1492726) that fails to set the gateway properly. In the description of the bug, it says it is fixed in RHEL 7.5 but also says one can use https://people.redhat.com/rmccabe/cloud-init/cloud-init-0.7.9-20.el7.x86_64.rpm which is what we're doing. When the new VM first boots, the 3 IPv4 settings are all set correctly. Reboots of the VM maintain the settings properly. But, if the VM is shut down and started again via the oVirt GUI, all of the IPV4 settings on the eth0 virtual NIC are lost and the /etc/sysconfig/network-scripts/ifcfg-eth0 shows that the NIC is now set up for DHCP. Are we doing something incorrectly? Sandy Berger IT - Infrastructure Engineer II Quad/Graphics Performance through Innovation Sussex, Wisconsin 414.566.2123<tel:414.566.2123> phone 414.566.4010<tel:414.566.4010>/2123 pager/PIN sandy.ber...@qg.com<mailto:sandy.ber...@qg.com><mailto:sandy.ber...@qg.com<mailto:sandy.ber...@qg.com>> www.QG.com<http://www.QG.com><http://www.qg.com/> Follow Us: Facebook<http://www.qg.com/social1> | Twitter<http://www.qg.com/social2> | LinkedIn<http://www.qg.com/social3> | YouTube<http://www.qg.com/social4> _______________________________________________ Users mailing list Users@ovirt.org<mailto:Users@ovirt.org> http://lists.ovirt.org/mailman/listinfo/users -- Eitan Raviv IRC: erav (#ovirt #vdsm #devel #rhev-dev)
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users