This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1750862 - [cloud-init][ESXi][RHEL8]VMware datasource resets on every boot causing it to lose network configuration
Summary: [cloud-init][ESXi][RHEL8]VMware datasource resets on every boot causing it to...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cloud-init
Version: 8.1
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: 8.5
Assignee: Ani Sinha
QA Contact: Huijuan Zhao
Jiri Herrmann
URL:
Whiteboard:
Depends On: 1750859
Blocks: 1916117
TreeView+ depends on / blocked
 
Reported: 2019-09-10 16:03 UTC by Rick Barry
Modified: 2024-11-20 07:54 UTC (History)
27 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.Setting static IP in a RHEL virtual machine on a VMware host does not work Currently, when using RHEL as a guest operating system of a virtual machine (VM) on a VMware host, the DatasourceOVF function does not work correctly. As a consequence, if you use the `cloud-init` utility to set the VM's network to static IP and then reboot the VM, the VM's network will be changed to DHCP. To work around this issue, see the link:https://kb.vmware.com/s/article/71264[VNware knowledgebase].
Clone Of: 1750859
Environment:
Last Closed: 2023-10-09 02:08:18 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 192372 0 None None None 2023-09-27 16:47:14 UTC
Red Hat Issue Tracker   RHEL-12122 0 None Migrated None 2023-10-09 02:08:17 UTC
Red Hat Knowledge Base (Solution) 5019751 0 None None None 2020-11-04 02:33:31 UTC

Comment 2 Eduardo Otubo 2020-05-05 13:04:48 UTC
This issue was addressed by these two pull-requests:
https://github.com/canonical/cloud-init/pull/56
https://github.com/canonical/cloud-init/pull/229

Both *didn't* landed upstream, which means this might take a little while to be updated.
I'll work on this in parallel and update this BZ as soon as I have any news.

Comment 4 Eduardo Otubo 2020-10-06 13:22:17 UTC
This feature is still being worked upstream. VMWare is trying to replace OVF with a new DataSource that doesn't seem to hit this bug, called guest-info. This feature nowhere near to be upstream.

Possibly will be available on the next cloud-init release (20.4) and will be able to be backported to RHEL-8.4/cloud-init-20.3.

Lowering the Priority for now.

Comment 9 IBM Bug Proxy 2021-04-12 19:50:26 UTC
------- Comment From rpsene.com 2021-04-12 15:40 EDT-------
Whenever a new VM is created based on an image, or even installing a new VM with the distro image, cloud-init will generate a new instance-id for that specific VM. When you remove the Data Source and reboot, cloud-init thinks it is a new instance, regenerates a new instance-id and run again. That is when the network configuration is overwritten.

https://bugzilla.redhat.com/show_bug.cgi?id=1593010
https://bugzilla.redhat.com/show_bug.cgi?id=1750859

The workaround for this is to disable the network management after the VM is up and running:

vi /etc/cloud/cloud.cfg
add:
network:
config: disabled

We need to understand why this is happening on PowerVS (not sure if storage can be the root cause).

Comment 10 Eduardo Otubo 2021-04-13 13:13:09 UTC
(In reply to IBM Bug Proxy from comment #9)
> ------- Comment From rpsene.com 2021-04-12 15:40 EDT-------
> Whenever a new VM is created based on an image, or even installing a new VM
> with the distro image, cloud-init will generate a new instance-id for that
> specific VM. When you remove the Data Source and reboot, cloud-init thinks
> it is a new instance, regenerates a new instance-id and run again. That is
> when the network configuration is overwritten.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1593010
> https://bugzilla.redhat.com/show_bug.cgi?id=1750859
> 
> The workaround for this is to disable the network management after the VM is
> up and running:
> 
> vi /etc/cloud/cloud.cfg
> add:
> network:
> config: disabled
> 
> We need to understand why this is happening on PowerVS (not sure if storage
> can be the root cause).

Hey!

Is this the same issue as the other BZ for RHEL-7.9? I'm curious to understand, are you guys running VMware nested on PowerVS? Or is it just the same behavior? If it's not related to Vmware, please file a new BZ and we can go from there - this BZ tracks a known problem existing on VMware DataSource only.

Thanks!

Comment 11 xiachen 2021-06-16 03:33:14 UTC
Hi rpsene.com,

For your question about cloud-init on PowerVS, you can get the answer from this upstream bug https://bugs.launchpad.net/cloud-init/+bug/1893770,
and a short term solution, https://bugs.launchpad.net/cloud-init/+bug/1893770/comments/24

If any more question about cloud-init on PowerVS, you can file a new bug.

Thanks

(In reply to IBM Bug Proxy from comment #9)
> ------- Comment From rpsene.com 2021-04-12 15:40 EDT-------
> Whenever a new VM is created based on an image, or even installing a new VM
> with the distro image, cloud-init will generate a new instance-id for that
> specific VM. When you remove the Data Source and reboot, cloud-init thinks
> it is a new instance, regenerates a new instance-id and run again. That is
> when the network configuration is overwritten.
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1593010
> https://bugzilla.redhat.com/show_bug.cgi?id=1750859
> 
> The workaround for this is to disable the network management after the VM is
> up and running:
> 
> vi /etc/cloud/cloud.cfg
> add:
> network:
> config: disabled
> 
> We need to understand why this is happening on PowerVS (not sure if storage
> can be the root cause).

Comment 31 Pengpeng Sun 2021-12-09 06:17:10 UTC
Hi,

VMware also published a KB article to workaround this issue: https://kb.vmware.com/s/article/71264, besides the one mentioned in Comment 9 which prevents cloud-init updating network again.

As Eduardo mentioned, there were 2 pull requests tried to fix this, but none of them was accepted to cloud-init main branch. We are looking for a better solution.

Thanks,
pengpengs

Comment 32 Pengpeng Sun 2021-12-09 06:23:57 UTC
(In reply to Eduardo Otubo from comment #4)
> This feature is still being worked upstream. VMWare is trying to replace OVF
> with a new DataSource that doesn't seem to hit this bug, called guest-info.
> This feature nowhere near to be upstream.
> 
> Possibly will be available on the next cloud-init release (20.4) and will be
> able to be backported to RHEL-8.4/cloud-init-20.3.
> 
> Lowering the Priority for now.

Guest-info has been renamed and upstream to cloud-init v21.3 as DatasourceVMware, it's not a replacement of OVF. It more likes a different data transfer mechanism. For guest os customization, the datasource being used is still OVF for now.

Comment 33 Huijuan Zhao 2021-12-10 02:30:54 UTC
(In reply to Pengpeng Sun from comment #32)
> Guest-info has been renamed and upstream to cloud-init v21.3 as
> DatasourceVMware, it's not a replacement of OVF. It more likes a different
> data transfer mechanism. For guest os customization, the datasource being
> used is still OVF for now.

Hi Pengpeng, 

Thank you so much for the explanation. 

As we have another BZ 2026587 requested from customer to support for cloud-init datasource 'cloud-init-vmware-guestinfo', I think it is exactly the DatasourceVMware we mentioned here, right? I have some additional questions about the DatasourceVMware, could you please help to identify?

1. For the DatasourceVMware testing, no need to enable VMware Tools, using open-vm-tools is ok just like OVF, do I understand correctly?

2. Could you please provide the test steps for the DatasourceVMware testing? Is it like https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough?
And what will be the datasource in /run/cloud-init/ds-identify.log(both OVF and VMware?)? 

Thanks
Huijuan

Comment 34 Pengpeng Sun 2021-12-10 04:28:39 UTC
(In reply to Huijuan Zhao from comment #33)
> (In reply to Pengpeng Sun from comment #32)
> > Guest-info has been renamed and upstream to cloud-init v21.3 as
> > DatasourceVMware, it's not a replacement of OVF. It more likes a different
> > data transfer mechanism. For guest os customization, the datasource being
> > used is still OVF for now.
> 
> Hi Pengpeng, 
> 
> Thank you so much for the explanation. 
> 
> As we have another BZ 2026587 requested from customer to support for
> cloud-init datasource 'cloud-init-vmware-guestinfo', I think it is exactly
> the DatasourceVMware we mentioned here, right? I have some additional
> questions about the DatasourceVMware, could you please help to identify?
> 
> 1. For the DatasourceVMware testing, no need to enable VMware Tools, using
> open-vm-tools is ok just like OVF, do I understand correctly?
> 
> 2. Could you please provide the test steps for the DatasourceVMware testing?
> Is it like
> https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough?
> And what will be the datasource in /run/cloud-init/ds-identify.log(both OVF
> and VMware?)? 
> 
> Thanks
> Huijuan

Hi Huijuan,

Yes, vmware-guestinfo (https://github.com/vmware-archive/cloud-init-vmware-guestinfo) was merged to cloud-init upstream and renamed as DatasourceVMware (https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/DataSourceVMware.py) since cloud-init version 21.3

AFAIK, RHEL hasn't rebased cloud-init v21.3 yet, so that customer need go through the original setup to install the vmware-guestinfo firstly, see https://github.com/vmware-archive/cloud-init-vmware-guestinfo#installation, then configure VM to assign metadata and userdata to guestinfo, see https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough

I might not get your first question correctly, the Open VM Tools (open-vm-tools) is the open source implementation of VMware Tools for Linux guest operating systems, it's available for RHEL. Yes, it's ok to user open-vm-tools for vmware-guestinfo or DatasourceVMware.

The vmware-guestinfo installation will add a configuration file that tells cloud-init what datasource to use (https://github.com/vmware-archive/cloud-init-vmware-guestinfo/blob/master/install.sh#L103) and download program used by ds-identify to determine whether or not the guestinfo datasource is useable (https://github.com/vmware-archive/cloud-init-vmware-guestinfo/blob/master/install.sh#L109)

Thanks,
Pengpeng

Comment 35 Huijuan Zhao 2021-12-10 06:27:05 UTC
(In reply to Pengpeng Sun from comment #34)
> 
> Hi Huijuan,
> 
> Yes, vmware-guestinfo
> (https://github.com/vmware-archive/cloud-init-vmware-guestinfo) was merged
> to cloud-init upstream and renamed as DatasourceVMware
> (https://github.com/canonical/cloud-init/blob/main/cloudinit/sources/
> DataSourceVMware.py) since cloud-init version 21.3
> 
> AFAIK, RHEL hasn't rebased cloud-init v21.3 yet, so that customer need go
> through the original setup to install the vmware-guestinfo firstly, see
> https://github.com/vmware-archive/cloud-init-vmware-guestinfo#installation,
> then configure VM to assign metadata and userdata to guestinfo, see
> https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough
> 
> I might not get your first question correctly, the Open VM Tools
> (open-vm-tools) is the open source implementation of VMware Tools for Linux
> guest operating systems, it's available for RHEL. Yes, it's ok to user
> open-vm-tools for vmware-guestinfo or DatasourceVMware.

Thank you so much for the answer, this is what I would ask. I thought we must enable VMware Tools(instead of open-vm-tools) for the DatasourceVMware, but we have to use/test open-vm-tools(which is conflict with VMware Tools), this is what I was confused at the beginning.

So after backport the DatasourceVMware(vmware-guestinfo) patch to RHEL cloud-init, we can still use the open-vm-tools for DatasourceVMware. And we can follow the https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough to config the VM.

> 
> The vmware-guestinfo installation will add a configuration file that tells
> cloud-init what datasource to use
> (https://github.com/vmware-archive/cloud-init-vmware-guestinfo/blob/master/
> install.sh#L103) and download program used by ds-identify to determine
> whether or not the guestinfo datasource is useable
> (https://github.com/vmware-archive/cloud-init-vmware-guestinfo/blob/master/
> install.sh#L109)
> 
> Thanks,
> Pengpeng

Pengpeng, thank you again for the quick answers, they are really helpful.

Comment 36 Pengpeng Sun 2021-12-10 06:47:40 UTC
(In reply to Huijuan Zhao from comment #35)
> So after backport the DatasourceVMware(vmware-guestinfo) patch to RHEL
> cloud-init, we can still use the open-vm-tools for DatasourceVMware. And we
> can follow the
> https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough to
> config the VM.

Yes, for DatasourceVMware, you can also refer to cloud-init document at https://cloudinit.readthedocs.io/en/latest/topics/datasources/vmware.html

Comment 37 Huijuan Zhao 2021-12-10 06:54:33 UTC
(In reply to Pengpeng Sun from comment #36)
> (In reply to Huijuan Zhao from comment #35)
> > So after backport the DatasourceVMware(vmware-guestinfo) patch to RHEL
> > cloud-init, we can still use the open-vm-tools for DatasourceVMware. And we
> > can follow the
> > https://github.com/vmware-archive/cloud-init-vmware-guestinfo#walkthrough to
> > config the VM.
> 
> Yes, for DatasourceVMware, you can also refer to cloud-init document at
> https://cloudinit.readthedocs.io/en/latest/topics/datasources/vmware.html

Pengpeng, ok, got it, thank you so much for the guide, I will try it as soon as possible and update in BZ 2026587.

Comment 42 Pengpeng Sun 2023-01-27 08:58:28 UTC
Hi Huijuan,

Any updates on this bug, I see BZ 2026587 has been closed.

Thanks,
Pengpeng

Comment 43 Huijuan Zhao 2023-01-28 03:54:10 UTC
(In reply to Pengpeng Sun from comment #42)
> Hi Huijuan,
> 
> Any updates on this bug, I see BZ 2026587 has been closed.
> 
> Thanks,
> Pengpeng

Hi Pengpeng,

The issue still exists in the latest version cloud-init-22.1
BZ 2026587 is regarding the new datasource DatasourceVMware, RHEL can support it now. But this issue only exists with OVF datasource, so it is still there.

Thanks!
Huijuan

Comment 45 Pengpeng Sun 2023-01-28 04:52:03 UTC
Thanks Huijuan for the information. As Comment 9 mentioned, data source (customization configuration) provided to cloud-init only at the first boot, and then it's removed, in the following reboot, cloud-init will go through it's Datasource list and apply DatasourceNone (Set network to DHCP) at the end.

We have made a change on OVF datasource, Guest Customization transport has been moved from DatasourceOVF to DatasourceVMware. see details in https://github.com/canonical/cloud-init/pull/1573, this change is available since cloud-init v22.4.2. With this change, customer can set cloud-init Datasource list to "DatasourceVMware" only on VMware platform, then this issue won't reproduce.

Best regards,
Pengpeng

Comment 46 Huijuan Zhao 2023-01-28 05:42:20 UTC
Thanks Pengpeng for the explanation and information. 

So should we consider backport the patch https://github.com/canonical/cloud-init/pull/1573 or do rebase in the next rhel cloud-init release?
Emanuele, could you please help to check comment 45 and evaluate it? Thanks!

Comment 47 Huijuan Zhao 2023-01-30 07:17:19 UTC
(In reply to Pengpeng Sun from comment #45)
> We have made a change on OVF datasource, Guest Customization transport has
> been moved from DatasourceOVF to DatasourceVMware. see details in
> https://github.com/canonical/cloud-init/pull/1573, this change is available
> since cloud-init v22.4.2. With this change, customer can set cloud-init
> Datasource list to "DatasourceVMware" only on VMware platform, then this
> issue won't reproduce.

Hi Pengpeng,

I would like to confirm the change you mentioned in https://github.com/canonical/cloud-init/pull/1573.

With this change, it is backward compatibility, it still supports VM Customization Specifications on vSphere. Customers still can persist the current usage on cloud-init. Am I right?

Is there any document to notify this change in your side? 
I think we need notify this change in Red Hat DOC after backport the patch to RHEL cloud-init.

And do you have any suggestions for test cases/scenarios per the patch?

Thanks!
Huijuan

Comment 48 Pengpeng Sun 2023-01-30 07:56:38 UTC
(In reply to Huijuan Zhao from comment #47)
> (In reply to Pengpeng Sun from comment #45)
> > We have made a change on OVF datasource, Guest Customization transport has
> > been moved from DatasourceOVF to DatasourceVMware. see details in
> > https://github.com/canonical/cloud-init/pull/1573, this change is available
> > since cloud-init v22.4.2. With this change, customer can set cloud-init
> > Datasource list to "DatasourceVMware" only on VMware platform, then this
> > issue won't reproduce.
> 
> Hi Pengpeng,
> 
> I would like to confirm the change you mentioned in
> https://github.com/canonical/cloud-init/pull/1573.
> 
> With this change, it is backward compatibility, it still supports VM
> Customization Specifications on vSphere. Customers still can persist the
> current usage on cloud-init. Am I right?

Yes, correct. Guest customization function and usage are consistent with this change, while DatasourceVMware but DatasourceOVF is the datasource which transports customization specification as data to cloud-init. As long as "VMware" is included in the cloud-init datasource list, Guest customization should work exactly as before.

> 
> Is there any document to notify this change in your side? 

Please check cloud-init VMware datasource doc: https://github.com/canonical/cloud-init/blob/main/doc/rtd/reference/datasources/vmware.rst#guest-os-customisation, it includes the configurations related to guest customization which is same with before.

> I think we need notify this change in Red Hat DOC after backport the patch
> to RHEL cloud-init.
> 

Yes, customer need make sure "VMware" is included in the cloud-init datasource list, while I remember on Red Hat, this is true by default.

> And do you have any suggestions for test cases/scenarios per the patch?

The current Guest Customization test cases/scenarios should pass with this change.

> 
> Thanks!
> Huijuan

Comment 49 Huijuan Zhao 2023-01-30 08:10:40 UTC
Understand, thank you Pengpeng for the detail instruction :) Will check the details of cloud-init VMware datasource doc.

Comment 50 Pengpeng Sun 2023-01-30 08:21:17 UTC
Hi Huijuan,

One thing I forgot to mention is that due to Guest Customization moves from DatasourceOVF to DatasourceVMware, and in DatasourceVMware, Guest customization data is loaded after guestinfo data. So there is also data loading sequence change. If customer configures more than one below data sources, the result could be different.

Before this change, with default datasource list, the data loading sequence is
1. OVF Guest customization
2. OVF guestinfo.ovfEnv
3. OVF iso
4. VMware guestinfo

After this change, with default datasource list, the data loading sequence is
1. OVF guestinfo.ovfEnv
2. OVF iso
3. VMware guestinfo
4. VMware Guest customization

I'm not sure if you have test cases related to this, if yes, please expect different result.


Thanks,
Pengpeng

Comment 51 Huijuan Zhao 2023-01-30 08:37:06 UTC
(In reply to Pengpeng Sun from comment #50)
> Hi Huijuan,
> 
> One thing I forgot to mention is that due to Guest Customization moves from
> DatasourceOVF to DatasourceVMware, and in DatasourceVMware, Guest
> customization data is loaded after guestinfo data. So there is also data
> loading sequence change. If customer configures more than one below data
> sources, the result could be different.
> 
> Before this change, with default datasource list, the data loading sequence
> is
> 1. OVF Guest customization
> 2. OVF guestinfo.ovfEnv
> 3. OVF iso
> 4. VMware guestinfo
> 
> After this change, with default datasource list, the data loading sequence is
> 1. OVF guestinfo.ovfEnv
> 2. OVF iso
> 3. VMware guestinfo
> 4. VMware Guest customization
> 
> I'm not sure if you have test cases related to this, if yes, please expect
> different result.

Thank you so much Pengpeng for the reminder and explanations, we do not have such test case to cover the data loading sequence, will add test cases to cover it, thanks again!

Comment 54 Huijuan Zhao 2023-02-03 04:05:15 UTC
(In reply to Emanuele Giuseppe Esposito from comment #52)
> Hi Huijuan,
> 
> I tried to backport the PR and fixed all conflicts, could you please check
> if it works?
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=50439045

Thanks Emanuele. 

I tested the scratch build, the default DataSource is changed to VMware from OVF, but this bug is still there: When set static IP with customize file(datasource: VMware), it changed to DHCP(datasource: none) after reboot.

# rpm -q cloud-init
cloud-init-22.1-5.el9.esposem202302011545.noarch

# cloud-id
none 
                 
# cat /run/cloud-init/cloud.cfg 
datasource_list: [ VMware, None ]

/var/log/cloud-init.log after reboot
-----------------------------------
   1180 2023-02-03 11:03:40,785 - DataSourceVMware.py[DEBUG]: Getting guestinfo value for key metadata
   1181 2023-02-03 11:03:40,785 - subp.py[DEBUG]: Running command ['/usr/bin/vmware-rpctool', 'info-get guestinfo.metadata'] with allowed return codes [0] (sh        ell=False, capture=True)
   1182 2023-02-03 11:03:40,792 - DataSourceVMware.py[DEBUG]: No value found for key metadata
   1183 2023-02-03 11:03:40,792 - DataSourceVMware.py[DEBUG]: Getting guestinfo value for key userdata
   1184 2023-02-03 11:03:40,792 - subp.py[DEBUG]: Running command ['/usr/bin/vmware-rpctool', 'info-get guestinfo.userdata'] with allowed return codes [0] (sh        ell=False, capture=True)
   1185 2023-02-03 11:03:40,795 - DataSourceVMware.py[DEBUG]: No value found for key userdata
   1186 2023-02-03 11:03:40,795 - DataSourceVMware.py[DEBUG]: Getting guestinfo value for key vendordata
   1187 2023-02-03 11:03:40,795 - subp.py[DEBUG]: Running command ['/usr/bin/vmware-rpctool', 'info-get guestinfo.vendordata'] with allowed return codes [0] (        shell=False, capture=True)
   1188 2023-02-03 11:03:40,798 - DataSourceVMware.py[DEBUG]: No value found for key vendordata
   1189 2023-02-03 11:03:40,799 - dmi.py[DEBUG]: querying dmi data /sys/class/dmi/id/product_name
   1190 2023-02-03 11:03:40,799 - guestcust_util.py[DEBUG]: Found the customization plugin at /usr/lib64/open-vm-tools/plugins/vmsvc/libdeployPkgPlugin.so
   1191 2023-02-03 11:03:40,799 - guestcust_util.py[DEBUG]: Waiting for VMware customization configuration file
   1192 2023-02-03 11:03:45,800 - guestcust_util.py[DEBUG]: Waiting for VMware customization configuration file
   1193 2023-02-03 03:03:50,401 - guestcust_util.py[DEBUG]: Waiting for VMware customization configuration file
   1194 2023-02-03 03:03:55,406 - util.py[DEBUG]: Waiting for VMware customization configuration file took -28785.394 seconds
   1195 2023-02-03 03:03:55,406 - guestcust_util.py[DEBUG]: No VMware customization configuration file found
   1196 2023-02-03 03:03:55,406 - DataSourceVMware.py[ERROR]: failed to find a valid data access method
   1197 2023-02-03 03:03:55,406 - __init__.py[DEBUG]: Datasource DataSourceVMware [seed=None] not updated for events: boot-new-instance
   1198 2023-02-03 03:03:55,406 - handlers.py[DEBUG]: finish: init-network/search-VMware: SUCCESS: no network data found from DataSourceVMware
   1199 2023-02-03 03:03:55,406 - handlers.py[DEBUG]: start: init-network/search-None: searching for network data from DataSourceNone
-----------------------------------

Will upload the log file for your reference. 


Pengpeng, could I know if this scenario(only Guest customization config static IP, no VMware guestinfo provided) test pass in your side with upstream patch? Thanks!

Comment 57 Pengpeng Sun 2023-02-03 10:04:20 UTC
Hi Huijuan,

Your test got expected result, with default datasource_list, datasource_list will be [ VMware, None ] when customization happens.  Then after reboot vm, cloud-init will load DatasourceNone and update network configuration to DHCP.

(In reply to Pengpeng Sun from comment #45)
> With this change, customer can set cloud-init
> Datasource list to "DatasourceVMware" only on VMware platform, then this
> issue won't reproduce.

And this is not true, sorry for the misleading. Even with datasource_list: [ VMware ] (by creating a file /etc/cloud/cloud.cfg.d/99_vmware.cfg with content "datasource_list: [ VMware ]"), after reboot vm, vm still gets DHCP network configuration since when cloud-init fails to load network from both datasource and cloud-init configuration, it will use distro fallback network configuration which is also DHCP. See https://github.com/canonical/cloud-init/blob/main/cloudinit/stages.py#L859

The https://github.com/canonical/cloud-init/pull/1573 can NOT fix this issue, but rebasing the next cloud-init version which contains this change is recommended. 
For this issue, the VMware KB article: https://kb.vmware.com/s/article/71264 is still needed, or disable network config which is mentioned in Comment 9 can prevent cloud-init updating network again.

Thanks,
Pengpeng

Comment 58 Huijuan Zhao 2023-02-03 11:50:57 UTC
Ok, got it, thank you Pengpeng for the clarification and suggestion. Red Hat also recorded this as known issue in release notes(rhel-8 and rhel-9).

Should we close this BZ as won't fix or keep it open for other solutions?

Emanuele, thank you for the backport build and resolving the conflicts, could you please help to evaluate should we keep the backport build or wait to rebase the next cloud-init version which contains this change per Pengpeng's comment 57? Thanks!

Comment 60 Pengpeng Sun 2023-02-03 12:33:34 UTC
I suggest keep this open to see if a solution can be found eventually. 

The next cloud-init major release (should be 23.1) will contain PR #1573 change.

Comment 62 Huijuan Zhao 2023-02-06 01:46:46 UTC
(In reply to Pengpeng Sun from comment #60)
> I suggest keep this open to see if a solution can be found eventually. 
> 
> The next cloud-init major release (should be 23.1) will contain PR #1573
> change.

Ok, got it, it makes sense. Thank you Pengpeng for the suggestion and information, will pay more attention on this patch in next rhel cloud-init rebase.

Comment 63 Pengpeng Sun 2023-02-07 07:30:03 UTC
VMware bug number is 2302212

Comment 64 John Savanyo 2023-03-31 17:43:04 UTC
(In reply to Pengpeng Sun from comment #63)
> VMware bug number is 2302212

Correction, VMware bug number 3108507 is tracking this problem and is assigned to Pengpeng Sun.  VMware has lead creating a solution for this problem.  Adding need-info to Pengpeng to keep us up to date on progress.


VMware bug number 2302212 is split to track Red hat bugs 1664605 and 1666961.

-John

Comment 66 Ani Sinha 2023-06-02 05:19:15 UTC
VmWare pointed us to this KB article:

https://kb.vmware.com/s/article/71264

Comment 69 Huijuan Zhao 2023-08-25 10:49:19 UTC
(In reply to Pengpeng Sun from comment #60)
> I suggest keep this open to see if a solution can be found eventually. 
> 
> The next cloud-init major release (should be 23.1) will contain PR #1573
> change.

Hi Pengpeng,

We rebased to 23.1.1 in latest RHEL, but this issue is still there.
Seems there is no solution for this issue in upstream currently, should we keep this open or close as WONTFIX?

Thanks
Huijuan

Comment 70 Pengpeng Sun 2023-08-25 10:56:10 UTC
(In reply to Huijuan Zhao from comment #69)
> (In reply to Pengpeng Sun from comment #60)
> > I suggest keep this open to see if a solution can be found eventually. 
> > 
> > The next cloud-init major release (should be 23.1) will contain PR #1573
> > change.
> 
> Hi Pengpeng,
> 
> We rebased to 23.1.1 in latest RHEL, but this issue is still there.
> Seems there is no solution for this issue in upstream currently, should we
> keep this open or close as WONTFIX?
> 
> Thanks
> Huijuan

Hi Huijuan,

Yes, this issue has NOT been fixed on cloud-init upstream, I'm working on it recently, will update here if any updates I have. Please keep this one open, thanks.

Best regards,
Pengpeng

Comment 71 Huijuan Zhao 2023-08-28 00:51:51 UTC
(In reply to Pengpeng Sun from comment #70)
> Hi Huijuan,
> 
> Yes, this issue has NOT been fixed on cloud-init upstream, I'm working on it
> recently, will update here if any updates I have. Please keep this one open,
> thanks.
> 
> Best regards,
> Pengpeng

Ok, good to know this, thank you so much Pengpeng for the update : )

Comment 73 RHEL Program Management 2023-10-09 02:05:54 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 74 RHEL Program Management 2023-10-09 02:08:18 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


Note You need to log in before you can comment on or make changes to this bug.