Tiny Core Linux

General TC => Tiny Core on Virtual Machines => Topic started by: xy777 on January 14, 2018, 01:05:20 AM

Title: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 01:05:20 AM
Hi All

New to TCL ;-)

I have installed a Tiny Core Linux 8.2 virtual machine in my vSphere 6.5 environment but am battling to get the VMware Tools to work. I have installed open-vm-tools as follows:

tce-load -wi open-vm-tools-desktop
tce-load -wi open-vm-tools

If I run those commands again it says:

open-vm-tools is already installed!
open-vm-tools-desktop is already installed!

But in vCenter it still says that the VMware tools are not installed.

What do I need to do to get this to work?

Thanks!
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: Juanito on January 14, 2018, 01:34:44 AM
did you take a look at the info file?
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 02:07:09 AM
Yes but I was a bit confused after reading it  :-[
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 07:00:56 AM
Open-vm-tools is a dependency of open-vm-tools-desktop, so you do not need to load both yourself. Also, you should use rxvt instead of aterm for your terminal if you are not already. Your /etc/sysconfig/tcedir/onboot.lst file should at least have these:

Code: [Select]
open-vm-tools-desktop.tcz
Xlibs.tcz
Xprogs.tcz
rxvt.tcz
flwm_topside.tcz
wbar.tcz

ESXi should detect the vmtools when the VM boots.

(http://www.asjohnson.com/esxi-tools.png)
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 07:16:50 AM
Thanks very much for the reply

I have updated my /etc/sysconfig/tcedir/onboot.lst   so that it looks as follows:

Code: [Select]
Xvesa.tcz
aterm.tcz
flwm_topside.tcz
wbar.tcz
fluxbox.tcz
nano.tcz
bash.tcz
ipv6-4.8.17-tinycore.tcz
openssh.tcz
nginx.tcz
open-vm-tools.tcz
open-vm-tools-desktop.tcz
Xlibs.tcz
Xprogs.tcz
rxvt.tcz

I then ran sudo filetool.sh -b and rebooted but vCenter is still telling me that I don't have VMware tools installed?

Appreciate the help!
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 08:01:06 AM
Make your onboot.lst like this:

Code: [Select]
ipv6-4.8.17-tinycore.tcz
open-vm-tools-desktop.tcz
Xlibs.tcz
Xprogs.tcz
rxvt.tcz
nano.tcz
bash.tcz
flwm_topside.tcz
wbar.tcz
openssh.tcz
ca-certificates.tcz
nginx.tcz

Double check that these are all downloaded onto your virtual hard drive before you reboot.
Xvesa will confict with Xorg, and the vmxgfx video driver is only available in Xorg, so Xvesa has to go.
Aterm does not render correctly in a VM for some reason, so it needs to go in favor of rxvt (the successor to aterm anyway).
Fluxbox and flwm_topside are both window managers. You only need one. Let's stick to FLWM until we get ESXi right.
Watch for any errors when the VM boots to see if something is not loading. Once you get to a shell prompt "tce-status -i" will tell you what is loaded.
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 08:40:52 AM
Make your onboot.lst like this:

Code: [Select]
ipv6-4.8.17-tinycore.tcz
open-vm-tools-desktop.tcz
Xlibs.tcz
Xprogs.tcz
rxvt.tcz
nano.tcz
bash.tcz
flwm_topside.tcz
wbar.tcz
openssh.tcz
ca-certificates.tcz
nginx.tcz

Double check that these are all downloaded onto your virtual hard drive before you reboot.
Xvesa will confict with Xorg, and the vmxgfx video driver is only available in Xorg, so Xvesa has to go.
Aterm does not render correctly in a VM for some reason, so it needs to go in favor of rxvt (the successor to aterm anyway).
Fluxbox and flwm_topside are both window managers. You only need one. Let's stick to FLWM until we get ESXi right.
Watch for any errors when the VM boots to see if something is not loading. Once you get to a shell prompt "tce-status -i" will tell you what is loaded.

Many thanks for your helpful reply!

I ran tce-status -i and the only one that wasn't listed was rxvt.

I did see the following error during bootup of TC:

Loading extensions...piix4_smbus 0000:00:07.3: SMBus Host Controller not enabled!

I've just installed rxvt and rebooted again.

tce-status -i has the following output:

Code: [Select]
Xlibs
Xorg-7.7
Xorg-7.7-3d
Xorg-7.7-bin
Xorg-7.7-lib
Xorg-fonts
Xprogs
atk
atkmm
bash
bzip2-lib
cairo
cairomm
elfutils
expat2
fltk-1.3
flwm_topside
fontconfig
freetype
fuse
gdk-pixbuf2
glib2
glibmm
graphics-4.8.17-tinycore
gtk2
gtk2mm
harfbuzz
i2c-4.8.17-tinycore
imlib2
imlib2-bin
ipv6-4.8.17-tinycore
libEGL
libFS
libGL
libGLESv2
libICE
libSM
libX11
libXau
libXaw
libXcomposite
libXcursor
libXdamage
libXdmcp
libXext
libXfixes
libXfont
libXfont2
libXft
libXi
libXinerama
libXmu
libXpm
libXrandr
libXrender
libXres
libXss
libXt
libXtst
libXv
libXvmc
libXxf86dga
libXxf86vm
libdmx
libdnet
libdrm
libedit
libepoxy
libevdev
libffi
libfontenc
libjpeg-turbo
liblzma
libpciaccess
libpng
libsigc++
libtiff
libvdpau
libxcb
libxkbfile
libxshmfence
llvm-lib
mtdev
nano
ncurses
ncurses5
netfilter-4.8.17-tinycore
nginx
open-vm-tools
open-vm-tools-desktop
openssh
openssl
pango
pangomm
pcre
pixman
procps
readline
rxvt
udev-lib
wbar
xcursor-themes
xf86-input-evdev
xf86-input-vmmouse
xf86-video-vesa
xf86-video-vmware
xkeyboard-config
xorg-server

    [EDIT]: Added code tags.  Rich
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 09:39:45 AM
Is it working now? You can check to see if you have any programs like these running (using ps -ef):

Code: [Select]
vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse
/usr/local/bin/vmtoolsd
/usr/local/bin/vmtoolsd -n vmusr --blockFd 3

Check vSphere by testing "shutdown guest" and "restart guest" to make sure they work. Much more important when you have a database, and much better than "power off" and "reset". Time sync should also work if you have it enabled.
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 12:25:15 PM
Is it working now? You can check to see if you have any programs like these running (using ps -ef):

Code: [Select]
vmware-vmblock-fuse -o subtype=vmware-vmblock,default_permissions,allow_other /var/run/vmblock-fuse
/usr/local/bin/vmtoolsd
/usr/local/bin/vmtoolsd -n vmusr --blockFd 3

Check vSphere by testing "shutdown guest" and "restart guest" to make sure they work. Much more important when you have a database, and much better than "power off" and "reset". Time sync should also work if you have it enabled.

No, it's still not working I'm afraid. vCenter is still saying VMware tools is not installed.

If I run ps -ef I don't see anything like you mentioned with vmware running. I can see the directory though of /usr/local/bin/vmtoolsd.

Do I need to manually start the service/daemon or do anything else?
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 01:43:28 PM
It should start when the extension loads. But to be sure and to start the other services (like openssh and nginx) try adding this to /opt/bootlocal.sh:

Code: [Select]
cp /usr/local/etc/ssl/certs/ca-certificates.crt /usr/local/etc/ssl/cert.pem

for a in $(find -L /usr/local/etc/init.d -type f); do
        [ -x $a ] && $a start &
done

Also, try running

Code: [Select]
vmware-checkvm
and

Code: [Select]
ldd $(which vmtoolsd)
and run ldd on all the libraries in /usr/local/lib/open-vm-tools/plugins to make sure nothing is missing. I can't reproduce your problem yet.
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 02:30:59 PM
I think I am slowly making progress with your help  :)

I reinstalled the VM and installed Open VM Tools again and now vCenter is saying that VMware Tools are running version 10304 (Guest Managed)

The problem I have now is that when I go into the remote console I have no mouse? (keyboard works though)

Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 02:43:46 PM
The mouse just doesn't work right in the VNC'ish console, but that's been a VNC problem since Moses was a boy. Is VMplayer connecting to the ESXi server an option? That would expand your options considerably.
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 02:48:24 PM
The mouse just doesn't work right in the VNC'ish console, but that's been a VNC problem since Moses was a boy. Is VMplayer connecting to the ESXi server an option? That would expand your options considerably.

I'm not using VNC. I'm using the VMware Remote Console or Web Console from withing vCenter.

Actually. the mouse does "work" but it moves around the screen in a crazy manner which makes it unusable. Is there anything I need to tweak to get this to work?

Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 03:07:24 PM
You are using VNC. It's just not called that in when you use the console. As far as I know there isn't a way to get it to work right in the web console. I do know what you are seeing, and all I can say is don't use the web console. The mouse is broken. If you really want to make it work try searching for VNC mouse help, but know that you will find a bazillion hits. Just move on. Really. Try connecting remotely from VMplayer or VMware Workstation if you want a proper mouse. For what it's worth servers don't usually have GUI's so once the VM is started use ssh and go from there.
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 14, 2018, 03:14:25 PM
Ok, I understand now  :)

I used VMware Workstation to connect to vCenter and the mouse worked fine!

Two more things:

1) When I do a reboot of the VM using the "restart" option it shuts the VM down instead of rebooting it...huh?

2) How do I ensure I am running the latest version of VM Open Tools? In vCenter it says: version:10304 . Is this the most up to date version?
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: andyj on January 14, 2018, 04:23:26 PM
To be fair I have not dug into the details of the scripts. Reset is like holding down the power button on a PC. Restart is the graceful way. There isn't a "reboot" script, so I suspect ESXi/VMware does a shutdown, then a power-on. They are all in /etc/vmware-tools. Try "vmware-toolbox-cmd --version" in TC to see the version. I don't know where the version number comes from that ESXi sees. I see this:

(http://www.asjohnson.com/esxi-tools1.png)

I would welcome any help to improve the open-vm-tools extensions. Also, you may notice that when running a ESXi VM in VMware Workstation screen resizing should work if you added vmware-user to your .xsession file like the open-vm-tools-desktop.tcz.info file says. If you use that feature you will probably want to move wbar to the upper left corner.
Title: Re: Battling with VMware tools aka open-vm-tools
Post by: xy777 on January 15, 2018, 07:34:40 AM
Open VM Tools seem to be running well in my TC VM! The restart option in vCenter does a shut down and I had to power it back on again. No big deal. I'm just glad I can manage the VM correctly with the VMware tools installed now rather than doing a hard reboot/shutdown as before. Also I can see the VMs IP addresses, DNS name and VMware tools version which is helpful.

So andyj, thank you very much for helping me with this and for your patience. You were really helpful!  :)