Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guest customization fails to reboot host on Ubuntu 19.04 #386

Closed
rust84 opened this issue Nov 10, 2019 · 4 comments
Closed

Guest customization fails to reboot host on Ubuntu 19.04 #386

rust84 opened this issue Nov 10, 2019 · 4 comments

Comments

@rust84
Copy link

rust84 commented Nov 10, 2019

What happened?

Trying to customize a Ubuntu 19 guest and the script exits with an error.

Failed to open initctl fifo: No such device or address
Failed to talk to init daemon.

Version information

ESX 6.7 U2

$ dpkg -l | grep open-vm-tools
ii  open-vm-tools                        2:10.3.10-1                       amd64        Open VMware Tools for virtual machines hosted on VMware (CLI)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco

Customization options

customize {

  linux_options {
    host_name = "${var.virtual_machine_name_prefix}${count.index}"
    domain    = "${var.virtual_machine_domain}"
  }

  network_interface {
    ipv4_address = "${cidrhost(var.virtual_machine_network_address, var.virtual_machine_ip_address_start + count.index)}"
    ipv4_netmask = "${element(split("/", var.virtual_machine_network_address), 1)}"
  }

  ipv4_gateway    = "${var.virtual_machine_gateway}"
  dns_suffix_list = ["${var.virtual_machine_domain}"]
  dns_server_list = ["1.1.1.1", "1.0.0.1"]
}

Log output

[2019-11-11T06:42:17.711Z] [    info] sSkipReboot: false, forceSkipReboot false

[2019-11-11T06:42:17.712Z] [   debug] Ran DeployPkg_DeployPackageFromFile successfully
[2019-11-11T06:42:17.712Z] [   debug] ## Closing log
[2019-11-11T06:42:17.712Z] [    info] Rebooting

[2019-11-11T06:42:17.712Z] [   debug] Command to exec : /sbin/telinit

[2019-11-11T06:42:17.712Z] [    info] sizeof ProcessInternal is 56

[2019-11-11T06:42:17.712Z] [    info] Returning, pending output from stdout
[2019-11-11T06:42:17.712Z] [    info] Returning, pending output from stderr
[2019-11-11T06:42:17.812Z] [    info] Process exited normally after 0 seconds, returned 0
[2019-11-11T06:42:17.812Z] [    info] No more output from stdout
[2019-11-11T06:42:17.812Z] [    info] No more output from stderr
[2019-11-11T06:42:17.812Z] [    info] Customization command output:

[2019-11-11T06:42:18.812Z] [    info] Rebooting

[2019-11-11T06:42:18.812Z] [   debug] Command to exec : /sbin/telinit

[2019-11-11T06:42:18.812Z] [    info] sizeof ProcessInternal is 56

[2019-11-11T06:42:18.813Z] [    info] Returning, pending output from stdout
[2019-11-11T06:42:18.813Z] [    info] Returning, pending output from stderr
[2019-11-11T06:42:18.913Z] [    info] Process exited normally after 0 seconds, returned 1
[2019-11-11T06:42:18.913Z] [    info] No more output from stdout
[2019-11-11T06:42:18.913Z] [    info] Saving output from stderr
[2019-11-11T06:42:18.913Z] [    info] No more output from stderr
[2019-11-11T06:42:18.913Z] [    info] Customization command output:

[2019-11-11T06:42:18.913Z] [   error] Customization command failed with exitcode: 1, stderr: Failed to open initctl fifo: No such device or address
Failed to talk to init daemon.


[2019-11-11T06:42:18.947Z] [   error] telinit returned error 1
@PengpengSun
Copy link

PengpengSun commented Nov 12, 2019

@rust84 The last 2 lines error log in /var/log/vmware-imc/toolsDeployPkg.log is expected, the script executes '/sbin/telinit' command repeatedly to make sure VM reboot happen.
With these error log, the reboot should still happen.

While the error log is confusing, a fix has been submitted to the latest open-vm-tools to address it, please find details at 680c9d4

@stanguturi
Copy link
Contributor

@rust84 The last 2 lines error log in /var/log/vmware-imc/toolsDeployPkg.log is expected, the script executes '/sbin/telinit' command repeatedly to make sure VM reboot happen.
With these error log, the reboot should still happen.

While the error log is confusing, a fix has been submitted to the latest open-vm-tools to address it, please find details at 680c9d4

Thanks @PengpengSun Closing this bug.

@santoshseth
Copy link

santoshseth commented Oct 18, 2023

Facing the same error with Vmware tools 12.1.5 and Ubuntu 22.04.03
Could you please help
image (1)

@PengpengSun
Copy link

Hi @santoshseth ,

The error is different, I think you are saying the "Telinit command failed with exitcode: 1...." log. As you can see, it's a [info] level log. It comes from ForkExecAndWaitCommand("/sbin/telinit 6", false) when it fails to execute '/sbin/telinit 6' since the vm has already been in process of rebooting.
With the change 680c9d4, "Reboot has been triggered." will be logged only when reboot has been triggered successfully.

So your vm should have been rebooted(check journalctl --list-boots), you can safely ignore this Telinit command failed log and only check if "Reboot has been triggered." is there.

Thanks,
Pengpeng

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants