# Search VM by MAC has failed

**URL:** <https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462>\
**Category:** Installation & Configuration\
**Created:** [July 18, 2019, 12:40pm UTC](https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462 "2019-07-18T12:40:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gray380](https://avatars.discourse-cdn.com/v4/letter/g/7993a0/32.png) [@gray380](https://forum.opennebula.io/u/gray380)\
**Post date:** [July 18, 2019, 12:40pm UTC](https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462/1 "2019-07-18T12:40:34Z")

</div>

Hi,

The following error has appeared after running the search command:

> $ onevm list --search MAC=00:1a:64:2b:c7:b0  
> [one.vmpool.info] 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?

brg.,  
Serhiy.

---

<div class="post-metadata">

**Author:** ![cgonzalez](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cgonzalez/32/7096_2.png) [@cgonzalez](https://forum.opennebula.io/u/cgonzalez)\
**Post date:** [July 18, 2019, 12:48pm UTC](https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462/2 "2019-07-18T12:48:55Z")

</div>

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 [http://docs.opennebula.org/5.8/operation/vm\_management/vm\_instances.html?highlight=search#searching-vm-instances](http://docs.opennebula.org/5.8/operation/vm_management/vm_instances.html?highlight=search#searching-vm-instances)

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

---

<div class="post-metadata">

**Author:** ![gray380](https://avatars.discourse-cdn.com/v4/letter/g/7993a0/32.png) [@gray380](https://forum.opennebula.io/u/gray380)\
**Post date:** [July 18, 2019, 1:14pm UTC](https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462/3 "2019-07-18T13:14:20Z")

</div>

Hi,

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?

---

<div class="post-metadata">

**Author:** ![gray380](https://avatars.discourse-cdn.com/v4/letter/g/7993a0/32.png) [@gray380](https://forum.opennebula.io/u/gray380)\
**Post date:** [July 19, 2019, 6:56am UTC](https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462/4 "2019-07-19T06:56:05Z")

</div>

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  
> [one.vmpool.info] 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);

---

<div class="post-metadata">

**Author:** ![cgonzalez](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cgonzalez/32/7096_2.png) [@cgonzalez](https://forum.opennebula.io/u/cgonzalez)\
**Post date:** [July 19, 2019, 8:48am UTC](https://forum.opennebula.io/t/search-vm-by-mac-has-failed/7462/5 "2019-07-19T08:48:56Z")

</div>

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 ([https://github.com/OpenNebula/one/issues/3530](https://github.com/OpenNebula/one/issues/3530)) .

Thanks for the feedback!
