Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    way to export VM with eth 0 enabled

    hello everyone,
    what i m trying to do is:
    create a VM and export it as .ova file so that other developer can use it. when i do that, the exported VM will automatically configure it's network and set it to run on "auto eth1". i need to configure the ipaddress, domain and other things for the new VMs. but i cannot run eth0, it gives error and i cannot find files related to eth1.

    this is the error for eth0:
    ifup eth0
    Error: No suitable device found: no device found for connection 'System eth0'.

    i checked /etc/sysconfig/network-scripts/ .. there is ifcfg-eth0 file but no file related to eth1.

    i need help to either export .ova file that won't change its network config.... else a way / sample script to change the network configuration for eth1.

    btw: i use CentOS, and VMware workstation

    thank you

  2. #2
    Linux Engineer
    Join Date
    Jan 2005
    Saint Paul, MN
    Changes are that udev runs were left in place (because you did not remove them prior to exporting) and the new virtual machine was given a different MAC address. The file:
    maps the MAC address to a device name. Delete this file and reboot the VM.

  3. #3
    so, before i export the VM, if i delete that file and export it, will the new VM has eth0 activated?

  4. $spacer_open
  5. #4
    Linux Engineer
    Join Date
    Jan 2005
    Saint Paul, MN
    Yes, login and delete the file. Shutdown the machine and then export the appliance. Other concerns relate to ssh (if you started the server, it has host keys that need to be deleted as well) and dhcp (this is not a normal problem but there is a lease file that will allow it to ask for the same IP address that it currently has when rebooted).

    For ssh the files would be in /etc/ssh
    rm /etc/ssh/*_key /etc/ssh/*
    For dhcpcd the files are in /var/lib/dhcpcd/
    rm /var/lib/dhcpcd/dhcpcd-*.lease
    I believe that dhclient location are configured, so you would have to look at them.

    Also if you are using thin provisioning for the drive, do not do much that writes to the drive as deleting it does not reduce the space consumed (i.e. the drive size has been expanded) and will be included in the exported appliance.

    The "/etc/udev/rules.d/70-persistent-net.rules" maps a MAC address and the NIC device name. When a new MAC address is presented it gets a new device name (such as eth1, eth2, etc).
    Last edited by alf55; 02-21-2013 at 02:25 AM. Reason: added comment about mapping MAC and device name

  6. #5
    thank you alf55 for quick responses. i will try to follow this instruction.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts