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:
- Instantiate a VM as a user not member of oneadmin group.
- Power it off.
- 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.