The testinglinux xml which is for custom setting for ip4
<ConfigRoot>
<_type>vim.CustomizationSpecItem</_type>
<info>
<_type>vim.CustomizationSpecInfo</_type>
<changeVersion>1576429981</changeVersion>
<description/>
<lastUpdateTime>2019-12-15T17:13:01Z</lastUpdateTime>
<name>Testinglinux</name>
<type>Linux</type>
</info>
<spec>
<_type>vim.vm.customization.Specification</_type>
<globalIPSettings>
<_type>vim.vm.customization.GlobalIPSettings</_type>
</globalIPSettings>
<identity>
<_type>vim.vm.customization.LinuxPrep</_type>
<domain>test.local</domain>
<hostName>
<_type>vim.vm.customization.VirtualMachineNameGenerator</_type>
</hostName>
<hwClockUTC>false</hwClockUTC>
<timeZone>Europe/Budapest</timeZone>
</identity>
<nicSettingMap>
<_length>1</_length>
<_type>vim.vm.customization.AdapterMapping[]</_type>
<e id="0">
<_type>vim.vm.customization.AdapterMapping</_type>
<adapter>
<_type>vim.vm.customization.IPSettings</_type>
<gateway>
<_length>1</_length>
<_type>string[]</_type>
<e id="0">172.25.8.1</e>
</gateway>
<ip>
<_type>vim.vm.customization.FixedIp</_type>
<ipAddress>127.0.0.1</ipAddress>
</ip>
<subnetMask>255.255.248.0</subnetMask>
</adapter>
</e>
</nicSettingMap>
<options>
<_type>vim.vm.customization.LinuxOptions</_type>
</options>
</spec>
</ConfigRoot>
The Centos xml which currently set to "Prompt the user for an IPv4 address when the specification is used"
<ConfigRoot>
<_type>vim.CustomizationSpecItem</_type>
<info>
<_type>vim.CustomizationSpecInfo</_type>
<changeVersion>1576430632</changeVersion>
<description>CentOS network cutomizations for deployment</description>
<lastUpdateTime>2019-12-15T17:23:52Z</lastUpdateTime>
<name>CentOS</name>
<type>Linux</type>
</info>
<spec>
<_type>vim.vm.customization.Specification</_type>
<globalIPSettings>
<_type>vim.vm.customization.GlobalIPSettings</_type>
</globalIPSettings>
<identity>
<_type>vim.vm.customization.LinuxPrep</_type>
<domain>test.local</domain>
<hostName>
<_type>vim.vm.customization.VirtualMachineNameGenerator</_type>
</hostName>
<hwClockUTC>false</hwClockUTC>
<timeZone>Europe/Budapest</timeZone>
</identity>
<nicSettingMap>
<_length>1</_length>
<_type>vim.vm.customization.AdapterMapping[]</_type>
<e id="0">
<_type>vim.vm.customization.AdapterMapping</_type>
<adapter>
<_type>vim.vm.customization.IPSettings</_type>
<gateway>
<_length>1</_length>
<_type>string[]</_type>
<e id="0">172.25.8.1</e>
</gateway>
<ip>
<_type>vim.vm.customization.UnknownIpGenerator</_type>
</ip>
<subnetMask>255.255.248.0</subnetMask>
</adapter>
</e>
</nicSettingMap>
<options>
<_type>vim.vm.customization.LinuxOptions</_type>
</options>
</spec>
</ConfigRoot>
Probably I can generate xmls which I import and use it then delete and so on but it is very nasty.
Maybe my approach is not the best and there is another way to do this from cli ?