Search VM by MAC has failed


The following error has appeared after running the search command:

$ onevm list --search MAC=00:1a:64:2b:c7:b0
[] Full text search is not supported by the SQL backend

MariaDB used as SQL backend:

$ mysql -V
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1

Could you help solve the problem?


Hello @gray380,

In order to be able to use the --search option you need you use a MySQL backed with version equal or higher than 5.6. As said in the docs

This is due to MySQL FTS indexes are not supported in previous MySQL versions.


In other words the real version shown after ‘Distrib’ (I belived it should be ‘Ver’).
So in my case I have version 5.5.60 wich is less then 5.6.

Thank you.

BTW, is it real to use mysql 5.6 under centos 7?

Okay, I’ve updated MariaDB version to:

mysql Ver 15.1 Distrib 10.4.6-MariaDB, for Linux (x86_64) using readline 5.1

And faced the internal error:

$ onevm list --search MAC=00:1a:64:2b:c7:b0
[] Internal error

Do I have to reindex DB or something else?
Something like this:

mysql> Alter table vm_pool ADD FULLTEXT (ETH0_MAC);

UPDATE: To turn on FTS run the following command:

MariaDB [opennebula]> alter table vm_pool add fulltext index ftidx (search_token);

As you said, after updating the DB it’s necessary to add the FTS index as it wasn’t added during DB bootstrapping.

I’ve open an issue for creating a command which make it easier ( .

Thanks for the feedback!

1 Like