On Fri, Apr 24, 2026 at 19:23:25 +0530, Surya Gupta via Devel wrote:
> Some VMware guests specify NVRAM storage using the 'nvram' parameter.
> If found, parse it and store it in the domain's os.loader.nvram field,
> which gets formatted as:
> 
>   <os>
>     <type arch='x86_64'>hvm</type>
>     <nvram>[datastore] directory/dokuwiki.nvram</nvram>
>   </os>
> 
> The NVRAM path uses the same transformation functions as disk paths
> (ctx->parseFileName and ctx->formatFileName) to ensure consistent
> handling of datastore-qualified paths.
> The NVRAM is stored as a virStorageSource with type VIR_STORAGE_TYPE_FILE
> to ensure compatibility with libvirt's existing firmware handling
> infrastructure.
> 
> Signed-off-by: Surya Gupta <[email protected]>
> ---
>  src/vmx/vmx.c                            | 27 ++++++++++++++++++++++++
>  tests/vmx2xmldata/case-insensitive-1.xml |  1 +
>  tests/vmx2xmldata/case-insensitive-2.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-1.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-10.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-11.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-12.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-13.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-14.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-15.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-16.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-17.xml |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-2.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-3.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-4.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-5.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-6.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-7.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-8.xml  |  1 +
>  tests/vmx2xmldata/esx-in-the-wild-9.xml  |  1 +
>  tests/vmx2xmldata/gsx-in-the-wild-1.xml  |  1 +
>  tests/vmx2xmldata/gsx-in-the-wild-2.xml  |  1 +
>  tests/vmx2xmldata/gsx-in-the-wild-3.xml  |  1 +
>  tests/vmx2xmldata/gsx-in-the-wild-4.xml  |  1 +

You didn't run the test suite [1]with this commit. 'virschematest' is
broken ...


> diff --git a/tests/vmx2xmldata/esx-in-the-wild-3.xml 
> b/tests/vmx2xmldata/esx-in-the-wild-3.xml
> index cbe8eceb37..29c63d8d6b 100644
> --- a/tests/vmx2xmldata/esx-in-the-wild-3.xml
> +++ b/tests/vmx2xmldata/esx-in-the-wild-3.xml
> @@ -6,6 +6,7 @@
>    <vcpu placement='static' cpuset='0,3-5'>2</vcpu>
>    <os>
>      <type arch='x86_64'>hvm</type>
> +    <nvram>[datastore] directory/Debian2.nvram</nvram>
>    </os>
>    <clock offset='utc'/>
>    <on_poweroff>destroy</on_poweroff>

... as the 'vmware' syntax for nvram is not allowed in the schema.
Following hunk needs to be added:

diff --git a/src/conf/schemas/domaincommon.rng 
b/src/conf/schemas/domaincommon.rng
index c7f442a4c1..8c03e14d37 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -454,6 +454,9 @@
           <group>
             <ref name="diskSource"/>
           </group>
+          <group>
+            <ref name="vmwarePath"/>
+          </group>
         </choice>
       </optional>
     </element>

With that:

Reviewed-by: Peter Krempa <[email protected]>


I'll push the patch with the modification after the freeze is over. Make
sure to run all tests for any further patch you post.


[1]: https://www.libvirt.org/testing.html#unit-tests

Reply via email to