def dhcp_server(create_if_not_found=true)
      return nil if interface_type != :host_only

      # Try to find the dhcp server in the list of DHCP servers.
      dhcp_name = "HostInterfaceNetworking-#{name}"
      result = parent.parent.dhcp_servers.find do |dhcp|
        dhcp.network_name == dhcp_name
      end

      # If no DHCP server is found, create one
      result = parent.parent.dhcp_servers.create(dhcp_name) if result.nil? && create_if_not_found
      result
    end
def dhcp_server(create_if_not_found=true)
      return nil if interface_type != :host_only

      # Try to find the dhcp server in the list of DHCP servers.
      dhcp_name = "HostInterfaceNetworking-#{name}"
      result = parent.parent.dhcp_servers.find do |dhcp|
        dhcp.network_name == dhcp_name
      end

      # If no DHCP server is found, create one
      result = parent.parent.dhcp_servers.create(dhcp_name) if result.nil? && create_if_not_found
      result
    end
Gets the DHCP server associated with the network interface. Only
 host only network interfaces have dhcp servers. If a DHCP server
 doesn't exist for this network interface, one will be created.