<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1640846142;
        mso-list-type:hybrid;
        mso-list-template-ids:1802518164 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I have a base VM that was created with a normal kickstart.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I shut the VM down in preparation for a snapshot.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I snapshot it so I can put it back to its original state.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I start the VM and install https://people.redhat.com/rmccabe/cloud-init/cloud-init-0.7.9-20.el7.x86_64.rpm<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I shut the VM down in preparation for the template creation<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">I create a template checking the “seal the template” box<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">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.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">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.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">After the VM is created I click Run, not Run Once, and all boots up correctly.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">If I reboot the server with “shutdown -r” everything networking comes up correctly on these boots.<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">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.<o:p></o:p></li></ul>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Checking the version of cloud-init on the newly created VM shows the correct version as listed above.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have not used the REST API for any of this, it’s all been done with the standard GUI interface.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">--Sandy<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> users-bounces@ovirt.org [mailto:users-bounces@ovirt.org]
<b>On Behalf Of </b>Eitan Raviv<br>
<b>Sent:</b> Tuesday, March 20, 2018 3:42 AM<br>
<b>To:</b> users@ovirt.org; Berger, Sandy <SBERGER@qg.com><br>
<b>Subject:</b> Re: [ovirt-users] Fw: Network issues with oVirt 4.2 and cloud-init<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi Sandy,<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Can you elaborate some more about the steps you have taken?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">How do you apply the static IP settings that do persist to the VM - via oVirt web-admin\REST API\other?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">When you restart the VM via oVirt GUI - do you 'Run' it or 'Run Once'?<o:p></o:p></p>
</div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<p class="MsoNormal">Eitan<o:p></o:p></p>
</div>
<p class="MsoNormal">oVirt networking team<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Mar 20, 2018 at 10:22 AM, Dominik Holler <<a href="mailto:dholler@redhat.com" target="_blank">dholler@redhat.com</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
Begin forwarded message:<br>
<br>
Date: Mon, 19 Mar 2018 13:17:08 +0000<br>
From: "Berger, Sandy" <<a href="mailto:SBERGER@qg.com">SBERGER@qg.com</a>><br>
To: "<a href="mailto:users@ovirt.org">users@ovirt.org</a>" <<a href="mailto:users@ovirt.org">users@ovirt.org</a>><br>
Subject: [ovirt-users] Network issues with oVirt 4.2 and cloud-init<br>
<br>
<br>
We're using cloud-init to customize VMs built from a template. We're<br>
using static IPV4 settings so we're specifying an IP address, subnet<br>
mask, and gateway. There is apparently a bug in the current version of<br>
cloud-init shipping as part of CentOS 7.4<br>
(<a href="https://bugzilla.redhat.com/show_bug.cgi?id=1492726" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=1492726</a>) that fails to set<br>
the gateway properly. In the description of the bug, it says it is<br>
fixed in RHEL 7.5 but also says one can use<br>
<a href="https://people.redhat.com/rmccabe/cloud-init/cloud-init-0.7.9-20.el7.x86_64.rpm" target="_blank">https://people.redhat.com/rmccabe/cloud-init/cloud-init-0.7.9-20.el7.x86_64.rpm</a><br>
which is what we're doing.<br>
<br>
When the new VM first boots, the 3 IPv4 settings are all set correctly.<br>
Reboots of the VM maintain the settings properly. But, if the VM is<br>
shut down and started again via the oVirt GUI, all of the IPV4 settings<br>
on the eth0 virtual NIC are lost and<br>
the /etc/sysconfig/network-scripts/ifcfg-eth0 shows that the NIC is now<br>
set up for DHCP.<br>
<br>
Are we doing something incorrectly?<br>
<br>
Sandy Berger<br>
IT - Infrastructure Engineer II<br>
<br>
Quad/Graphics<br>
Performance through Innovation<br>
<br>
Sussex, Wisconsin<br>
<a href="tel:414.566.2123">414.566.2123</a> phone<br>
<a href="tel:414.566.4010">414.566.4010</a>/2123 pager/PIN<br>
<br>
<a href="mailto:sandy.berger@qg.com">sandy.berger@qg.com</a><mailto:<a href="mailto:sandy.berger@qg.com">sandy.berger@qg.com</a>><br>
<a href="http://www.QG.com" target="_blank">www.QG.com</a><<a href="http://www.qg.com/" target="_blank">http://www.qg.com/</a>><br>
<br>
Follow Us: Facebook<<a href="http://www.qg.com/social1" target="_blank">http://www.qg.com/social1</a>> |<br>
Twitter<<a href="http://www.qg.com/social2" target="_blank">http://www.qg.com/social2</a>> |<br>
LinkedIn<<a href="http://www.qg.com/social3" target="_blank">http://www.qg.com/social3</a>> | YouTube<<a href="http://www.qg.com/social4" target="_blank">http://www.qg.com/social4</a>><br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Eitan Raviv<br>
IRC: erav (#ovirt #vdsm #devel #rhev-dev)<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>