Hey all – I recently went to deploy a solution involving a few Ubuntu 16.04 LTS VMs in my lab to eventually put on AWS. There are some issues I’ve been having with deploying (updated) Ubuntu 16.04 LTS templates to my vSphere 6.7 cluster (though this seems to not work in 6.5 as well).

I have a number of templates in my labs (and in production, having the same issue). One thing I try to do is keep templates up to date so I don’t have a ton of updates waiting post-deployment. I do it the old fashioned way in my lab by converting the template to a VM, booting, and then running sudo apt-get update && sudo apt-get upgrade -y . Everything updates properly, I shut the VM down, convert back to template, and start deploying through either vRealize Automation or straight from vCenter.

Ubuntu 16.04 LTS tends to customize really fast in vSphere and within 30 seconds or so after deploying the VM will have the IP address and hostname show in the VM Summary view within the vSphere client. So, for grins, here is what happens when I deploy my Ubuntu 16.04 LTS template that has open-vm-tools version 10.0.7-3227872-5ubuntu1~16.04.1:

You can see above that the hostname (DNS Name) is properly set to the VM name I specified and the IP is one that I specified during the template deployment.

Now I’ll clone the original template to a new one and update open-vm-tools in the new template. When performing the update we see:

kensycloudadmin@ubnt1604tmpl:~$ sudo apt-get -V install --only-upgrade open-vm-tools Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libxmlsec1 (1.2.20-2ubuntu4) libxmlsec1-openssl (1.2.20-2ubuntu4) libxslt1.1 (1.1.28-2.1ubuntu0.1) Suggested packages: open-vm-tools-desktop (2:10.2.0-3~ubuntu0.16.04.1) cloud-init (18.2-4-g05926e48-0ubuntu1~16.04.2) The following NEW packages will be installed: libxmlsec1 (1.2.20-2ubuntu4) libxmlsec1-openssl (1.2.20-2ubuntu4) libxslt1.1 (1.1.28-2.1ubuntu0.1) The following packages will be upgraded: <strong>open-vm-tools (2:10.0.7-3227872-5ubuntu1~16.04.1 => 2:10.2.0-3~ubuntu0.16.04.1)</strong> 1 upgraded, 3 newly installed, 0 to remove and 199 not upgraded. Need to get 866 kB of archives. After this operation, 1,649 kB of additional disk space will be used. Do you want to continue? [Y/n] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 kensycloudadmin @ ubnt1604tmpl : ~ $ sudo apt - get - V install -- only - upgrade open - vm - tools Reading package lists . . . Done Building dependency tree Reading state information . . . Done The following additional packages will be installed : libxmlsec1 ( 1.2.20 - 2ubuntu4 ) libxmlsec1 - openssl ( 1.2.20 - 2ubuntu4 ) libxslt1 . 1 ( 1.1.28 - 2.1ubuntu0.1 ) Suggested packages : open - vm - tools - desktop ( 2 : 10.2.0 - 3 ~ ubuntu0 . 16.04.1 ) cloud - init ( 18.2 - 4 - g05926e48 - 0ubuntu1 ~ 16.04.2 ) The following NEW packages will be installed : libxmlsec1 ( 1.2.20 - 2ubuntu4 ) libxmlsec1 - openssl ( 1.2.20 - 2ubuntu4 ) libxslt1 . 1 ( 1.1.28 - 2.1ubuntu0.1 ) The following packages will be upgraded : < strong > open - vm - tools ( 2 : 10.0.7 - 3227872 - 5ubuntu1 ~ 16.04.1 = > 2 : 10.2.0 - 3 ~ ubuntu0 . 16.04.1 ) < / strong > 1 upgraded , 3 newly installed , 0 to remove and 199 not upgraded . Need to get 866 kB of archives . After this operation , 1 , 649 kB of additional disk space will be used . Do you want to continue ? [ Y / n ]

The output above shows that open-vm-tools version 10.2.0-3~ubuntu0.16.04.1 will be installed along with a couple other dependencies. After the updates I shut the VM down, converted back to a (new) template, and deploy a VM from it. I used the same customization file as previously only this time calling the VM VMToolsNotWork and setting the IP to 192.168.50.98 :

You can see that neither the hostname (DNS Name) nor IP are populated properly. Further, when checking the VM Monitor | Events menu in the vSphere client there are errors when customizing the guest:

The earliest error reads:

An error occurred while customizing VM VMToolsNotWork. For details reference the log file /var/log/vmware-imc/toolsDeployPkg.log in the guest OS.

The latest error simply states

An error occurred while customizing VM VMToolsNotWork. For details reference the log file <No Log> in the guest OS.

Because the customization fails there’s no network and so reading the log file is a pain in the console. I added a disk to the VM, moved the log file, detached the VMDK, and put it on another VM so I could properly output the file:

## Starting deploy pkg operation Deploying /tmp/vmware-root/418e3ed8/imcf-tqtLQV Initializing deployment module. Cleaning old state file from tmp directory. EXIT STATE INPROGRESS Setting deploy error: Error removing lock /tmp/.vmware-deploy.INPROGRESS (No such file or directory) EXIT STATE Done Setting deploy error: Error removing lock /tmp/.vmware-deploy.Done (No such file or directory) EXIT STATE ERRORED Setting deploy error: Error removing lock /tmp/.vmware-deploy.ERRORED (No such file or directory) Setting deploy error: Success. Deploying cabinet file /tmp/vmware-root/418e3ed8/imcf-tqtLQV. Transitioning from state (null) to state INPROGRESS. ENTER STATE INPROGRESS Reading cabinet file /tmp/vmware-root/418e3ed8/imcf-tqtLQV. Flags in the header: 0 Original deployment command: /usr/bin/perl -I/tmp/.vmware/linux/deploy/scripts /tmp/.vmware/linux/deploy/scripts/Customize.pl /tmp/.vmware/linux/deploy/cust.cfg Actual deployment command: /usr/bin/perl -I/tmp/.vmware-imgcust-daPpUsg/scripts /tmp/.vmware-imgcust-daPpUsg/scripts/Customize.pl /tmp/.vmware-imgcust-daPpUsg/cust.cfg Extracting package files. Check if cust.cfg exists. cust.cfg is found in '/tmp/.vmware-imgcust-daPpUsg' directory. Command to exec : /usr/bin/cloud-init sizeof ProcessInternal is 56 Returning, pending output from stdout Returning, pending output from stderr Process exited normally after 0 seconds, returned 127 No more output from stdout No more output from stderr Customization command output: cloud-init is not installed Executing traditional GOSC workflow Command to exec : /usr/bin/perl sizeof ProcessInternal is 56 Returning, pending output from stdout Returning, pending output from stderr Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stderr Process exited normally after 0 seconds, returned 0 Saving output from stdout No more output from stdout No more output from stderr Customization command output: DEBUG: Creating directory /var/lock/vmware DEBUG: Opening /var/lock/vmware/gosc in O_CREAT|O_EXCL|O_WRONLY mode INFO: Opening file name /tmp/.vmware-imgcust-daPpUsg/cust.cfg. DEBUG: Processing line: '[NETWORK]' DEBUG: FOUND CATEGORY = NETWORK DEBUG: Processing line: 'NETWORKING = yes' DEBUG: ADDED KEY-VAL :: 'NETWORK|NETWORKING' = 'yes' DEBUG: Processing line: 'BOOTPROTO = dhcp' DEBUG: ADDED KEY-VAL :: 'NETWORK|BOOTPROTO' = 'dhcp' DEBUG: Processing line: 'HOSTNAME = VMToolsNotWork' DEBUG: ADDED KEY-VAL :: 'NETWORK|HOSTNAME' = 'VMToolsNotWork' DEBUG: Processing line: 'DOMAINNAME = ad.kensycloud.com' DEBUG: ADDED KEY-VAL :: 'NETWORK|DOMAINNAME' = 'ad.kensycloud.com' DEBUG: Processing line: '' DEBUG: Empty line. Ignored. DEBUG: Processing line: '[NIC-CONFIG]' DEBUG: FOUND CATEGORY = NIC-CONFIG DEBUG: Processing line: 'NICS = NIC1' DEBUG: ADDED KEY-VAL :: 'NIC-CONFIG|NICS' = 'NIC1' DEBUG: Processing line: '' DEBUG: Empty line. Ignored. DEBUG: Processing line: '[NIC1]' DEBUG: FOUND CATEGORY = NIC1 DEBUG: Processing line: 'MACADDR = 00:50:56:92:4f:88' DEBUG: ADDED KEY-VAL :: 'NIC1|MACADDR' = '00:50:56:92:4f:88' DEBUG: Processing line: 'ONBOOT = yes' DEBUG: ADDED KEY-VAL :: 'NIC1|ONBOOT' = 'yes' DEBUG: Processing line: 'IPv4_MODE = BACKWARDS_COMPATIBLE' DEBUG: ADDED KEY-VAL :: 'NIC1|IPv4_MODE' = 'BACKWARDS_COMPATIBLE' DEBUG: Processing line: 'BOOTPROTO = static' DEBUG: ADDED KEY-VAL :: 'NIC1|BOOTPROTO' = 'static' DEBUG: Processing line: 'IPADDR = 192.168.50.98' DEBUG: ADDED KEY-VAL :: 'NIC1|IPADDR' = '192.168.50.98' DEBUG: Processing line: 'NETMASK = 255.255.255.0' DEBUG: ADDED KEY-VAL :: 'NIC1|NETMASK' = '255.255.255.0' DEBUG: Processing line: 'GATEWAY = 192.168.50.1' DEBUG: ADDED KEY-VAL :: 'NIC1|GATEWAY' = '192.168.50.1' DEBUG: Processing line: '' DEBUG: Empty line. Ignored. DEBUG: Processing line: '' DEBUG: Empty line. Ignored. DEBUG: Processing line: '[DNS]' DEBUG: FOUND CATEGORY = DNS DEBUG: Processing line: 'DNSFROMDHCP=no' DEBUG: ADDED KEY-VAL :: 'DNS|DNSFROMDHCP' = 'no' DEBUG: Processing line: 'SUFFIX|1 = ad.kensycloud.com' DEBUG: ADDED KEY-VAL :: 'DNS|SUFFIX|1' = 'ad.kensycloud.com' DEBUG: Processing line: 'NAMESERVER|1 = 192.168.50.15' DEBUG: ADDED KEY-VAL :: 'DNS|NAMESERVER|1' = '192.168.50.15' DEBUG: Processing line: 'NAMESERVER|2 = 192.168.50.16' DEBUG: ADDED KEY-VAL :: 'DNS|NAMESERVER|2' = '192.168.50.16' DEBUG: Processing line: 'NAMESERVER|3 = 192.168.60.15' DEBUG: ADDED KEY-VAL :: 'DNS|NAMESERVER|3' = '192.168.60.15' DEBUG: Processing line: '' DEBUG: Empty line. Ignored. DEBUG: Processing line: '[DATETIME]' DEBUG: FOUND CATEGORY = DATETIME DEBUG: Processing line: 'TIMEZONE = America/New_York' DEBUG: ADDED KEY-VAL :: 'DATETIME|TIMEZONE' = 'America/New_York' DEBUG: Processing line: 'UTC = yes' DEBUG: ADDED KEY-VAL :: 'DATETIME|UTC' = 'yes' DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l DEBUG: Reading /etc/os-release file ... DEBUG: opening file /etc/os-release. DEBUG: Match found : Line = PRETTY_NAME="Ubuntu 16.04.2 LTS" DEBUG: Actual String : "Ubuntu 16.04.2 LTS" DEBUG: "Ubuntu 16.04.2 LTS" WARNING: Amazon Linux flavor not detected DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l WARNING: RedHat release file not available. Ignoring it. WARNING: Redhat flavor not detected DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l WARNING: RedHat release file not available. Ignoring it. WARNING: Redhat flavor not detected DEBUG: Command: 'cat /etc/lsb-release' DEBUG: Result: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS" DEBUG: Exit Code: 0 DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l DEBUG: Command: 'cat /etc/lsb-release' DEBUG: Result: DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS" DEBUG: Exit Code: 0 DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l INFO: Detected distribution: Ubuntu 16.04 DEBUG: Reading issue file ... DEBUG: Command: 'cat /etc/issue' DEBUG: Result: Ubuntu 16.04.2 LTS

\l DEBUG: Exit Code: 0 DEBUG: Ubuntu 16.04.2 LTS

\l INFO: Detected distribution flavour: Ubuntu 16.04 INFO: Customization instance Ubuntu15Customization loaded. INFO: Customization started DEBUG: Command: 'hostname 2>/dev/null' DEBUG: Result: ubnt1604tmpl DEBUG: Exit Code: 0 DEBUG: TimedCommand: 'hostname -f 2>/dev/null' with timeout of 5 sec DEBUG: Fetching result from /tmp/timed_out_tmp_file_765 DEBUG: TimedResult: ubnt1604tmpl DEBUG: opening file /etc/hostname. DEBUG: Match found : Line = ubnt1604tmpl DEBUG: Actual String : ubnt1604tmpl INFO: OLD HOST NAME = ubnt1604tmpl INFO: Marker file exists or is undefined, pre-customization is not needed INFO: Customizing Network settings ... INFO: Erasing DHCP leases DEBUG: Command: 'pkill dhclient' DEBUG: Result: DEBUG: Exit Code: 256 DEBUG: Command: 'rm -f /var/lib/dhcp/*' DEBUG: Result: DEBUG: Exit Code: 0 DEBUG: Set the host name to VMToolsNotWork via [hostnamectl set-hostname] DEBUG: Command: 'hostnamectl set-hostname VMToolsNotWork' DEBUG: Result: DEBUG: Exit Code: 256 DEBUG: Host name is VMToolsNotWork DEBUG: opening file for writing (/etc/hostname). DEBUG: Command: 'chmod 644 /etc/hostname' DEBUG: Result: DEBUG: Exit Code: 0 INFO: Customizing NICS ... DEBUG: Command: 'modprobe pcnet32 2> /dev/null' DEBUG: Result: DEBUG: Exit Code: 0 DEBUG: Command: '/sbin/ifconfig eth0 2> /dev/null' DEBUG: Result: DEBUG: Exit Code: 256 INFO: Customizing NICS. { NIC1 } INFO: Customizing NIC NIC1 DEBUG: Get interface name for MAC 00:50:56:92:4f:88, via [ip addr show] DEBUG: Command: 'whereis ip' DEBUG: Result: ip: /bin/ip /sbin/ip /usr/share/man/man7/ip.7.gz /usr/share/man/man8/ip.8.gz DEBUG: Exit Code: 0 DEBUG: Command: '/bin/ip addr show' DEBUG: Result: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens160: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 link/ether 00:50:56:92:4f:88 brd ff:ff:ff:ff:ff:ff DEBUG: Exit Code: 0 INFO: NIC suffix = ens160 INFO: No primary NIC defined. Adding all routes as default. INFO: Configuring ipv4 route (gateway settings) for ens160. INFO: Configuring default route 192.168.50.1 INFO: Query config for ^(NIC1\|IPv6ADDR\|) INFO: Query config for ^(NIC1\|IPv6NETMASK\|) INFO: Query config for ^(NIC1\|IPv6ADDR\|) INFO: Query config for ^(NIC1\|IPv6NETMASK\|) INFO: Query config for ^NIC1(\|IPv6GATEWAY\|) DEBUG: Command: 'mv /etc/network/interfaces /etc/network/interfaces.BeforeVMwareCustomization' DEBUG: Result: DEBUG: Exit Code: 0 DEBUG: opening file for writing (/etc/network/interfaces). INFO: Customizing Hosts file ... DEBUG: Old hostname=[ubnt1604tmpl] DEBUG: Old FQDN=[ubnt1604tmpl] DEBUG: New hostname=[VMToolsNotWork] DEBUG: Building FQDN. HostnameFQDN: VMToolsNotWork, Domainname: ad.kensycloud.com DEBUG: New FQDN=[VMToolsNotWork.ad.kensycloud.com] DEBUG: opening file /etc/hosts. DEBUG: Line (inp): 127.0.0.1 localhost DEBUG: Line (inp): 127.0.1.1 ubnt1604tmpl DEBUG: Replacing [ubnt1604tmpl] DEBUG: Replacing [ubnt1604tmpl] DEBUG: Adding [VMToolsNotWork.ad.kensycloud.com] DEBUG: Removing duplicating FQDNs DEBUG: Line (inp): DEBUG: Line (inp): # The following lines are desirable for IPv6 capable hosts DEBUG: Line (inp): ::1 localhost ip6-localhost ip6-loopback DEBUG: Line (inp): ff02::1 ip6-allnodes DEBUG: Line (inp): ff02::2 ip6-allrouters DEBUG: Static ip entry added DEBUG: Line (out): 127.0.0.1 localhost DEBUG: Line (out): 127.0.1.1 VMToolsNotWork.ad.kensycloud.com VMToolsNotWork DEBUG: Line (out): DEBUG: Line (out): # The following lines are desirable for IPv6 capable hosts DEBUG: Line (out): ::1 localhost ip6-localhost ip6-loopback DEBUG: Line (out): ff02::1 ip6-allnodes DEBUG: Line (out): ff02::2 ip6-allrouters DEBUG: Line (out): 192.168.50.98 VMToolsNotWork.ad.kensycloud.com VMToolsNotWork DEBUG: opening file for writing (/etc/hosts). DEBUG: Command: 'chmod 644 /etc/hosts' DEBUG: Result: DEBUG: Exit Code: 0 INFO: Customizing DNS ... DEBUG: opening file /etc/nsswitch.conf. DEBUG: opening file for writing (/etc/nsswitch.conf). DEBUG: Command: 'chmod 644 /etc/nsswitch.conf' DEBUG: Result: DEBUG: Exit Code: 0 DEBUG: opening file /etc/network/interfaces. INFO: Query config for ^(DNS\|SUFFIX\|) DEBUG: Match Found : DNS|SUFFIX|1 DEBUG: 0 INFO: Query config for ^(DNS\|NAMESERVER\|) DEBUG: Match Found : DNS|NAMESERVER|1 DEBUG: 0 DEBUG: Match Found : DNS|NAMESERVER|2 DEBUG: 1 DEBUG: Match Found : DNS|NAMESERVER|3 DEBUG: 2 DEBUG: opening file for writing (/etc/network/interfaces). INFO: Query config for ^(DNS\|SUFFIX\|) DEBUG: Match Found : DNS|SUFFIX|1 DEBUG: 0 DEBUG: opening file for writing (/etc/dhcp/dhclient.conf). DEBUG: Command: 'chmod 644 /etc/dhcp/dhclient.conf' DEBUG: Result: DEBUG: Exit Code: 0 INFO: Query config for ^(DNS\|NAMESERVER\|) DEBUG: Match Found : DNS|NAMESERVER|1 DEBUG: 0 DEBUG: Match Found : DNS|NAMESERVER|2 DEBUG: 1 DEBUG: Match Found : DNS|NAMESERVER|3 DEBUG: 2 DEBUG: opening file for writing (/etc/dhcp/dhclient.conf). DEBUG: Command: 'chmod 644 /etc/dhcp/dhclient.conf' DEBUG: Result: DEBUG: Exit Code: 0 INFO: Customizing Date&Time ... DEBUG: opening file /tmp/.vmware-imgcust-daPpUsg/scripts/tzdata/backward. DEBUG: Command: 'ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime' DEBUG: Result: DEBUG: Exit Code: 0 DEBUG: opening file for writing (/etc/timezone). DEBUG: Command: 'whereis hwclock' DEBUG: Result: hwclock: /sbin/hwclock /usr/share/man/man5/hwclock.5.gz /usr/share/man/man8/hwclock.8.gz DEBUG: Exit Code: 0 DEBUG: Command: '/sbin/hwclock --systohc --utc' DEBUG: Result: DEBUG: Exit Code: 0 INFO: Marker file exists or is undefined, password settings are not needed INFO: Marker file exists or is undefined, post-customization is not needed INFO: Marker creation is not needed INFO: Customization completed. DEBUG: Removing lock file /var/lock/vmware/gosc. Customization command failed: Failed to create bus connection: No such file or directory Customization process returned with error. Deployment result = -1 Setting unknown error status in vmx. Transitioning from state INPROGRESS to state ERRORED. ENTER STATE ERRORED EXIT STATE INPROGRESS Setting deploy error: Deployment failed. The forked off process returned error code. Deployment failed. The forked off process returned error code. Launching cleanup. Command to exec : /bin/rm sizeof ProcessInternal is 56 Returning, pending output from stdout Returning, pending output from stderr Process exited normally after 0 seconds, returned 0 No more output from stdout No more output from stderr Customization command output: sSkipReboot: false, forceSkipReboot false Deploy error: Deployment failed. The forked off process returned error code. Package deploy failed in DeployPkg_DeployPackageFromFile ## Closing log 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 ## Starting deploy pkg operation Deploying / tmp / vmware - root / 418e3ed8 / imcf - tqtLQV Initializing deployment module . Cleaning old state file from tmp directory . EXIT STATE INPROGRESS Setting deploy error : Error removing lock / tmp / . vmware - deploy . INPROGRESS ( No such file or directory ) EXIT STATE Done Setting deploy error : Error removing lock / tmp / . vmware - deploy . Done ( No such file or directory ) EXIT STATE ERRORED Setting deploy error : Error removing lock / tmp / . vmware - deploy . ERRORED ( No such file or directory ) Setting deploy error : Success . Deploying cabinet file / tmp / vmware - root / 418e3ed8 / imcf - tqtLQV . Transitioning from state ( null ) to state INPROGRESS . ENTER STATE INPROGRESS Reading cabinet file / tmp / vmware - root / 418e3ed8 / imcf - tqtLQV . Flags in the header : 0 Original deployment command : / usr / bin / perl - I / tmp / . vmware / linux / deploy / scripts / tmp / . vmware / linux / deploy / scripts / Customize . pl / tmp / . vmware / linux / deploy / cust . cfg Actual deployment command : / usr / bin / perl - I / tmp / . vmware - imgcust - daPpUsg / scripts / tmp / . vmware - imgcust - daPpUsg / scripts / Customize . pl / tmp / . vmware - imgcust - daPpUsg / cust . cfg Extracting package files . Check if cust . cfg exists . cust . cfg is found in '/tmp/.vmware-imgcust-daPpUsg' directory . Command to exec : / usr / bin / cloud - init sizeof ProcessInternal is 56 Returning , pending output from stdout Returning , pending output from stderr Process exited normally after 0 seconds , returned 127 No more output from stdout No more output from stderr Customization command output : cloud - init is not installed Executing traditional GOSC workflow Command to exec : / usr / bin / perl sizeof ProcessInternal is 56 Returning , pending output from stdout Returning , pending output from stderr Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stdout Saving output from stderr Process exited normally after 0 seconds , returned 0 Saving output from stdout No more output from stdout No more output from stderr Customization command output : DEBUG : Creating directory / var / lock / vmware DEBUG : Opening / var / lock / vmware / gosc in O_CREAT | O_EXCL | O_WRONLY mode INFO : Opening file name / tmp / . vmware - imgcust - daPpUsg / cust . cfg . DEBUG : Processing line : '[NETWORK]' DEBUG : FOUND CATEGORY = NETWORK DEBUG : Processing line : 'NETWORKING = yes' DEBUG : ADDED KEY - VAL :: 'NETWORK|NETWORKING' = 'yes' DEBUG : Processing line : 'BOOTPROTO = dhcp' DEBUG : ADDED KEY - VAL :: 'NETWORK|BOOTPROTO' = 'dhcp' DEBUG : Processing line : 'HOSTNAME = VMToolsNotWork' DEBUG : ADDED KEY - VAL :: 'NETWORK|HOSTNAME' = 'VMToolsNotWork' DEBUG : Processing line : 'DOMAINNAME = ad.kensycloud.com' DEBUG : ADDED KEY - VAL :: 'NETWORK|DOMAINNAME' = 'ad.kensycloud.com' DEBUG : Processing line : '' DEBUG : Empty line . Ignored . DEBUG : Processing line : '[NIC-CONFIG]' DEBUG : FOUND CATEGORY = NIC - CONFIG DEBUG : Processing line : 'NICS = NIC1' DEBUG : ADDED KEY - VAL :: 'NIC-CONFIG|NICS' = 'NIC1' DEBUG : Processing line : '' DEBUG : Empty line . Ignored . DEBUG : Processing line : '[NIC1]' DEBUG : FOUND CATEGORY = NIC1 DEBUG : Processing line : 'MACADDR = 00:50:56:92:4f:88' DEBUG : ADDED KEY - VAL :: 'NIC1|MACADDR' = '00:50:56:92:4f:88' DEBUG : Processing line : 'ONBOOT = yes' DEBUG : ADDED KEY - VAL :: 'NIC1|ONBOOT' = 'yes' DEBUG : Processing line : 'IPv4_MODE = BACKWARDS_COMPATIBLE' DEBUG : ADDED KEY - VAL :: 'NIC1|IPv4_MODE' = 'BACKWARDS_COMPATIBLE' DEBUG : Processing line : 'BOOTPROTO = static' DEBUG : ADDED KEY - VAL :: 'NIC1|BOOTPROTO' = 'static' DEBUG : Processing line : 'IPADDR = 192.168.50.98' DEBUG : ADDED KEY - VAL :: 'NIC1|IPADDR' = '192.168.50.98' DEBUG : Processing line : 'NETMASK = 255.255.255.0' DEBUG : ADDED KEY - VAL :: 'NIC1|NETMASK' = '255.255.255.0' DEBUG : Processing line : 'GATEWAY = 192.168.50.1' DEBUG : ADDED KEY - VAL :: 'NIC1|GATEWAY' = '192.168.50.1' DEBUG : Processing line : '' DEBUG : Empty line . Ignored . DEBUG : Processing line : '' DEBUG : Empty line . Ignored . DEBUG : Processing line : '[DNS]' DEBUG : FOUND CATEGORY = DNS DEBUG : Processing line : 'DNSFROMDHCP=no' DEBUG : ADDED KEY - VAL :: 'DNS|DNSFROMDHCP' = 'no' DEBUG : Processing line : 'SUFFIX|1 = ad.kensycloud.com' DEBUG : ADDED KEY - VAL :: 'DNS|SUFFIX|1' = 'ad.kensycloud.com' DEBUG : Processing line : 'NAMESERVER|1 = 192.168.50.15' DEBUG : ADDED KEY - VAL :: 'DNS|NAMESERVER|1' = '192.168.50.15' DEBUG : Processing line : 'NAMESERVER|2 = 192.168.50.16' DEBUG : ADDED KEY - VAL :: 'DNS|NAMESERVER|2' = '192.168.50.16' DEBUG : Processing line : 'NAMESERVER|3 = 192.168.60.15' DEBUG : ADDED KEY - VAL :: 'DNS|NAMESERVER|3' = '192.168.60.15' DEBUG : Processing line : '' DEBUG : Empty line . Ignored . DEBUG : Processing line : '[DATETIME]' DEBUG : FOUND CATEGORY = DATETIME DEBUG : Processing line : 'TIMEZONE = America/New_York' DEBUG : ADDED KEY - VAL :: 'DATETIME|TIMEZONE' = 'America/New_York' DEBUG : Processing line : 'UTC = yes' DEBUG : ADDED KEY - VAL :: 'DATETIME|UTC' = 'yes' DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Reading / etc / os - release file . . . DEBUG : opening file / etc / os - release . DEBUG : Match found : Line = PRETTY_NAME = "Ubuntu 16.04.2 LTS" DEBUG : Actual String : "Ubuntu 16.04.2 LTS" DEBUG : "Ubuntu 16.04.2 LTS" WARNING : Amazon Linux flavor not detected DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l WARNING : RedHat release file not available . Ignoring it . WARNING : Redhat flavor not detected DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l WARNING : RedHat release file not available . Ignoring it . WARNING : Redhat flavor not detected DEBUG : Command : 'cat /etc/lsb-release' DEBUG : Result : DISTRIB_ID = Ubuntu DISTRIB_RELEASE = 16.04 DISTRIB_CODENAME = xenial DISTRIB_DESCRIPTION = "Ubuntu 16.04.2 LTS" DEBUG : Exit Code : 0 DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Command : 'cat /etc/lsb-release' DEBUG : Result : DISTRIB_ID = Ubuntu DISTRIB_RELEASE = 16.04 DISTRIB_CODENAME = xenial DISTRIB_DESCRIPTION = "Ubuntu 16.04.2 LTS" DEBUG : Exit Code : 0 DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l INFO : Detected distribution : Ubuntu 16.04 DEBUG : Reading issue file . . . DEBUG : Command : 'cat /etc/issue' DEBUG : Result : Ubuntu 16.04.2 LTS \ n \ l DEBUG : Exit Code : 0 DEBUG : Ubuntu 16.04.2 LTS \ n \ l INFO : Detected distribution flavour : Ubuntu 16.04 INFO : Customization instance Ubuntu15Customization loaded . INFO : Customization started DEBUG : Command : 'hostname 2>/dev/null' DEBUG : Result : ubnt1604tmpl DEBUG : Exit Code : 0 DEBUG : TimedCommand : 'hostname -f 2>/dev/null' with timeout of 5 sec DEBUG : Fetching result from / tmp / timed_out_tmp_file_765 DEBUG : TimedResult : ubnt1604tmpl DEBUG : opening file / etc / hostname . DEBUG : Match found : Line = ubnt1604tmpl DEBUG : Actual String : ubnt1604tmpl INFO : OLD HOST NAME = ubnt1604tmpl INFO : Marker file exists or is undefined , pre - customization is not needed INFO : Customizing Network settings . . . INFO : Erasing DHCP leases DEBUG : Command : 'pkill dhclient' DEBUG : Result : DEBUG : Exit Code : 256 DEBUG : Command : 'rm -f /var/lib/dhcp/*' DEBUG : Result : DEBUG : Exit Code : 0 DEBUG : Set the host name to VMToolsNotWork via [ hostnamectl set - hostname ] DEBUG : Command : 'hostnamectl set-hostname VMToolsNotWork' DEBUG : Result : DEBUG : Exit Code : 256 DEBUG : Host name is VMToolsNotWork DEBUG : opening file for writing ( / etc / hostname ) . DEBUG : Command : 'chmod 644 /etc/hostname' DEBUG : Result : DEBUG : Exit Code : 0 INFO : Customizing NICS . . . DEBUG : Command : 'modprobe pcnet32 2> /dev/null' DEBUG : Result : DEBUG : Exit Code : 0 DEBUG : Command : '/sbin/ifconfig eth0 2> /dev/null' DEBUG : Result : DEBUG : Exit Code : 256 INFO : Customizing NICS . { NIC1 } INFO : Customizing NIC NIC1 DEBUG : Get interface name for MAC 00 : 50 : 56 : 92 : 4f : 88 , via [ ip addr show ] DEBUG : Command : 'whereis ip' DEBUG : Result : ip : / bin / ip / sbin / ip / usr / share / man / man7 / ip . 7.gz / usr / share / man / man8 / ip . 8.gz DEBUG : Exit Code : 0 DEBUG : Command : '/bin/ip addr show' DEBUG : Result : 1 : lo : < LOOPBACK , UP , LOWER_UP > mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link / loopback 00 : 00 : 00 : 00 : 00 : 00 brd 00 : 00 : 00 : 00 : 00 : 00 inet 127.0.0.1 / 8 scope host lo valid_lft forever preferred_lft forever inet6 :: 1 / 128 scope host valid_lft forever preferred_lft forever 2 : ens160 : < BROADCAST , MULTICAST > mtu 1500 qdisc noop state DOWN group default qlen 1000 link / ether 00 : 50 : 56 : 92 : 4f : 88 brd ff : ff : ff : ff : ff : ff DEBUG : Exit Code : 0 INFO : NIC suffix = ens160 INFO : No primary NIC defined . Adding all routes as default . INFO : Configuring ipv4 route ( gateway settings ) for ens160 . INFO : Configuring default route 192.168.50.1 INFO : Query config for ^ ( NIC1 \ | IPv6ADDR \ | ) INFO : Query config for ^ ( NIC1 \ | IPv6NETMASK \ | ) INFO : Query config for ^ ( NIC1 \ | IPv6ADDR \ | ) INFO : Query config for ^ ( NIC1 \ | IPv6NETMASK \ | ) INFO : Query config for ^ NIC1 ( \ | IPv6GATEWAY \ | ) DEBUG : Command : 'mv /etc/network/interfaces /etc/network/interfaces.BeforeVMwareCustomization' DEBUG : Result : DEBUG : Exit Code : 0 DEBUG : opening file for writing ( / etc / network / interfaces ) . INFO : Customizing Hosts file . . . DEBUG : Old hostname = [ ubnt1604tmpl ] DEBUG : Old FQDN = [ ubnt1604tmpl ] DEBUG : New hostname = [ VMToolsNotWork ] DEBUG : Building FQDN . HostnameFQDN : VMToolsNotWork , Domainname : ad . kensycloud . com DEBUG : New FQDN = [ VMToolsNotWork . ad . kensycloud . com ] DEBUG : opening file / etc / hosts . DEBUG : Line ( inp ) : 127.0.0.1 localhost DEBUG : Line ( inp ) : 127.0.1.1 ubnt1604tmpl DEBUG : Replacing [ ubnt1604tmpl ] DEBUG : Replacing [ ubnt1604tmpl ] DEBUG : Adding [ VMToolsNotWork . ad . kensycloud . com ] DEBUG : Removing duplicating FQDNs DEBUG : Line ( inp ) : DEBUG : Line ( inp ) : # The following lines are desirable for IPv6 capable hosts DEBUG : Line ( inp ) : :: 1 localhost ip6 - localhost ip6 - loopback DEBUG : Line ( inp ) : ff02 :: 1 ip6 - allnodes DEBUG : Line ( inp ) : ff02 :: 2 ip6 - allrouters DEBUG : Static ip entry added DEBUG : Line ( out ) : 127.0.0.1 localhost DEBUG : Line ( out ) : 127.0.1.1 VMToolsNotWork . ad . kensycloud . com VMToolsNotWork DEBUG : Line ( out ) : DEBUG : Line ( out ) : # The following lines are desirable for IPv6 capable hosts DEBUG : Line ( out ) : :: 1 localhost ip6 - localhost ip6 - loopback DEBUG : Line ( out ) : ff02 :: 1 ip6 - allnodes DEBUG : Line ( out ) : ff02 :: 2 ip6 - allrouters DEBUG : Line ( out ) : 192.168.50.98 VMToolsNotWork . ad . kensycloud . com VMToolsNotWork DEBUG : opening file for writing ( / etc / hosts ) . DEBUG : Command : 'chmod 644 /etc/hosts' DEBUG : Result : DEBUG : Exit Code : 0 INFO : Customizing DNS . . . DEBUG : opening file / etc / nsswitch . conf . DEBUG : opening file for writing ( / etc / nsswitch . conf ) . DEBUG : Command : 'chmod 644 /etc/nsswitch.conf' DEBUG : Result : DEBUG : Exit Code : 0 DEBUG : opening file / etc / network / interfaces . INFO : Query config for ^ ( DNS \ | SUFFIX \ | ) DEBUG : Match Found : DNS | SUFFIX | 1 DEBUG : 0 INFO : Query config for ^ ( DNS \ | NAMESERVER \ | ) DEBUG : Match Found : DNS | NAMESERVER | 1 DEBUG : 0 DEBUG : Match Found : DNS | NAMESERVER | 2 DEBUG : 1 DEBUG : Match Found : DNS | NAMESERVER | 3 DEBUG : 2 DEBUG : opening file for writing ( / etc / network / interfaces ) . INFO : Query config for ^ ( DNS \ | SUFFIX \ | ) DEBUG : Match Found : DNS | SUFFIX | 1 DEBUG : 0 DEBUG : opening file for writing ( / etc / dhcp / dhclient . conf ) . DEBUG : Command : 'chmod 644 /etc/dhcp/dhclient.conf' DEBUG : Result : DEBUG : Exit Code : 0 INFO : Query config for ^ ( DNS \ | NAMESERVER \ | ) DEBUG : Match Found : DNS | NAMESERVER | 1 DEBUG : 0 DEBUG : Match Found : DNS | NAMESERVER | 2 DEBUG : 1 DEBUG : Match Found : DNS | NAMESERVER | 3 DEBUG : 2 DEBUG : opening file for writing ( / etc / dhcp / dhclient . conf ) . DEBUG : Command : 'chmod 644 /etc/dhcp/dhclient.conf' DEBUG : Result : DEBUG : Exit Code : 0 INFO : Customizing Date & Time . . . DEBUG : opening file / tmp / . vmware - imgcust - daPpUsg / scripts / tzdata / backward . DEBUG : Command : 'ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime' DEBUG : Result : DEBUG : Exit Code : 0 DEBUG : opening file for writing ( / etc / timezone ) . DEBUG : Command : 'whereis hwclock' DEBUG : Result : hwclock : / sbin / hwclock / usr / share / man / man5 / hwclock . 5.gz / usr / share / man / man8 / hwclock . 8.gz DEBUG : Exit Code : 0 DEBUG : Command : '/sbin/hwclock --systohc --utc' DEBUG : Result : DEBUG : Exit Code : 0 INFO : Marker file exists or is undefined , password settings are not needed INFO : Marker file exists or is undefined , post - customization is not needed INFO : Marker creation is not needed INFO : Customization completed . DEBUG : Removing lock file / var / lock / vmware / gosc . Customization command failed : Failed to create bus connection : No such file or directory Customization process returned with error . Deployment result = - 1 Setting unknown error status in vmx . Transitioning from state INPROGRESS to state ERRORED . ENTER STATE ERRORED EXIT STATE INPROGRESS Setting deploy error : Deployment failed . The forked off process returned error code . Deployment failed . The forked off process returned error code . Launching cleanup . Command to exec : / bin / rm sizeof ProcessInternal is 56 Returning , pending output from stdout Returning , pending output from stderr Process exited normally after 0 seconds , returned 0 No more output from stdout No more output from stderr Customization command output : sSkipReboot : false , forceSkipReboot false Deploy error : Deployment failed . The forked off process returned error code . Package deploy failed in DeployPkg_DeployPackageFromFile ## Closing log

I’ve paged through the output a fair bit but haven’t been able to hone in on the actual issue. Line 409 is where the first indicator of failure occurs.

I am going to see if there are any other users out there reporting similar issues. For now, I am going to use sudo apt-mark hold open-vm-tools in order to keep open-vm-tools from updating in my templates. This isn’t ideal, obviously, but I also can’t keep rolling back vRA deploys.

I haven’t tried later versions of open-vm-tools in CentOS or RHEL yet so I am not sure if they also have issues – I doubt that they do because I think this is an Ubuntu backport issue. I did want to mention that by holding open-vm-tools back I am able to update the entire template without issue. Further, once the template is deployed I am able to upgrade open-vm-tools without issue – it just seems that for some reason guest customization is failing on on open-vm-tools 10.2.0-3.

One other thing worth mentioning, I do believe I heard or read something about the latest version of open-vm-tools in Ubuntu being a backport of that in 18.04 LTS which, as you may know, has some significant changes involved in how networking is handled. It’s possible that the backport breaks 16.04 LTS functionality.

Let me know if you have similar results or have found a solution to this problem. I will be sure to update this post should I find a solution also!

Share this: Twitter

Facebook

