Which service is the creator of the "vm.xml" file?

Which service is the creator of the “vm.xml” file in “/var/lib/one/datastores/<ds_id>//vm.xml” on the host?
I’m trying to identify how “ON” generates this file, because the PCI BUS identification seems automatic to me, it ignores the PCI settings manually entered in the template.

In the deployment.1 file, there is nothing relevant.

The vm.xml file is generated by VMM_MAD when the VM is deployed on the host. It contains the VM metadata for the given VM at the time of the deployment.

Could you elaborate a bit more?
What you are observing, what is expected, what in the deployment file is not relevant to the vm.xml file?
What PCI settings and in what VM Template? Because I find the “VM Template” naming in OpenNebula confusing. In short - the “VM Template” like “the template used to instantiate a VM” or “the template containing the VM metadata” based on the former template?

Best Regards,
Anton Todorov

The vm.xml file is generated by VMM_MAD when the VM is deployed on the host. It contains the VM metadata for the given VM at the time of the deployment.

Thanks, i guess the script is “vmm/kvm/opennebula_vm.rb”, ill analyze it

Could you elaborate a bit more?

Of course,

Basically, my problem is still the same as in an old post here:

I have an A16, which has a “modus-operandi” similar to the GRID K* series, but with 4 different GPUs and 4 profile combinations.
For some reason I can only use a different gpu if I specify SHORT_ADDRESS
Otherwise, it always uses any randomly available one (after another procedure indicated here), starting from the first processing unit (BUS=3f). Before that, only the first processing unit was used, the others were idle because when the limit was reached, it was not possible to deploy another VM with GPU.

My goal is that I can have different templates with different vGPU profiles, instead of just deploying templates with or without vGPU