virtualizationkvmvirshvirtual-network

Virt-manager gives out only one ip for guests. Steals the IP from previous guest


I'm completely new to KVM and virt-manager.

I tried to have multiple Ubuntu 18.04.3 VM's. In the end they should be accessed from the hosts network. If I'm right I need a routed network setup to achieve this. But I have a different problem before that. I installed the first VM with the virt-manager GUI and then cloned every other VM with

virt-clone --original ubuntu18.04 --name clu0 --auto-clone

If I now start e.g. clu0 it will get assigned an IP. But if I start clu1, clu1 will get an own IP and clu0 will lose it's IP. I even tried to give out static IP's in the network config

virsh net-edit default

Where default is the network in question. The VM's even get asigned there defined IP's but still only one VM has it at any given time. I'm a bit overwhelmed by the options. I tried to change the network to a routed network but that didn't helped or I did it wrong.

How do I assign every VM it's IP?

Vg


Solution

  • Found it by help of a colleague. All clones had the same machine-id. I just cleared the file

    /etc/machine-id
    

    That's it.

    Vg