Wrong ownership of template saved from instance

When saving a powered off virtual machine as template using a regular user, the resulting template is saved with oneadmin:oneadmin ownership, making it invisible to the original user.

No errors are reported otherwise, the saving process runs fine.


Versions of the related components and OS (frontend, hypervisors, VMs):

OpenNebula 7.0.1

Steps to reproduce:

  1. Instantiate a VM as a user not member of oneadmin group.
  2. Power it off.
  3. Save it as a template.

Current results:

Template is saved with oneadmin:oneadmin ownership, resulting in an unusable template invisible to the original user.

oned.log output (the UID originating the request is not UID:0, is UID:670):

Tue Nov 25 12:09:47 2025 [Z0][ReM][D]: Req:7584 UID:0 IP:127.0.0.1 one.vm.info invoked , 10327, false
Tue Nov 25 12:09:47 2025 [Z0][ReM][D]: Req:7584 UID:0 one.vm.info result SUCCESS, "<VM><ID>10327</ID><U..."
Tue Nov 25 12:09:47 2025 [Z0][ReM][D]: Req:3312 UID:0 IP:127.0.0.1 one.template.clone invoked , 449, "Test", false
Tue Nov 25 12:09:47 2025 [Z0][ReM][D]: Req:3312 UID:0 one.template.clone result SUCCESS, 451
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:2768 UID:0 IP:127.0.0.1 one.vm.info invoked , 10327, false
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:2768 UID:0 one.vm.info result SUCCESS, "<VM><ID>10327</ID><U..."
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:6272 UID:0 IP:127.0.0.1 one.vm.disksaveas invoked , 10327, 0, "Test-disk-0", "", -1
Tue Nov 25 12:09:49 2025 [Z0][ImM][I]: Creating disk at default, size 512MB (format: save_as)
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:6272 UID:0 one.vm.disksaveas result SUCCESS, 397
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:3952 UID:0 IP:127.0.0.1 one.template.update invoked , 451, "CPU = 1
MEMORY = 256...", 1
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:3952 UID:0 one.template.update result SUCCESS, 451
Tue Nov 25 12:09:49 2025 [Z0][ImM][D]: Monitoring datastore default (1)
Tue Nov 25 12:09:49 2025 [Z0][ImM][D]: Datastore default (1) successfully monitored.
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:9808 UID:0 IP:127.0.0.1 one.vm.info invoked , 10327, false
Tue Nov 25 12:09:49 2025 [Z0][ReM][D]: Req:9808 UID:0 one.vm.info result SUCCESS, "<VM><ID>10327</ID><U..."
Tue Nov 25 12:09:50 2025 [Z0][TrM][I]: cpds: Copying /var/lib/one/datastores/0/10327/disk.0 to datastore as /var/lib/one/datastores/1/f01207032d22a8a616c3bfd3365d907b
Tue Nov 25 12:09:50 2025 [Z0][TrM][D]: Message received: TRANSFER SUCCESS 10327 -

Expected results:

Template with same owner and group as the user starting the action.

1 Like

Thank you for the detailed issue behaviour.

  • Can you please share the permissions of the original template before being saved by the user?
  • Did this happen with Fireedge (GUI), with the CLI or with both?

Thank you

Hello Bruno,

the original template has oneadmin:oneadmin ownership. It was saved from another one which had my user as owner and got changed to oneadmin. I hadn’t noticed until now as my user belongs to oneadmin group.

Just tried to clone from the CLI and it works fine, the machine is saved with the ownership of the user that launches the command.

Some screenshots:

Thank you for your help.

1 Like

Hello,

Actually, thank you for the accurate description of the error. A github issue has been opened

Kudos and thank you again!

Thank you Bruno, hope to see this solved soon.

Best regards.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.