avdmanager hangs on "Loading local repository..." Linux Repro:


Headless Ubuntu 18.04 LTS VM (kvm note enabled)
sudo apt-get update
sudo apt-get install -y wget openjdk-8-jre-headless libc6-i386 lib32stdc++6 python3-pip nginx unzip
sudo wget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
sudo unzip commandlinetools-linux-6200805_latest.zip -d /opt
sudo /opt/tools/bin/sdkmanager --install --sdk_root=/opt "system-images;android-19;default;armeabi-v7a" "platform-tools" "platforms;android-19"
/opt/tools/bin/avdmanager create avd -n arm -k "system-images;android-19;default;armeabi-v7a" -f


On step 7 in hangs with Loading local repository...

Notes:


Running the avdmanager as sudo doesn't help, and the image need's to be created by a user anyway.
Tried sudo setfacl -m u:username:rwx /opt/tools/bin/avdmanager didn't help
setting ANDROID_HOME=/opt and PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools doesn't help
newer version of command line tools don't help ether.


What is the problem? How can I investigate? Have I missed something?
It happened because since version (6200805) Command Line Tools should be placed inside cmdline-tools directory. It should be created manually in ANDROID_HOME. 

Please see this answer With the mentioned configuration everything works fine.