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

**URL:** <https://forum.opennebula.io/t/which-service-is-the-creator-of-the-vm-xml-file/12107>\
**Category:** Product Support\
**Created:** [May 9, 2024, 12:52pm UTC](https://forum.opennebula.io/t/which-service-is-the-creator-of-the-vm-xml-file/12107 "2024-05-09T12:52:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsoliveira](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dsoliveira/32/7965_2.png) [@dsoliveira](https://forum.opennebula.io/u/dsoliveira)\
**Post date:** [May 9, 2024, 12:52pm UTC](https://forum.opennebula.io/t/which-service-is-the-creator-of-the-vm-xml-file/12107/1 "2024-05-09T12:52:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [May 10, 2024, 8:16am UTC](https://forum.opennebula.io/t/which-service-is-the-creator-of-the-vm-xml-file/12107/2 "2024-05-10T08:16:46Z")

</div>

> [@dsoliveira](#):
>
> Which service is the creator of the “vm.xml” file in “/var/lib/one/datastores/\<ds\_id\>[//vm.xml](https://vm.xml)” on the host?

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.

> [@dsoliveira](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![dsoliveira](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dsoliveira/32/7965_2.png) [@dsoliveira](https://forum.opennebula.io/u/dsoliveira)\
**Post date:** [May 10, 2024, 1:23pm UTC](https://forum.opennebula.io/t/which-service-is-the-creator-of-the-vm-xml-file/12107/3 "2024-05-10T13:23:02Z")

</div>

> 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:

> [@VGPU support with multiple physical GPU on same board](https://forum.opennebula.io/t/vgpu-support-with-multiple-physical-gpu-on-same-board/11829/):
>
> I recently implemented ON with an Nvidia A16-64GB, this card has 4 physical GPUs I can configure VMs normally with VGPU, however, they only work on the same BUS Using onehost show (id) I can see them all correctly: 3f:0\* 41:0\* 43:0\* 45:0\* However, when instantiating a new VM, only BUS 3f:0\* is used, if I change the template with the parameter: PCI = [BUS = “43”,… …] as in the example above, I receive the following error message: DEPLOY: /var/tmp/one/vgpu: line 85: echo: write error:…

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
