Author Topic: Virtual Machine in Zentyal 2.2 - Network problem for guest os  (Read 1978 times)

Pascal

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Hi, I have installed ubuntu 10.04 like a guest os in Zentyal Virtual Machine Manager. Everything works good, except network adapter in guest os. Each time I reboot the guest os the network adapter change like eth0, eth1, eth2, etc... end the mac address change too. So each time I need to go in the network interface to change manually the eth number, after that i restart networking service and i get connection back. So I would like to know if it's possible to fix this problem? thanks

jonne_jvl

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Virtual Machine in Zentyal 2.2 - Network problem for guest os
« Reply #1 on: March 26, 2012, 01:18:02 pm »
Ive had similar problems but with real servers. Basically the kernel remembers what ethX goes to which card by the cards mac address. If for some reason the mac address changes between reboots, it will interpret your card as a new card on each boot
and create a new ethX name.

This is saved, on ubuntu anyway, in
/etc/udev/rules.d/70-persistent-net.rules



You can either delete this file on each reboot or set it up so that it identifies it by something else than the mac address.

(see last post)
http://www.linuxquestions.org/questions/linux-hardware-18/udev-eth-mapping-consistency-%5Bfc9%5D-643558


Or figure out why the mac address changes and make it stop. I couldnt because the hardware had a fixed mac address that the kernel considered illegal, so in dmesg I had an entry where it said that it gave the card a new randomised valid mac addr.


Javier Amor Garcia

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1225
  • Karma: +12/-0
    • View Profile
Re: Virtual Machine in Zentyal 2.2 - Network problem for guest os
« Reply #2 on: March 27, 2012, 12:37:56 pm »
This  a bug that makes the MAC to change in each VM boot.

It is solved in its ticket:

http://trac.zentyal.org/ticket/4023

The workaround until the fix is published:

Quote
As for your installation, you can workaround the issue editing the file /etc/zentyal/virt.conf, setting in it the key 'custom_mac_addresses' to yes and restarting the web interface with 'sudo /etc/init.d/zentyal apache restart;. This will allow you to specify MAC addresses for the interfaces of you VMs.