Merge ~bryce/ubuntu/+source/open-vm-tools:mre-lp1998558-kinetic into ubuntu/+source/open-vm-tools:ubuntu/kinetic-devel

Proposed by Bryce Harrington
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merge reported by: Bryce Harrington
Merged at revision: d6f357cdb92f5b97c3ed5c5228977b2fdf840e62
Proposed branch: ~bryce/ubuntu/+source/open-vm-tools:mre-lp1998558-kinetic
Merge into: ubuntu/+source/open-vm-tools:ubuntu/kinetic-devel
Diff against target: 940 lines (+491/-72)
18 files modified
ReleaseNotes.md (+17/-22)
debian/changelog (+43/-0)
debian/control (+6/-3)
debian/open-vm-tools-desktop.lintian-overrides (+1/-1)
debian/patches/debian/grpc_1.51 (+13/-0)
debian/patches/series (+1/-0)
debian/rules (+0/-2)
open-vm-tools/ChangeLog (+99/-0)
open-vm-tools/configure.ac (+2/-2)
open-vm-tools/lib/include/buildNumber.h (+6/-6)
open-vm-tools/lib/include/conf.h (+6/-0)
open-vm-tools/lib/include/deployPkg/linuxDeployment.h (+20/-1)
open-vm-tools/lib/include/vm_tools_version.h (+14/-7)
open-vm-tools/libDeployPkg/linuxDeployment.c (+177/-20)
open-vm-tools/services/plugins/deployPkg/deployPkg.c (+43/-4)
open-vm-tools/services/plugins/vmbackup/nullProvider.c (+30/-1)
open-vm-tools/services/vmtoolsd/mainPosix.c (+1/-3)
open-vm-tools/tools.conf (+12/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Andreas Hasenack Approve
Canonical Server Pending
Canonical Server Reporter Pending
Canonical Server packageset reviewers Pending
Review via email: mp+441524@code.launchpad.net

Description of the change

This is the MRE for this cycle's update to open-vm-tools.

PPA: https://launchpad.net/~bryce/+archive/ubuntu/open-vm-tools-mre-lp1998558

Autopkgtests are running...
$ ppa tests https://launchpad.net/~bryce/+archive/ubuntu/open-vm-tools-mre-lp1998558

This is pretty straightforward, there was one modification I added to fix a build issues due to missing build-dep libabsl-dev.

I considered rolling in the fix for LP: #1999945, but that's just a cosmetic typo that doesn't seem to cause any problems and wouldn't be accepted as SRU, so I've left it and will tend to it in the next merge.

I verified the package builds and installs/uninstalls in LXC. The service doesn't run in LXC but I assume it'd need a full VM or better since it's a virtualization system itself.

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

+1, the jammy MP[1] has more comments, but this is essentially the same.

1. https://code.launchpad.net/~bryce/ubuntu/+source/open-vm-tools/+git/open-vm-tools/+merge/441525

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: bryce, ahasenack
Uploaders: bryce, ahasenack
MP auto-approved

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for the review. Added the bug ref as discussed in the other MP, and uploaded:

Successfully signed dsc, buildinfo, changes files
Vcs-Git: https://git.launchpad.net/~bryce/ubuntu/+source/open-vm-tools
Vcs-Git-Commit: d6f357cdb92f5b97c3ed5c5228977b2fdf840e62
Vcs-Git-Ref: refs/heads/mre-lp1998558-kinetic
$ dput ubuntu ../open-vm-tools_12.1.5-3~ubuntu0.22.10.1_source.changes
gpg: ../open-vm-tools_12.1.5-3~ubuntu0.22.10.1_source.changes: Valid signature from E603B2578FB8F0FB
gpg: ../open-vm-tools_12.1.5-3~ubuntu0.22.10.1.dsc: Valid signature from E603B2578FB8F0FB
D: Setting host argument.
Checking signature on .changes
Checking signature on .dsc
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading open-vm-tools_12.1.5-3~ubuntu0.22.10.1.dsc: done.
  Uploading open-vm-tools_12.1.5-3~ubuntu0.22.10.1.debian.tar.xz: done.
  Uploading open-vm-tools_12.1.5-3~ubuntu0.22.10.1_source.buildinfo: done.
  Uploading open-vm-tools_12.1.5-3~ubuntu0.22.10.1_source.changes: done.
Successfully uploaded packages.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ReleaseNotes.md b/ReleaseNotes.md
2index ca8f6a8..bdb0c7d 100644
3--- a/ReleaseNotes.md
4+++ b/ReleaseNotes.md
5@@ -1,8 +1,8 @@
6-# Open-vm-tools 12.1.0 Release Notes
7+# open-vm-tools 12.1.5 Release Notes
8
9-Updated on: 23rd AUG 2022
10+Updated on: 29th NOV 2022
11
12-Open-vm-tools | 23rd AUG 2022 | Build 20219665
13+open-vm-tools | 29th NOV 2022 | Build 20735119
14
15 Check back for additions and updates to these release notes.
16
17@@ -20,14 +20,17 @@ The release notes cover the following topics:
18
19 ## <a id="whatsnew" name="whatsnew"></a>What's New
20
21-* This release resolves CVE-2022-31676. For more information on this vulnerability and its impact on VMware products, see [https://www.vmware.com/security/advisories/VMSA-2022-0024.html](https://www.vmware.com/security/advisories/VMSA-2022-0024.html).
22+There are no new features in the open-vm-tools 12.1.5 release. This is primarily a maintenance release that addresses a few critical problems.
23
24 * Please see the [Resolved Issues](#resolvedissues) and [Known Issues](#knownissues) sections below.
25
26+* A complete list of the granular changes in the open-vm-tools 12.1.5 release is available at:
27+
28+ [open-vm-tools ChangeLog](https://github.com/vmware/open-vm-tools/blob/stable-12.1.5/open-vm-tools/ChangeLog)
29
30 ## <a id="i18n" name="i18n"></a>Internationalization
31
32-Open-vm-tools 12.1.0 is available in the following languages:
33+open-vm-tools 12.1.5 is available in the following languages:
34
35 * English
36 * French
37@@ -39,34 +42,29 @@ Open-vm-tools 12.1.0 is available in the following languages:
38 * Simplified Chinese
39 * Traditional Chinese
40
41-## <a id="endoffeaturesupport" name="endoffeaturesupport"></a>End of Feature Support Notice
42-
43- * The tar tools (linux.iso) and OSPs shipped with VMware Tools 10.3.x release will continue to be supported. However, releases after VMware Tools 10.3.5 will only include critical and security fixes. No new feature support will be provided in these types of VMware Tools (tar tools and OSP's). It is recommended that customers use open-vm-tools for those operating systems that support open-vm-tools. For more information about open-vm-tools, see [KB 2073803](https://kb.vmware.com/s/article/2073803).
44-
45-## <a id="guestop" name="guestop"></a>Guest Operating System Customization Support
46-The [Guest OS Customization Support Matrix](http://partnerweb.vmware.com/programs/guestOS/guest-os-customization-matrix.pdf) provides details about the guest operating systems supported for customization.
47-
48 ## <a id="interop" name="interop"></a>Interoperability Matrix
49
50 The [VMware Product Interoperability Matrix](http://partnerweb.vmware.com/comp_guide2/sim/interop_matrix.php) provides details about the compatibility of current and earlier versions of VMware Products. 
51
52 ## <a id="resolvedissues" name ="resolvedissues"></a> Resolved Issues
53
54-* A number of Coverity reported issues have been addressed.
55+* **A number of Coverity reported issues have been addressed.**
56
57-* **[FTBFS] Fix the build of the ContainerInfo plugin for a 32-bit Linux release**
58+* **The deployPkg plugin may prematurely reboot the guest VM before cloud-init has completed user data setup.**
59
60- Reported in [open-vm-tools pull request #588](https://github.com/vmware/open-vm-tools/pull/588), the fix did not make the code freeze date for open-vm-tools 12.0.5.
61+ If both the Perl based Linux customization script and cloud-init run when the guest VM boots, the deployPkg plugin may reboot the guest before cloud-init has finished. The deployPkg plugin has been updated to wait for a running cloud-init process to finish before the guest VM reboot is initiated.
62
63 This issue is fixed in this release.
64
65-* **Make HgfsConvertFromNtTimeNsec aware of 64-bit time_t on i386 (32-bit)**
66+* **A SIGSEGV may be encountered when a non-quiesing snapshot times out.**
67+
68+ This issue is fixed in this release.
69
70- Reported in [open-vm-tools pull request #387](https://github.com/vmware/open-vm-tools/pull/387), this change incorporates the support of 64 bit time epoch conversion from Windows NT time to Unix Epoch time on i386.
71+* **Unwanted vmtoolsd service error message if not on a VMware hypervisor.**
72
73-* **A complete list of the granular changes in the open-vm-tools 12.1.0 release is available at:**
74+ When open-vm-tools comes preinstalled in a base Linux release, the vmtoolsd services are started automatically at system start and desktop login. If running on physical hardware or in a non-VMware hypervisor, the services will emit an error message to the Systemd's logging service before stopping.
75
76- [Open-vm-tools ChangeLog](https://github.com/vmware/open-vm-tools/blob/stable-12.1.0/open-vm-tools/ChangeLog)
77+ This issue is fixed in this release.
78
79 ## <a id="knownissues" name="knownissues"></a>Known Issues
80
81@@ -83,6 +81,3 @@ The [VMware Product Interoperability Matrix](http://partnerweb.vmware.com/comp_
82
83 <tt>vmhgfs-fuse /mnt/hgfs fuse defaults,allow_other 0 0</tt>
84
85-
86-
87-
88diff --git a/debian/changelog b/debian/changelog
89index c785341..4133f05 100644
90--- a/debian/changelog
91+++ b/debian/changelog
92@@ -1,3 +1,46 @@
93+open-vm-tools (2:12.1.5-3~ubuntu0.22.10.1) kinetic; urgency=medium
94+
95+ * Backport recent open-vm-tools release v12.1.5
96+ (LP: #1998558)
97+ * d/control: Add libabsl-dev as explicit build-dependency.
98+ - (Closes #1032305)
99+
100+ -- Bryce Harrington <bryce@canonical.com> Thu, 16 Mar 2023 23:55:51 +0000
101+
102+open-vm-tools (2:12.1.5-3) unstable; urgency=medium
103+
104+ * [1e4d8a9] Remove libprocps-dev build-dep. (Closes: #1027271)
105+
106+ -- Bernd Zeimetz <bzed@debian.org> Tue, 03 Jan 2023 12:19:05 +0100
107+
108+open-vm-tools (2:12.1.5-2) unstable; urgency=medium
109+
110+ * [f450cf8] Fix building with gRPC 1.51+
111+ Thanks to Laszlo Boszormenyi (GCS) (Closes: #1025491)
112+
113+ -- Bernd Zeimetz <bzed@debian.org> Sat, 24 Dec 2022 16:52:48 +0100
114+
115+open-vm-tools (2:12.1.5-1) unstable; urgency=medium
116+
117+ * [d4a64a2] New upstream version 12.1.5
118+ * [adcd7a9] Remove accidentally added patch backup files
119+
120+ -- Bernd Zeimetz <bzed@debian.org> Wed, 07 Dec 2022 17:30:35 +0100
121+
122+open-vm-tools (2:12.1.0-2) unstable; urgency=medium
123+
124+ [ Debian Janitor ]
125+ * [2d8b9bb] Update lintian override info to new format on line 2.
126+ Changes-By: lintian-brush
127+ Fixes: lintian: mismatched-override
128+ See-also: https://lintian.debian.org/tags/mismatched-override.html
129+
130+ [ Bernd Zeimetz ]
131+ * [fa63406] Move libguestStore.so, libgdp.so to open-vm-tools
132+ (Closes: #1021611) (LP: #1992501)
133+
134+ -- Bernd Zeimetz <bzed@debian.org> Mon, 14 Nov 2022 16:19:10 +0100
135+
136 open-vm-tools (2:12.1.0-1) unstable; urgency=high
137
138 * [e704b2c] New upstream version 12.1.0
139diff --git a/debian/control b/debian/control
140index a500ad2..6229403 100644
141--- a/debian/control
142+++ b/debian/control
143@@ -1,12 +1,13 @@
144 Source: open-vm-tools
145 Section: admin
146 Priority: optional
147-Maintainer: Bernd Zeimetz <bzed@debian.org>
148+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
149+XSBC-Original-Maintainer: Bernd Zeimetz <bzed@debian.org>
150 Uploaders: Christian Ehrhardt <christian.ehrhardt@canonical.com>
151 Build-Depends:
152 debhelper-compat (= 13), doxygen, libcunit1-dev,
153 libfuse3-dev, libgtkmm-3.0-dev, libgtk-3-dev,
154- libicu-dev, libnotify-dev, libpam0g-dev, libprocps-dev, libx11-dev,
155+ libicu-dev, libnotify-dev, libpam0g-dev, libx11-dev,
156 libxinerama-dev, libxss-dev, libxtst-dev,
157 libmspack-dev,
158 libssl-dev,
159@@ -19,7 +20,7 @@ Build-Depends:
160 protobuf-compiler,
161 libprotobuf-dev,
162 protobuf-compiler-grpc,
163- libgrpc++-dev,
164+ libgrpc++-dev, libabsl-dev,
165 golang-github-containerd-containerd-dev,
166 golang-github-gogo-protobuf-dev,
167 Standards-Version: 4.6.1
168@@ -32,6 +33,8 @@ Architecture: amd64 i386 arm64
169 Pre-Depends: ${misc:Pre-Depends}
170 Depends: ${misc:Depends}, ${shlibs:Depends}, pciutils, iproute2, lsb-release
171 Recommends: ethtool, zerofree, fuse3
172+Breaks: open-vm-tools-sdmp (<< 2:12.1.0-2~)
173+Replaces: open-vm-tools-sdmp (<< 2:12.1.0-2~)
174 Suggests: open-vm-tools-desktop, cloud-init,
175 open-vm-tools-containerinfo, open-vm-tools-salt-minion [amd64]
176 Description: Open VMware Tools for virtual machines hosted on VMware (CLI)
177diff --git a/debian/open-vm-tools-desktop.lintian-overrides b/debian/open-vm-tools-desktop.lintian-overrides
178index 0a6a323..2d8c49d 100644
179--- a/debian/open-vm-tools-desktop.lintian-overrides
180+++ b/debian/open-vm-tools-desktop.lintian-overrides
181@@ -1,5 +1,5 @@
182 # intentional setuid
183-open-vm-tools-desktop: elevated-privileges usr/bin/vmware-user-suid-wrapper 4755 root/root
184+open-vm-tools-desktop: elevated-privileges 4755 root/root [usr/bin/vmware-user-suid-wrapper]
185 # not existing - https://github.com/vmware/open-vm-tools/issues/526
186 open-vm-tools-desktop: no-manual-page usr/bin/vmware-user
187 open-vm-tools-desktop: no-manual-page usr/bin/vmwgfxctrl
188diff --git a/debian/patches/debian/grpc_1.51 b/debian/patches/debian/grpc_1.51
189new file mode 100644
190index 0000000..3f22581
191--- /dev/null
192+++ b/debian/patches/debian/grpc_1.51
193@@ -0,0 +1,13 @@
194+Index: pkg-open-vm-tools/open-vm-tools/services/plugins/containerInfo/Makefile.am
195+===================================================================
196+--- pkg-open-vm-tools.orig/open-vm-tools/services/plugins/containerInfo/Makefile.am
197++++ pkg-open-vm-tools/open-vm-tools/services/plugins/containerInfo/Makefile.am
198+@@ -63,6 +63,8 @@ libcontainerInfo_la_SOURCES += container
199+ libcontainerInfo_la_CPPFLAGS += @GRPC_CPPFLAGS@
200+ libcontainerInfo_la_LDFLAGS += -lprotobuf
201+ libcontainerInfo_la_LDFLAGS += -lgrpc++
202++libcontainerInfo_la_LDFLAGS += -lgpr
203++libcontainerInfo_la_LDFLAGS += -labsl_synchronization
204+
205+ tasks.grpc.pb.cc containers.grpc.pb.cc: %.grpc.pb.cc : %.proto %.pb.cc
206+ $(PROTOC) -I. -I$(GOGO_PROTOPATH) \
207diff --git a/debian/patches/series b/debian/patches/series
208index 1661073..c1bc1ff 100644
209--- a/debian/patches/series
210+++ b/debian/patches/series
211@@ -1,2 +1,3 @@
212 use-debian-pam
213 debian/scsi-udev-rule
214+debian/grpc_1.51
215diff --git a/debian/rules b/debian/rules
216index 71e2110..c5aa8ce 100755
217--- a/debian/rules
218+++ b/debian/rules
219@@ -77,8 +77,6 @@ override_dh_auto_install:
220
221 mkdir -p debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/
222 mv debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/libserviceDiscovery.so debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/
223- mv debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/libguestStore.so debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/
224- mv debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/libgdp.so debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/plugins/vmsvc/
225
226 mkdir -p debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/serviceDiscovery/scripts/
227 mv debian/open-vm-tools/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/serviceDiscovery/scripts/* debian/open-vm-tools-sdmp/usr/lib/$(DEB_HOST_MULTIARCH)/open-vm-tools/serviceDiscovery/scripts/
228diff --git a/open-vm-tools/ChangeLog b/open-vm-tools/ChangeLog
229index 13479e9..f539f8e 100644
230--- a/open-vm-tools/ChangeLog
231+++ b/open-vm-tools/ChangeLog
232@@ -1,3 +1,102 @@
233+commit 0c740b5ffaacd814f402aba924e55dc8ea033b62
234+Author: John Wolfe <jwolfe@vmware.com>
235+Date: Tue Nov 29 13:11:04 2022 -0800
236+
237+ Update the ReleaseNotes.md for the 12.1.5 open-vm-tools release.
238+
239+commit 8958c3e0fa4b1f5ed4cb0ee98a967ddd73cd03ff
240+Author: John Wolfe <jwolfe@vmware.com>
241+Date: Tue Nov 29 13:07:17 2022 -0800
242+
243+ Prepare for the open-vm-tools 12.1.5 release.
244+ - Update the tools version in the configure.ac. Update the build numbers
245+ buldNumber.h.
246+
247+commit 864ffc76c53e0523b08dad1d1a82a36f75e6f06c
248+Author: John Wolfe <jwolfe@vmware.com>
249+Date: Thu Nov 10 12:10:55 2022 -0800
250+
251+ Update the ChangeLog file with the changes in the 12.1.5 open-vm-tools release.
252+ - plus the ChangeLog update of Aug. 23, 2022
253+
254+commit a205236af862e732c774a5c2b77b700ccfc73f25
255+Author: John Wolfe <jwolfe@vmware.com>
256+Date: Thu Nov 10 12:01:14 2022 -0800
257+
258+ Fix printf format type found by Coverity scan.
259+
260+ printf format should be using %zu to print a size_t value.
261+
262+commit 0a5d9821a6a82ab773d41b7ae9afe9dc8cccff30
263+Author: John Wolfe <jwolfe@vmware.com>
264+Date: Thu Nov 10 12:01:14 2022 -0800
265+
266+ Avoid a vmtoolsd service error message if not on a VMware hypervisor.
267+
268+ When open-vm-tools comes preinstalled in a base Linux release, the
269+ vmtoolsd services are started automatically at system start
270+ and desktop login. If running on physical hardware or in a non-VMware
271+ hypervisor, the services will emit an error message to the systemd's
272+ logging service before stopping.
273+
274+ This change removes the unwanted error message.
275+
276+commit bb64ec6aa24c123bb25d1c48a4c126efa4fda5bf
277+Author: John Wolfe <jwolfe@vmware.com>
278+Date: Thu Nov 10 12:01:14 2022 -0800
279+
280+ Add an example of a new deployPkg/wait-cloudinit-timeout setting to tools.conf.
281+
282+commit cd995a58b07a91d7804d9fdec5545a5fe11e9db9
283+Author: John Wolfe <jwolfe@vmware.com>
284+Date: Thu Nov 10 12:01:14 2022 -0800
285+
286+ Make Linux perl based customization work with the cloud-init workflow.
287+
288+ To resolve issues seen where users want to set a vm's networking
289+ and apply cloud-init userdata together before the vm is booted, the
290+ deployPkg plugin has been modified to wait for cloud-init
291+ execution to finish. This allows cloud-init to finish execution
292+ completely before the customization process triggers a reboot
293+ of the guest.
294+
295+ This change is solely in the deployPkg plugin side, so a user can get
296+ this change by upgrading their open-vm-tools in the guest/template.
297+ Crossport of change 10318445 and 10330918 from main to vmtools-prod-cpd.
298+
299+commit f7009c53afdab9a9507257c77bfeb30d8baaac8c
300+Author: John Wolfe <jwolfe@vmware.com>
301+Date: Thu Nov 10 12:01:14 2022 -0800
302+
303+ Add a null undo function to the vmbackup null provider.
304+
305+ If a snapshot operation times out, vmbackup can attempt
306+ to undo quiescing. Since no quiescing is done for the null
307+ backup provider, no undo function was provided. If vmbackup
308+ attempts to call the undo function, it dereferences a garbage
309+ pointer resulting in a segfault.
310+
311+ Rather than add null backup provider specific checks to vmbackup,
312+ this change adds a null undo function to provide vmbackup with a
313+ valid function pointer it can call. The new undo function updates
314+ the vmbackup state machine state with a new currentOpName, but
315+ has no other effect. currentOpName is set to the calling
316+ function name, e.g. __FUNCTION__.
317+
318+commit db9cb277841ddd56e2665fd29e3ee8c6f37fe233
319+Author: John Wolfe <jwolfe@vmware.com>
320+Date: Thu Nov 10 12:01:14 2022 -0800
321+
322+ Prepare tools builds on vmtools-prod-cpd for the 12.1.5 update release.
323+
324+ - Bump the tools version to 12.1.5.
325+
326+commit 6f5e4b13647b40a45c196dad76b1cb39cc6690b9
327+Author: John Wolfe <jwolfe@vmware.com>
328+Date: Tue Aug 23 14:59:44 2022 -0700
329+
330+ Update of the ChangeLog with the "open-vm-tools 12.1.0" release point marker.
331+
332 commit 196eee046dc54358275ee5130cd189cd686efb27
333 Author: John Wolfe <jwolfe@vmware.com>
334 Date: Tue Aug 23 14:52:28 2022 -0700
335diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac
336index 3c05813..c133add 100644
337--- a/open-vm-tools/configure.ac
338+++ b/open-vm-tools/configure.ac
339@@ -35,10 +35,10 @@
340 ### Initialization
341 ###
342
343-TOOLS_VERSION="12.1.0"
344+TOOLS_VERSION="12.1.5"
345 AC_INIT(
346 [open-vm-tools],
347- [12.1.0],
348+ [12.1.5],
349 [open-vm-tools-devel@lists.sourceforge.net])
350
351 # In order to make this configure script auto-detect situations where
352diff --git a/open-vm-tools/lib/include/buildNumber.h b/open-vm-tools/lib/include/buildNumber.h
353index 504ea8b..cad017b 100644
354--- a/open-vm-tools/lib/include/buildNumber.h
355+++ b/open-vm-tools/lib/include/buildNumber.h
356@@ -1,12 +1,12 @@
357 #define BUILD_NUMBER \
358- "build-20219665"
359+ "build-20735119"
360 #define BUILD_NUMBER_NUMERIC \
361- 20219665
362+ 20735119
363 #define BUILD_NUMBER_NUMERIC_STRING \
364- "20219665"
365+ "20735119"
366 #define PRODUCT_BUILD_NUMBER \
367- "product-build-37487"
368+ "product-build-39265"
369 #define PRODUCT_BUILD_NUMBER_NUMERIC \
370- 37487
371+ 39265
372 #define PRODUCT_BUILD_NUMBER_NUMERIC_STRING \
373- "37487"
374+ "39265"
375diff --git a/open-vm-tools/lib/include/conf.h b/open-vm-tools/lib/include/conf.h
376index 282b9e0..cad1563 100644
377--- a/open-vm-tools/lib/include/conf.h
378+++ b/open-vm-tools/lib/include/conf.h
379@@ -587,6 +587,12 @@
380 */
381 #define CONFNAME_DEPLOYPKG_ENABLE_CUST "enable-customization"
382
383+/**
384+ * How long does guest customization wait until cloud-init execution done
385+ * Valid value range: 0 ~ 1800
386+ */
387+#define CONFNAME_DEPLOYPKG_WAIT_CLOUDINIT_TIMEOUT "wait-cloudinit-timeout"
388+
389 /*
390 * END deployPkg goodies.
391 ******************************************************************************
392diff --git a/open-vm-tools/lib/include/deployPkg/linuxDeployment.h b/open-vm-tools/lib/include/deployPkg/linuxDeployment.h
393index ea8b292..a145cc3 100644
394--- a/open-vm-tools/lib/include/deployPkg/linuxDeployment.h
395+++ b/open-vm-tools/lib/include/deployPkg/linuxDeployment.h
396@@ -1,5 +1,5 @@
397 /*********************************************************
398- * Copyright (C) 2009-2019 VMware, Inc. All rights reserved.
399+ * Copyright (C) 2009-2019, 2022 VMware, Inc. All rights reserved.
400 *
401 * This program is free software; you can redistribute it and/or modify it
402 * under the terms of the GNU Lesser General Public License as published
403@@ -67,6 +67,25 @@ DeployPkg_SetProcessTimeout(uint16 timeout);
404 /*
405 *------------------------------------------------------------------------------
406 *
407+ * DeployPkg_SetWaitForCloudinitDoneTimeout
408+ *
409+ * Set the timeout value of customization process waits for cloud-init
410+ * execution done before trigger reboot and after connect network adapters.
411+ *
412+ * @param timeout [in]
413+ * timeout value to be used for waiting for cloud-init execution done
414+ *
415+ *------------------------------------------------------------------------------
416+ */
417+
418+IMGCUST_API void
419+DeployPkg_SetWaitForCloudinitDoneTimeout(uint16 timeout);
420+
421+
422+
423+/*
424+ *------------------------------------------------------------------------------
425+ *
426 * DeployPkg_SetLogger --
427 *
428 * Give the deploy package an application specific logger.
429diff --git a/open-vm-tools/lib/include/vm_tools_version.h b/open-vm-tools/lib/include/vm_tools_version.h
430index 2435d4b..4af0e08 100644
431--- a/open-vm-tools/lib/include/vm_tools_version.h
432+++ b/open-vm-tools/lib/include/vm_tools_version.h
433@@ -1709,15 +1709,22 @@ TOOLS_VERSION_UINT_TO_COMPONENTS(const ToolsVersion toolsVersion, // IN
434 #define TOOLS_VERSION_SABRE_SAW_UPDATE1_V_BASE 5
435
436 #ifndef RC_INVOKED
437-#define TOOLS_VERSION_NEXT TOOLS_VERSION_TO_UINT(TOOLS_VERSION_NEXT_V)
438+#define TOOLS_VERSION_MITER_SAW_RELEASE TOOLS_VERSION_TO_UINT(TOOLS_VERSION_MITER_SAW_RELEASE_V)
439 #endif /* RC_INVOKED */
440-#define TOOLS_VERSION_NEXT_V_MJR 12
441-#define TOOLS_VERSION_NEXT_V_MNR 1
442-#define TOOLS_VERSION_NEXT_V_BASE 0
443+#define TOOLS_VERSION_MITER_SAW_RELEASE_V_MJR 12
444+#define TOOLS_VERSION_MITER_SAW_RELEASE_V_MNR 1
445+#define TOOLS_VERSION_MITER_SAW_RELEASE_V_BASE 0
446
447-#define TOOLS_VERSION_CURRENT TOOLS_VERSION_NEXT
448-#define TOOLS_VERSION_CURRENT_STR TOOLS_VERSION_TO_STR(TOOLS_VERSION_NEXT)
449-#define TOOLS_VERSION_CURRENT_CSV TOOLS_VERSION_TO_CSV(TOOLS_VERSION_NEXT)
450+#ifndef RC_INVOKED
451+#define TOOLS_VERSION_MITER_SAW_UPDATE1 TOOLS_VERSION_TO_UINT(TOOLS_VERSION_MITER_SAW_UPDATE1_V)
452+#endif /* RC_INVOKED */
453+#define TOOLS_VERSION_MITER_SAW_UPDATE1_V_MJR 12
454+#define TOOLS_VERSION_MITER_SAW_UPDATE1_V_MNR 1
455+#define TOOLS_VERSION_MITER_SAW_UPDATE1_V_BASE 5
456+
457+#define TOOLS_VERSION_CURRENT TOOLS_VERSION_MITER_SAW_UPDATE1
458+#define TOOLS_VERSION_CURRENT_STR TOOLS_VERSION_TO_STR(TOOLS_VERSION_MITER_SAW_UPDATE1)
459+#define TOOLS_VERSION_CURRENT_CSV TOOLS_VERSION_TO_CSV(TOOLS_VERSION_MITER_SAW_UPDATE1)
460
461 /*
462 * The extended Tools version is the current Tools version with the
463diff --git a/open-vm-tools/libDeployPkg/linuxDeployment.c b/open-vm-tools/libDeployPkg/linuxDeployment.c
464index b1f9c8d..19863ca 100644
465--- a/open-vm-tools/libDeployPkg/linuxDeployment.c
466+++ b/open-vm-tools/libDeployPkg/linuxDeployment.c
467@@ -98,6 +98,10 @@ VM_EMBED_VERSION(SYSIMAGE_VERSION_EXT_STR);
468
469 // the maximum length of cloud-init version stdout
470 #define MAX_LENGTH_CLOUDINIT_VERSION 256
471+// the maximum length of cloud-init status stdout
472+#define MAX_LENGTH_CLOUDINIT_STATUS 256
473+// the default timeout of waiting for cloud-init execution done
474+#define DEFAULT_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE 30
475
476 /*
477 * Constant definitions
478@@ -136,6 +140,16 @@ typedef enum USE_CLOUDINIT_ERROR_CODE {
479 USE_CLOUDINIT_IGNORE,
480 } USE_CLOUDINIT_ERROR_CODE;
481
482+// the user-visible cloud-init application status code
483+typedef enum CLOUDINIT_STATUS_CODE {
484+ CLOUDINIT_STATUS_NOT_RUN = 0,
485+ CLOUDINIT_STATUS_RUNNING,
486+ CLOUDINIT_STATUS_DONE,
487+ CLOUDINIT_STATUS_ERROR,
488+ CLOUDINIT_STATUS_DISABLED,
489+ CLOUDINIT_STATUS_UNKNOWN,
490+} CLOUDINIT_STATUS_CODE;
491+
492 /*
493 * Linked list definition
494 *
495@@ -191,6 +205,8 @@ static char* gDeployError = NULL;
496 LogFunction sLog = NoLogging;
497 static uint16 gProcessTimeout = DEPLOYPKG_PROCESSTIMEOUT_DEFAULT;
498 static bool gProcessTimeoutSetByLauncher = false;
499+static uint16 gWaitForCloudinitDoneTimeout =
500+ DEFAULT_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE;
501
502 // .....................................................................................
503
504@@ -226,6 +242,31 @@ DeployPkg_SetProcessTimeout(uint16 timeout)
505 }
506 }
507
508+/*
509+ *------------------------------------------------------------------------------
510+ *
511+ * DeployPkg_SetWaitForCloudinitDoneTimeout
512+ *
513+ * Set the timeout value of customization process waits for cloud-init
514+ * execution done before trigger reboot and after connect network adapters.
515+ * Tools deployPkg plugin reads this timeout value from tools.conf and
516+ * checks if the timeout value is valid, then calls this API to set the
517+ * valid timeout value to gWaitForCloudinitDoneTimeout.
518+ *
519+ * @param timeout [in]
520+ * timeout value to be used for waiting for cloud-init execution done
521+ *
522+ *------------------------------------------------------------------------------
523+ */
524+
525+void
526+DeployPkg_SetWaitForCloudinitDoneTimeout(uint16 timeout)
527+{
528+ gWaitForCloudinitDoneTimeout = timeout;
529+ sLog(log_debug, "Wait for cloud-init execution done timeout value: %d.",
530+ gWaitForCloudinitDoneTimeout);
531+}
532+
533 // .....................................................................................
534
535 /**
536@@ -364,7 +405,8 @@ SetCustomizationStatusInVmxEx(int customizationState,
537 sLog(log_debug, "Got VMX response '%s'.", response);
538 if (responseLength > responseBufferSize - 1) {
539 sLog(log_warning,
540- "The VMX response is too long (only %d chars are allowed).",
541+ "The VMX response is too long "
542+ "(only %"FMTSZ"u chars are allowed).",
543 responseBufferSize - 1);
544 responseLength = responseBufferSize - 1;
545 }
546@@ -1183,13 +1225,14 @@ CopyFileToDirectory(const char* srcPath, const char* destPath,
547 * - cloud-init is enabled.
548 *
549 * @param [IN] dirPath Path where the package is extracted.
550+ * @param [IN] ignoreCloudInit whether ignore cloud-init workflow.
551 * @returns the error code to use cloud-init work flow
552 *
553 *----------------------------------------------------------------------------
554 * */
555
556 static USE_CLOUDINIT_ERROR_CODE
557-UseCloudInitWorkflow(const char* dirPath)
558+UseCloudInitWorkflow(const char* dirPath, bool ignoreCloudInit)
559 {
560 static const char cfgName[] = "cust.cfg";
561 static const char metadataName[] = "metadata";
562@@ -1198,24 +1241,29 @@ UseCloudInitWorkflow(const char* dirPath)
563 char cloudInitCommandOutput[MAX_LENGTH_CLOUDINIT_VERSION];
564 int forkExecResult;
565
566- if (NULL == dirPath) {
567- return USE_CLOUDINIT_INTERNAL_ERROR;
568- }
569-
570- // check if cust.cfg file exists
571- if (!CheckFileExist(dirPath, cfgName)) {
572- return USE_CLOUDINIT_NO_CUST_CFG;
573- }
574-
575 forkExecResult = ForkExecAndWaitCommand(cloudInitCommand,
576 false,
577 cloudInitCommandOutput,
578 sizeof(cloudInitCommandOutput));
579 if (forkExecResult != 0) {
580- sLog(log_info, "cloud-init is not installed.");
581+ sLog(log_info, "Cloud-init is not installed.");
582 return USE_CLOUDINIT_NOT_INSTALLED;
583 } else {
584- sLog(log_info, "cloud-init is installed.");
585+ sLog(log_info, "Cloud-init is installed.");
586+ if (ignoreCloudInit) {
587+ sLog(log_info,
588+ "Ignoring cloud-init workflow according to header flags.");
589+ return USE_CLOUDINIT_IGNORE;
590+ }
591+ }
592+
593+ if (NULL == dirPath) {
594+ return USE_CLOUDINIT_INTERNAL_ERROR;
595+ }
596+
597+ // check if cust.cfg file exists
598+ if (!CheckFileExist(dirPath, cfgName)) {
599+ return USE_CLOUDINIT_NO_CUST_CFG;
600 }
601
602 // If cloud-init metadata exists, check if cloud-init support to handle
603@@ -1225,12 +1273,12 @@ UseCloudInitWorkflow(const char* dirPath)
604 if (CheckFileExist(dirPath, metadataName)) {
605 int major, minor;
606 GetCloudinitVersion(cloudInitCommandOutput, &major, &minor);
607- sLog(log_info, "metadata exists, check cloud-init version...");
608+ sLog(log_info, "Metadata exists, check cloud-init version...");
609 if (major < CLOUDINIT_SUPPORT_RAW_DATA_MAJOR_VERSION ||
610 (major == CLOUDINIT_SUPPORT_RAW_DATA_MAJOR_VERSION &&
611 minor < CLOUDINIT_SUPPORT_RAW_DATA_MINOR_VERSION)) {
612 sLog(log_info,
613- "cloud-init version %d.%d is older than required version %d.%d",
614+ "Cloud-init version %d.%d is older than required version %d.%d.",
615 major,
616 minor,
617 CLOUDINIT_SUPPORT_RAW_DATA_MAJOR_VERSION,
618@@ -1251,6 +1299,113 @@ UseCloudInitWorkflow(const char* dirPath)
619
620 /**
621 *
622+ * Function which gets the current cloud-init execution status.
623+ * The status messages are copied from cloud-init offcial upstream
624+ * https://github.com/canonical/cloud-init/blob/main/cloudinit/cmd/status.py
625+ * These status messages are consistent since year 2017
626+ *
627+ * @returns the status code of cloud-init application
628+ *
629+ **/
630+
631+static CLOUDINIT_STATUS_CODE
632+GetCloudinitStatus() {
633+ // Cloud-init execution status messages
634+ static const char* NOT_RUN = "not run";
635+ static const char* RUNNING = "running";
636+ static const char* DONE = "done";
637+ static const char* ERROR = "error";
638+ static const char* DISABLED = "disabled";
639+
640+ static const char cloudinitStatusCmd[] = "/usr/bin/cloud-init status";
641+ char cloudinitStatusCmdOutput[MAX_LENGTH_CLOUDINIT_STATUS];
642+ int forkExecResult;
643+
644+ forkExecResult = ForkExecAndWaitCommand(cloudinitStatusCmd,
645+ false,
646+ cloudinitStatusCmdOutput,
647+ MAX_LENGTH_CLOUDINIT_STATUS);
648+ if (forkExecResult != 0) {
649+ sLog(log_info, "Unable to get cloud-init status.");
650+ return CLOUDINIT_STATUS_UNKNOWN;
651+ } else {
652+ if (strstr(cloudinitStatusCmdOutput, NOT_RUN) != NULL) {
653+ sLog(log_info, "Cloud-init status is '%s'.", NOT_RUN);
654+ return CLOUDINIT_STATUS_NOT_RUN;
655+ } else if (strstr(cloudinitStatusCmdOutput, RUNNING) != NULL) {
656+ sLog(log_info, "Cloud-init status is '%s'.", RUNNING);
657+ return CLOUDINIT_STATUS_RUNNING;
658+ } else if (strstr(cloudinitStatusCmdOutput, DONE) != NULL) {
659+ sLog(log_info, "Cloud-init status is '%s'.", DONE);
660+ return CLOUDINIT_STATUS_DONE;
661+ } else if (strstr(cloudinitStatusCmdOutput, ERROR) != NULL) {
662+ sLog(log_info, "Cloud-init status is '%s'.", ERROR);
663+ return CLOUDINIT_STATUS_ERROR;
664+ } else if (strstr(cloudinitStatusCmdOutput, DISABLED) != NULL) {
665+ sLog(log_info, "Cloud-init status is '%s'.", DISABLED);
666+ return CLOUDINIT_STATUS_DISABLED;
667+ } else {
668+ sLog(log_warning, "Cloud-init status is unknown.");
669+ return CLOUDINIT_STATUS_UNKNOWN;
670+ }
671+ }
672+}
673+
674+
675+/**
676+ *
677+ * Function which waits for cloud-init execution done.
678+ *
679+ * This function is called only when below conditions are fulfilled:
680+ * - cloud-init is installed
681+ * - guest os reboot is not skipped (so traditional GOSC workflow only)
682+ * - deployment processed successfully in guest
683+ *
684+ * Default waiting timeout is DEFAULT_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE seconds,
685+ * when the timeout is reached, reboot will be triggered no matter what the
686+ * cloud-init execution status is then.
687+ * The timeout can be overwritten by the value which is set in tools.conf,
688+ * if 0 is set in tools.conf, no waiting will be performed.
689+ *
690+ **/
691+
692+static void
693+WaitForCloudinitDone() {
694+ const int CheckStatusInterval = 5;
695+ int timeoutSec = 0;
696+ int elapsedSec = 0;
697+ CLOUDINIT_STATUS_CODE cloudinitStatus = CLOUDINIT_STATUS_UNKNOWN;
698+
699+ // No waiting when gWaitForCloudinitDoneTimeout is set to 0
700+ if (gWaitForCloudinitDoneTimeout == 0) {
701+ return;
702+ }
703+
704+ timeoutSec = gWaitForCloudinitDoneTimeout;
705+
706+ while (1) {
707+ if (elapsedSec == timeoutSec) {
708+ sLog(log_info, "Timed out waiting for cloud-init execution done.");
709+ return;
710+ }
711+ if (elapsedSec % CheckStatusInterval == 0) {
712+ cloudinitStatus = GetCloudinitStatus();
713+ // CLOUDINIT_STATUS_NOT_RUN and CLOUDINIT_STATUS_RUNNING represent
714+ // cloud-init execution has not finished
715+ if (cloudinitStatus != CLOUDINIT_STATUS_NOT_RUN &&
716+ cloudinitStatus != CLOUDINIT_STATUS_RUNNING) {
717+ sLog(log_info, "Cloud-init execution is not on-going.");
718+ return;
719+ }
720+ }
721+ sleep(1);
722+ elapsedSec++;
723+ }
724+}
725+
726+
727+/**
728+ *
729 * Function which cleans up the deployment directory imcDirPath.
730 * This function is called when customization deployment is completed or
731 * any unexpected error happens before deployment begins.
732@@ -1316,6 +1471,7 @@ Deploy(const char* packageName)
733 char *imcDirPath = NULL;
734 USE_CLOUDINIT_ERROR_CODE useCloudInitWorkflow = USE_CLOUDINIT_IGNORE;
735 int imcDirPathSize = 0;
736+ bool ignoreCloudInit = false;
737 TransitionState(NULL, INPROGRESS);
738
739 // Notify the vpx of customization in-progress state
740@@ -1400,11 +1556,8 @@ Deploy(const char* packageName)
741 }
742 }
743
744- if (!(flags & VMWAREDEPLOYPKG_HEADER_FLAGS_IGNORE_CLOUD_INIT)) {
745- useCloudInitWorkflow = UseCloudInitWorkflow(imcDirPath);
746- } else {
747- sLog(log_info, "Ignoring cloud-init.");
748- }
749+ ignoreCloudInit = flags & VMWAREDEPLOYPKG_HEADER_FLAGS_IGNORE_CLOUD_INIT;
750+ useCloudInitWorkflow = UseCloudInitWorkflow(imcDirPath, ignoreCloudInit);
751
752 sLog(log_info, "UseCloudInitWorkflow return: %d", useCloudInitWorkflow);
753
754@@ -1511,6 +1664,10 @@ Deploy(const char* packageName)
755
756 //Reset the guest OS
757 if (!sSkipReboot && !deploymentResult) {
758+ if (useCloudInitWorkflow != USE_CLOUDINIT_NOT_INSTALLED) {
759+ sLog(log_info, "Do not trigger reboot if cloud-init is executing.");
760+ WaitForCloudinitDone();
761+ }
762 pid_t pid = fork();
763 if (pid == -1) {
764 sLog(log_error, "Failed to fork: '%s'.", strerror(errno));
765diff --git a/open-vm-tools/services/plugins/deployPkg/deployPkg.c b/open-vm-tools/services/plugins/deployPkg/deployPkg.c
766index 4d70765..b1f0324 100644
767--- a/open-vm-tools/services/plugins/deployPkg/deployPkg.c
768+++ b/open-vm-tools/services/plugins/deployPkg/deployPkg.c
769@@ -59,6 +59,9 @@ using namespace ImgCustCommon;
770
771 // Using 3600s as the upper limit of timeout value in tools.conf.
772 #define MAX_TIMEOUT_FROM_TOOLCONF 3600
773+// Using 1800s as the upper limit of waiting for cloud-init execution done
774+// timeout value in tools.conf.
775+#define MAX_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE 1800
776
777 static char *DeployPkgGetTempDir(void);
778
779@@ -90,6 +93,7 @@ DeployPkgDeployPkgInGuest(ToolsAppCtx *ctx, // IN: app context
780 ToolsDeployPkgError ret = TOOLSDEPLOYPKG_ERROR_SUCCESS;
781 #ifndef _WIN32
782 int processTimeout;
783+ int waitForCloudinitDoneTimeout;
784 #endif
785
786 /*
787@@ -156,10 +160,10 @@ DeployPkgDeployPkgInGuest(ToolsAppCtx *ctx, // IN: app context
788 * Using 0 as the default value of CONFNAME_DEPLOYPKG_PROCESSTIMEOUT in tools.conf
789 */
790 processTimeout =
791- VMTools_ConfigGetInteger(ctx->config,
792- CONFGROUPNAME_DEPLOYPKG,
793- CONFNAME_DEPLOYPKG_PROCESSTIMEOUT,
794- 0);
795+ VMTools_ConfigGetInteger(ctx->config,
796+ CONFGROUPNAME_DEPLOYPKG,
797+ CONFNAME_DEPLOYPKG_PROCESSTIMEOUT,
798+ 0);
799 if (processTimeout > 0 && processTimeout <= MAX_TIMEOUT_FROM_TOOLCONF) {
800 DeployPkgLog_Log(log_debug, "[%s] %s in tools.conf: %d",
801 CONFGROUPNAME_DEPLOYPKG,
802@@ -174,6 +178,41 @@ DeployPkgDeployPkgInGuest(ToolsAppCtx *ctx, // IN: app context
803 DeployPkgLog_Log(log_debug, "The valid timeout value range: 1 ~ %d",
804 MAX_TIMEOUT_FROM_TOOLCONF);
805 }
806+
807+ /*
808+ * Get timeout of waiting for cloud-init execution done from tools.conf.
809+ * Only when a valid 'timeout' got from tools.conf, deployPkg will call
810+ * DeployPkg_SetWaitForCloudinitDoneTimeout to overwrite the default timeout
811+ * of waiting for cloud-init execution done.
812+ * The valid value range is from 0 to MAX_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE.
813+ * Return an invalid value -1 if CONFNAME_DEPLOYPKG_WAIT_CLOUDINIT_TIMEOUT is
814+ * not set in tools.conf.
815+ */
816+ waitForCloudinitDoneTimeout =
817+ VMTools_ConfigGetInteger(ctx->config,
818+ CONFGROUPNAME_DEPLOYPKG,
819+ CONFNAME_DEPLOYPKG_WAIT_CLOUDINIT_TIMEOUT,
820+ -1);
821+ if (waitForCloudinitDoneTimeout >= 0 &&
822+ waitForCloudinitDoneTimeout <= MAX_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE) {
823+ DeployPkgLog_Log(log_debug, "[%s] %s in tools.conf: %d",
824+ CONFGROUPNAME_DEPLOYPKG,
825+ CONFNAME_DEPLOYPKG_WAIT_CLOUDINIT_TIMEOUT,
826+ waitForCloudinitDoneTimeout);
827+ DeployPkg_SetWaitForCloudinitDoneTimeout(waitForCloudinitDoneTimeout);
828+ } else {
829+ if (waitForCloudinitDoneTimeout != -1) {
830+ DeployPkgLog_Log(log_debug,
831+ "Ignore invalid value %d from tools.conf [%s] %s",
832+ waitForCloudinitDoneTimeout,
833+ CONFGROUPNAME_DEPLOYPKG,
834+ CONFNAME_DEPLOYPKG_WAIT_CLOUDINIT_TIMEOUT);
835+ }
836+ DeployPkgLog_Log(log_debug, "The valid [%s] %s value range: 0 ~ %d",
837+ CONFGROUPNAME_DEPLOYPKG,
838+ CONFNAME_DEPLOYPKG_WAIT_CLOUDINIT_TIMEOUT,
839+ MAX_TIMEOUT_WAIT_FOR_CLOUDINIT_DONE);
840+ }
841 #endif
842
843 if (0 != DeployPkg_DeployPackageFromFile(pkgFile)) {
844diff --git a/open-vm-tools/services/plugins/vmbackup/nullProvider.c b/open-vm-tools/services/plugins/vmbackup/nullProvider.c
845index 1abc5f6..e07d2b7 100644
846--- a/open-vm-tools/services/plugins/vmbackup/nullProvider.c
847+++ b/open-vm-tools/services/plugins/vmbackup/nullProvider.c
848@@ -1,5 +1,5 @@
849 /*********************************************************
850- * Copyright (C) 2010-2016 VMware, Inc. All rights reserved.
851+ * Copyright (C) 2010-2016, 2022 VMware, Inc. All rights reserved.
852 *
853 * This program is free software; you can redistribute it and/or modify it
854 * under the terms of the GNU Lesser General Public License as published
855@@ -243,6 +243,32 @@ VmBackupNullSnapshotDone(VmBackupState *state,
856 return TRUE;
857 }
858
859+
860+/*
861+ ******************************************************************************
862+ * VmBackupNullUndo -- */ /**
863+ *
864+ * Update the state machine state with the currentOpName.
865+ *
866+ * Can be called when snapshot times out. See PR2993571 and PR3003917.
867+ *
868+ * @param[in] state the backup state
869+ * @param[in] clientData client data
870+ *
871+ * @return TRUE
872+ *
873+ ******************************************************************************
874+ */
875+
876+static Bool
877+VmBackupNullUndo(VmBackupState *state,
878+ void *clientData)
879+{
880+ g_debug("*** %s\n", __FUNCTION__);
881+ VmBackup_SetCurrentOp(state, NULL, NULL, __FUNCTION__);
882+ return TRUE;
883+}
884+
885 #endif
886
887 /*
888@@ -281,6 +307,9 @@ VmBackup_NewNullProvider(void)
889
890 provider = g_new(VmBackupSyncProvider, 1);
891 provider->start = VmBackupNullStart;
892+#if !defined(_WIN32)
893+ provider->undo = VmBackupNullUndo;
894+#endif
895 provider->snapshotDone = VmBackupNullSnapshotDone;
896 provider->release = VmBackupNullRelease;
897 provider->clientData = NULL;
898diff --git a/open-vm-tools/services/vmtoolsd/mainPosix.c b/open-vm-tools/services/vmtoolsd/mainPosix.c
899index cd8f2db..9ca9bad 100644
900--- a/open-vm-tools/services/vmtoolsd/mainPosix.c
901+++ b/open-vm-tools/services/vmtoolsd/mainPosix.c
902@@ -1,5 +1,5 @@
903 /*********************************************************
904- * Copyright (C) 2008-2020 VMware, Inc. All rights reserved.
905+ * Copyright (C) 2008-2020,2022 VMware, Inc. All rights reserved.
906 *
907 * This program is free software; you can redistribute it and/or modify it
908 * under the terms of the GNU Lesser General Public License as published
909@@ -178,8 +178,6 @@ main(int argc,
910 * Check that environment is a VM
911 */
912 if (!VmCheck_IsVirtualWorld()) {
913- g_printerr("Error: %s must be run inside a virtual machine"
914- " on a VMware hypervisor product.\n", argv[0]);
915 goto exit;
916 }
917
918diff --git a/open-vm-tools/tools.conf b/open-vm-tools/tools.conf
919index 2577d32..a7d994c 100644
920--- a/open-vm-tools/tools.conf
921+++ b/open-vm-tools/tools.conf
922@@ -455,6 +455,18 @@
923 # to disable guest customization
924 #enable-customization=false
925
926+# This "wait-cloudinit-timeout" option controls how long does guest
927+# customization wait for cloud-init execution done when it detects cloud-init
928+# is available in guest.
929+# Guest customization will continue executing as soon as it detects cloud-init
930+# execution done within this option's value in seconds.
931+# If cloud-init is still running beyond this option's value in seconds, guest
932+# customization will continue executing regardless cloud-init execution status.
933+# Minimum valid value is 0 second, set to 0 to disable waiting.
934+# Maximum valid value is 1800 seconds (30 minutes).
935+# Default value is 30 seconds.
936+#wait-cloudinit-timeout=30
937+
938 [cbhelper]
939
940 # The carbonblack helper plugin is only available for Windows.

Subscribers

People subscribed via source and target branches