vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.26k stars 427 forks source link

systemctl status vmtoolsd.service does not return prompt handle after executing #703

Open CodeSpaniard opened 10 months ago

CodeSpaniard commented 10 months ago

Describe the bug

systemctl status vmtoolsd.service does not return prompt handle after executing

Reproduction steps

  1. Launch systemctl status vmtoolsd.service on Ubuntu 64-bit Arm 22.04.3 after installing open-vm-tools
  2. The output ends with lines 1-10/10n (END) but does not return the prompt to the user.

Expected behavior

The prompt should be returned to the user.

Additional context

I am trying to install and use open-vm-tools, specifically to allow for copying between my host mac M1 and the Ubuntu VMware guest.

PaTHml commented 10 months ago

We'll need more info:

Host mac M1:

VM information (Ubuntu 22.04.3):

Thanks

PaTHml commented 10 months ago

Right and the output for the command. As described it doesn't make sense.

johnwvmw commented 10 months ago

@CodeSpaniard What you are seeing with the "systemctl status" is "normal" behavior. The command is waiting for the user to enter q just as needed at the end of less output.

Confirm that you have both open-vm-tools and open-vm-tools-desktop packages installed. apt list --installed | grep open-vm-rools

After installing open-vm-tools-desktop, you will nee to either log out of the desktop and log back on - or - reboot the Ubuntu VM.

Check that you have 2 vmtoolsd processes running - one for the system service and one for the desktop user.

ps -aef | grep vmtoolsd

For best results with copy/paste, select "Ubuntu on Xorg" from the setting icon when entering you password when logging into the desktop.

PaTHml commented 10 months ago

Not sure why, but it looks like in your environment systemctl is using a pager. Try one ot these:

systemctl --no-pager status vmtoolsd.service systemctl status vmtoolsd.service | cat

I would also check environment variable like SYSTEMD_PAGER and PAGER. If SYSTEMD_PAGER is not defined you might have success defining it to empty string to disable the behavior.

Just TOH ideas, YMMV.

PaTHml commented 10 months ago

To be complete:

[...]

   $SYSTEMD_LESS
       Override the options passed to less (by default "FRSXMK").
       ...

etc.

I haven't found a reference on how to change the behavior through a (systemd) configuration file.

CodeSpaniard commented 10 months ago

@PaTHml and @johnwvmw : Thank you for the elaborate feedback. Finally, I can copy between host and guest. I honestly don't know what was the issue and what has finally changed. I have made several attempts at installing vmware tools/open-vm-tools and am not sure how successful I was. Besides, Reinstall VMware Tools is grayed out as before.

Responses to your questions and suggestions:

Host mac M1:

Mac OS X version: Not using Mac OS X VMware Fusion version: Player Version 13.5.0 (22583790) If not using Mac OS X, what's the host OS with all the version details you can get and what version of VMware Workstation being used. : Host: macOS ventura Version 13.5.1 (22G90)

VM information (Ubuntu 22.04.3): Ubuntu 64-bit Arm 22.04.3

'uname -a' output: Linux ariel-virtual-machine 6.5.0-14-generic #14~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 20 20:26:31 UTC 2 aarch64 aarch64 aarch64 GNU/Linux

open-vm-tools packages installed (and versions) Any related errors in syslog? number of vcpu, ram size, might also need to look into the /usr/lib/systemd/system/open-vm-tools.service content. VMTools/OVT logs might have info if it had issues. look at /var/log/vmware-vmtoolsd-.log and /var/log/vmware-vmsvc-.log files for errors.

What you are seeing with the "systemctl status" is "normal" behavior. The command is waiting for the user to enter q just as needed at the end of less output.: That's right, I realized typing q returns the prompt just as typing Ctrl+C

apt list --installed | grep open-vm-rools: WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

ps -aef | grep vmtoolsd: root 573 1 0 14:56 ? 00:02:07 /usr/bin/vmtoolsd ariel 1952 1492 0 14:56 ? 00:01:13 /usr/bin/vmtoolsd -n vmusr --blockFd 3 --uinputFd 4 hadoop 12216 4674 0 22:57 pts/0 00:00:00 grep --color=auto vmtoolsd

For best results with copy/paste, select "Ubuntu on Xorg" from the setting icon when entering you password when logging into the desktop.: Not sure how to go about that

Not sure why, but it looks like in your environment systemctl is using a pager. Try one ot these:

systemctl --no-pager status vmtoolsd.service: Right, now the prompt is automatically returned

systemctl status vmtoolsd.service | cat: Same here, the prompt is automatically returned

I would also check environment variable like SYSTEMD_PAGER and PAGER. If SYSTEMD_PAGER is not defined you might have success defining it to empty string to disable the behavior.: None of them is defined

$SYSTEMD_PAGERSECURE: Not defined

johnwvmw commented 10 months ago

For best results with copy/paste, select "Ubuntu on Xorg" from the setting icon when entering you password when logging into the desktop.:

Not sure how to go about that`

When logging on to the desktop and presented with the "password" screen, click on the "setup" icon in the lower right corner of the screen. Select "Ubuntu on Xorg"

On Gnome, "Ubuntu" selects the Wayland client and that is indicated by the --uinputFd 4 on the "vmtoolsd -n vmusr" process reported above.