2

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

obvg
  • 129
  • 12

1 Answers1

4

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

obvg
  • 129
  • 12
  • On the physical computer? – Maf Sep 09 '21 at 16:08
  • No, on the VM's. It's quite some time, but if I remember right I just cloned the VM's. So they all hat the same machine id which confused libvirt. – obvg Sep 15 '21 at 09:40
  • I checked and my problem was different because my VMs had different IDs from the beginning. My problem was related to the virtual gateway (its DHCP) somehow. I had to reset it. – Maf Sep 15 '21 at 15:05