Thursday, February 8, 2018

Manage permissions of roles on VMware ESXi server with vSphere Client 6.0

First of all, VMware ESXi is at v6.5 at the time this post is composed. However, it seems that VMware has dropped the development of vSphere Client which has been a powerful tool to manage ESXi servers.
Now the latest version of vSphere Client one can get is v6.0 Update 3 (5112508), and the download link can be found in VMware KB: Download URLs for VMware vSphere Client (2089791).

Complaint 1: The web UI shipped with ESXi v6.5 does not work with Chrome (the latest version as of Jan 2018). I get an exception pop-up immediately after I log in. It prevents future interactions and only allows me to reload the log in page which will simply lead to the same exception again. No screen-shot for this because I do not have Chrome on the machine I am currently using, but I believe a lot of you might be using Chrome...

I really think vSphere Client is MUCH MORE stable than the web UI. So sad that they seem to have dropped the development of vSphere Client.
Note that vSphere Client v6.0 can edit the settings of a VM only if the VM was created compatible with v11 or lower.

Complaint 2: If you edit the settings of any virtual machine in the web UI for more than once, including when you create it, the form in the web UI will be filled up with garbage strings and integers (e.g. RAM size becoming some negative number) that you definitely do not want to risk continuing with the edit.

Of course, I totally understand that web-based management systems are much easier to design and maintain. Actually, vSphere Client only works for Windows systems -- those who use macOS or Linux will have to use the web UI or use another VM (to run Windows) to manage the VM host (ESXi server).

Fortunately, I have a Windows 10 machine, so I am still able to run vSphere Client v6.0.
However, I really had a hard time figuring out how to manage users and roles with the client.

(Image expired...)

Management of users and permission can be access in "inventory".
In "users", I can create/delete users;
In "permissions", I can assign roles to the users.
But wait -- how do I manage the roles?

I searched Google and here is what I found:
First, I need to go back to the "home" page which I do not even know about its existence before this; then click on "roles".

(Image expired...)

On the "roles" page, I can then add and edit roles if I have enough permissions to do so.

(Image expired...)

Complaint 3: I know this does not sound very complicated, but it is really anti-intuition to me, i.e. why this function is so far away from other related functions in the client software. I do not quite understand the thoughts of who designed this client. Honestly, I think some times it could be very helpful if the entrance of some function of the software appears multiple times in different places, so it is easier to find.

Anyway, more complaints are coming in the next post.

Think twice before you buy the Edimax EW-7811Un dongle

This is just a complaint...
I think everyone who is thinking of buying a tiny Wi-Fi dongle should really think twice, especially those who is planning to use it on a Linux machine.

Edimax EW-7811Un
During the past three years working with it I got mostly just headaches.
It is slow (approximately 20 Mbps in my case) and it creates a lot of compatibility issues with the built-in Wi-Fi driver of Raspbian, Ubuntu 14.04 LTS, Ubuntu 16.04 LTS, and CentOS 7.

You are worth a better dongle.

Wednesday, November 15, 2017

Linux built-in driver fails for Edimax EW-7811Un [Realtek RTL8188CUS]

It seems that I have been struggling with this small piece of hardware for years; and it has been giving me surprises all the time.

Yes, I am talking I about this Wi-Fi dongle again:

Edimax EW-7811Un
While it still appears to be one of the best sellers on Amazon, a lot of people have had problems with it when using with Linux systems.

Recently the critical problem is the intermittent connection issue which occurs on a lot of Wi-Fi adapters including some of the RTL models. https://www.google.com/search?q=ubuntu+intermittent+wifi&ie=utf-8&oe=utf-8 (a lot of complaints are from Ubuntu users, likely because a good part of Linux desktop users are using Ubuntu).
If many years later when you click on this link you do not see any sense making posts, that means the problem is probably solved -- which would be great.

Long story short, I am not writing to provide a full solution to this problem, because there is already one: GitHub - pvaret/rtl8192cu-fixes: Realtek 8192 chipset driver, ported to kernel 3.11.
It has very straight forward installation instructions in the GitHub repo's `README.md` file; I have been using this fixed driver for a lot of Ubuntu 16.04 LTS PCs and it solves the problem like a charm.
For example, it works on my desktop PC which runs Ubuntu 16.04.3 LTS (GNU/Linux 4.10.0-38-generic x86_64).

However, this simple solution did not work immediately when I tried it with a CentOS 7 desktop using kernel version 3.10.0-693.5.2.el7.x86_64.
During installation I had several problems:
  1. After installation my `dmesg` shows:

    8192cu: loading out-of-tree module taints kernel. / 8192cu: module verification failed: signature and/or required key missing - tainting kernel
  2. Once I blacklist the built-in driver (rtl8192cu) as I usually do with Ubuntu 16.04 LTS, no new driver is loaded for my Wi-Fi dongle. The device completely disappears from NetworkManager. While it is still there if I do `ifconfig -a`, there does not seem to be a way that I can start it.
Here are some experiences on how I finally made it work:

First, the "tainting kernel" message does not matter -- as long as the driver is still loaded as a kernel module. You can check whether it is using `lsmod` -- it should appear as "8192cu".

Second, it does not really matter if you see "used = 0" for "8192cu" in `lsmod`, because that is also the case on my Ubuntu 16.04 LTS desktop.

Third, I still do not know how to make it work with NetworkManager. Instead, I turned to use `wpa-supplicant` directly. This tool is very fundamental, and does not allow you to switch Wi-Fi access points based on your need or in any graphical way; it fits in my needs perfectly but may not fit in yours.

The instructions to disable NetworkManager and configure the Wi-Fi dongle to work with `wpa-supplicant` directly is here: HowTos/Laptops/WpaSupplicant - CentOS Wiki.
Some of the instructions are outdated -- in `prepnet`, you should probably use `systemctl start messagebus` instead of calling it from `init.d`, for example.

Note that, if you do not want to disable NetworkManager completely, you can just set you specific Wi-Fi dongle to be "unmanaged" for it: configuration - How can I make NetworkManager ignore my wireless card? - Ask Ubuntu.

One more thing is, I found that when using wpa_supplicant, the default driver `nl80211` does not work with the fixed driver aforementioned. However, I succeeded with "wext". This can be changed in `/etc/sysconfig/wpa_supplicant` where there is a place for users to specify the driver to use. I changed its first two sections into:

# Use the flag "-i" before each of your interfaces, like so:
#  INTERFACES="-ieth1 -iwlan0"
INTERFACES="-iwlp0s26f7u1"

# Use the flag "-D" before each driver, like so:
#  DRIVERS="-Dwext"
DRIVERS="-Dwext"


Now I have been using this desktop for a day and have not noticed any intermittent connection issue so far, which used to happen every several minutes.
It appears it has been resolved.

In summary:
  1. Use the fixed driver (rtl8192cu-fixes).
  2. Disable NetworkManager (at least for the problematic device) and use wpa_supplicant.
  3. Config wpa_supplicant to use the "wext" driver.
Good luck :-)

Tuesday, July 21, 2015

Is my Raspberry Pi overheating?

Recently I am getting annoying misbehaviors on my Raspberry Pi.

This Raspberry Pi is NOT the one I used for network tests in my previous posts (Wi-Fi AP hosting is NOT stable on my Raspberry Pi and Hosting a Wi-Fi access point on Debian with Edimax EW-7811Un [Realtek RTL8188CUS]). This is the one I am using for my project. I need to work outdoors with this Raspberry Pi powered on a USB power bank (a.k.a battery pack), so it is pretty tricky to know what the problem exactly is.

Fortunately, with a Bluetooth serial interface, I am able to have my Raspberry Pi talk to a Bluetooth terminal application on my Android phone. Now I plan to figure out if the problem is caused by overheating. Before this post, I have already tried troubleshooting with these possible causes:
  1. Too much data being generated and processed by my program.
  2. Too much data flowing through the on-board database.
I once thought 1 was the cause. Solving 1 actually gave me pretty many peaceful days with my Raspberry Pi. However, I just found that the problem was not completely solved. I doubt if the temperature is causing these troubles because I personally feel that the problem occurred more frequently in hot days.

I plan to let my Raspberry Pi report its chip temperature(s). Here's what I am going to do with it tomorrow:

http://raspberrypi.stackexchange.com/questions/8689/how-do-i-display-the-temperature-from-the-internal-sensor-on-a-html-page

Since on-board temperature is a pretty commonly asked question for Raspberry Pi, I will not copy and paste the solution to my post. I am not going to do any HTML work either. It is just that the solution was also given in Python.

I like Raspberry Pi Stack Exchange now, however it doesn't seem to have enough active users.
---
Updated on July 23

I implemented the CPU temperature monitoring functionality yesterday, and did some outdoor tests. However it was much cooler yesterday than it was on Wednesday. I didn't notice any abnormal behavior on my Pi. When that Raspberry Pi ran indoors with a room temperature of 18 Celsius, the CPU temperature was 40. When it ran outdoors with an estimated air temperature of 28 Celsius, the CPU temperature was 50.

Probably next time when it gets hot enough outdoors, I can testify my assumption.

Wi-Fi AP hosting is NOT stable on my Raspberry Pi

Two weeks ago I have posted about Hosting a Wi-Fi access point on Debian with Edimax EW-7811Un [Realtek RTL8188CUS].

However I found it NOT stable enough. While the Raspberry Pi seemed working well, the AP hosting feature failed occasionally, approximately once every 2 or 3 days. Sometimes it seemed that the dongle stopped working, and sometimes the dongle was blinking, but clients could not access the Internet when connected to that hosted AP.

Here are my assumptions:

1. The power supply is still not enough for the Raspberry Pi with two Wi-Fi adapters on a 4-port USB hub powered on the Pi's USB port.


Clues: The situation became worse (AP hosting stopped more frequently) after I added a Bluetooth dongle to the USB hub.

2. Instability occurred in DNS service dnsmasq, or AP hosting service hostapd.


I am not sure if this is the truth because I have never left my laptop running at the same place for more than 3 days, thus I have got nothing for comparison. Even if these services work well on my laptop, I cannot conclude they worked well on the Raspberry Pi too, because they are not based on the same architecture on these two different platforms.

I don't have enough time to testify all these things out at present. I will try to do some tests on my Raspberry Pi, after I have accomplished the current phase of the project I am working on.