# Command to change Owner of VM Instance by opennebula CLI?

**URL:** <https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070>\
**Category:** Installation & Configuration\
**Created:** [October 26, 2021, 7:18pm UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070 "2021-10-26T19:18:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pragya.g](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@pragya.g](https://forum.opennebula.io/u/pragya.g)\
**Post date:** [October 26, 2021, 7:18pm UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/1 "2021-10-26T19:18:50Z")

</div>

Is there any way(command) to change VM OWNER of existing VM Instance through CLI?

---

<div class="post-metadata">

**Author:** ![pragya.g](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@pragya.g](https://forum.opennebula.io/u/pragya.g)\
**Post date:** [October 27, 2021, 6:08am UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/2 "2021-10-27T06:08:55Z")

</div>

@ahuertas @feldsam : Could you please help on above query?

---

<div class="post-metadata">

**Author:** ![feldsam](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/feldsam/32/4441_2.png) [@feldsam](https://forum.opennebula.io/u/feldsam)\
**Post date:** [October 27, 2021, 6:37am UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/3 "2021-10-27T06:37:53Z")

</div>

`man onevm`

---

<div class="post-metadata">

**Author:** ![pragya.g](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@pragya.g](https://forum.opennebula.io/u/pragya.g)\
**Post date:** [October 27, 2021, 7:18am UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/4 "2021-10-27T07:18:02Z")

</div>

Thank you @feldsam  
Following command worked for me:  
onevm chown vm\_id user\_id group\_id

---

<div class="post-metadata">

**Author:** ![pragya.g](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@pragya.g](https://forum.opennebula.io/u/pragya.g)\
**Post date:** [October 27, 2021, 7:32am UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/5 "2021-10-27T07:32:20Z")

</div>

Hi @feldsam @ahuertas : Could you please assist on following query as well:

We want to retrieve vm ids on the basis of certain filters(like user input value/tag value) by executing command ‘onevm list’(data can in any form like csv or json or tabular).

---

<div class="post-metadata">

**Author:** ![feldsam](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/feldsam/32/4441_2.png) [@feldsam](https://forum.opennebula.io/u/feldsam)\
**Post date:** [October 27, 2021, 7:34am UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/6 "2021-10-27T07:34:21Z")

</div>

Don’t be lazy and read `onevm` command manual. There are several options, for filtering and also for output format

---

<div class="post-metadata">

**Author:** ![pragya.g](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@pragya.g](https://forum.opennebula.io/u/pragya.g)\
**Post date:** [October 27, 2021, 7:57am UTC](https://forum.opennebula.io/t/command-to-change-owner-of-vm-instance-by-opennebula-cli/10070/7 "2021-10-27T07:57:20Z")

</div>

1. We tried mutiple combinations with commands ‘onevm list --filter column=value’ and ‘onevm list --list column’ for tabular data but these commands can apply filter on certain predefined columns(image attached for reference, only on these column filters can be applied), while we want to apply filter on the basis of user input/tag value  

2. Also we tried to retrieve data in csv/json format with command ‘onevm list --x/–j’, But unable to apply filter for csv/json to get the requied data as ‘–filter column=value’ does not work for csv/json

Could you please suggest something similar to ‘–filter column=value’ that can work with custome attributes/ user inputs.

@feldsam
