0

I need to make an ova file with a clean Centos Stream 8 system that will ask the user for an IP address during import and then set this address inside the VM.

From the information I've found so far, I've managed to edit the ovf file and add this code to it:

<!-- IP ASSIGNMENT SECTION -->
  <vmw:IpAssignmentSection ovf:required="false" vmw:protocols="IPv4" vmw:schemes="">
    <Info>Supported IP assignment schemes</Info>
  </vmw:IpAssignmentSection>
<!-- END -->
  <VirtualSystem ovf:id="vm">
    <Info>A virtual machine</Info>
    <Name>CentOS8</Name>
<!-- EULA -->
    <EulaSection>
      <Info>End User License Agreement</Info>
      <License>
        TEST
      </License>
    </EulaSection>
<!-- END EULA -->
<!-- PRODUCT SECTION -->
    <ProductSection ovf:class="vami" ovf:instance="vm" ovf:required="false">
      <Info>VAMI Properties</Info>
      <Category>Networking Properties</Category>
      <Property ovf:key="gateway" ovf:type="string" ovf:userConfigurable="true">
        <Label>Default Gateway</Label>
        <Description>The default gateway address for this VM. Leave blank if DHCP is desired.</Description>
      </Property>
      <Property ovf:key="DNS" ovf:type="string" ovf:userConfigurable="true">
        <Label>DNS</Label>
        <Description>The domain name servers for this VM (comma separated). Leave blank if DHCP is desired.</Description>
      </Property>
      <Property ovf:key="ip0" ovf:type="string" ovf:userConfigurable="true">
        <Label>Network 1 IP Address</Label>
        <Description>The IP address for this interface. Leave blank if DHCP is desired.</Description>
      </Property>
      <Property ovf:key="netmask0" ovf:type="string" ovf:userConfigurable="true">
        <Label>Network 1 Netmask</Label>
        <Description>The netmask or prefix for this interface. Leave blank if DHCP is desired.</Description>
      </Property>
    </ProductSection>
  <!-- END -->

When I import the ova file edited in this way I have the option to enter the IP address but I don't know how to apply this information inside the VM.

import of the edited file

Does anyone know how i can set automatically this static IP address inside the imported VM?

0 Answers0