ubuntu-cloudimg-query: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/ubuntu-cloudimg-query - from package: cloud-utils

You may install the required package with command apt-get install {package}
Error in other languages:
ubuntu-cloudimg-query: bevel nie gevind nie
ubuntu-cloudimg-query: comandă negăsită
ubuntu-cloudimg-query: comando não encontrado
ubuntu-cloudimg-query: commande introuvable
ubuntu-cloudimg-query: command not found
ubuntu-cloudimg-query: käsku ei ole
ubuntu-cloudimg-query: không tìm thấy lệnh
ubuntu-cloudimg-query: komanda nerasta
ubuntu-cloudimg-query: Kommando nicht gefunden.
ubuntu-cloudimg-query: kommandot finns inte
ubuntu-cloudimg-query: komut yok
ubuntu-cloudimg-query: nie znaleziono polecenia
ubuntu-cloudimg-query: níor aimsíodh an t-ordú
ubuntu-cloudimg-query: no se encontró la orden
ubuntu-cloudimg-query: no s'ha trobat l'ordre
ubuntu-cloudimg-query: opdracht niet gevonden
ubuntu-cloudimg-query: parancs nem található
ubuntu-cloudimg-query: perintah tidak ditemukan
ubuntu-cloudimg-query: príkaz nenájdený
ubuntu-cloudimg-query: příkaz nenalezen
ubuntu-cloudimg-query: команда не найдена
ubuntu-cloudimg-query: командата не е открита
ubuntu-cloudimg-query: 命令找不到
ubuntu-cloudimg-query: コマンドが見つかりません