vmware / open-vmdk

Apache License 2.0
113 stars 46 forks source link

add OVF configurations #27

Closed oliverkurth closed 1 year ago

oliverkurth commented 1 year ago

Support OVF Configurations.

The OVF format supports different configurations, which can be selected at deployment time.

Example to define configurations:

configurations:
    tall:
        label: Tall
        description: too little for the money
    grande:
        default: true
        label: Grande
        description: just right
    venti:
        label: Venti
        description: too much

These can be used in the hardware section. In this example, the hard disk will only be created for the venti configuration:

hardware
...
    homedisk:
        type: hard_disk
        configuration: venti
        parent: sata1
        disk_capacity: 500000

To set values for the number of CPUs and amount of memory, the special keywords for the hardware cpus and memory cannot be used for different configurations because the keys need to be unique. To set different values, use the same syntax as for the other hardware items, with type set to cpus or memory, and the number of CPUs with the field number and size for memory:

hardware:
...
    cpus_tall:
        configuration: tall
        type: cpus
        number: 1
    memory_tall:
        configuration: tall
        type: memory
        size: 1048

The default configuration can be set in the system section:

system:
...
    default_configuration: grande