Issue : got two IP addresses instead one IP on VM eth0 with Cloud-init

YAGA

Renowned Member
Feb 15, 2016
76
8
73
59
Hello,

I'm using CLI commands (qm create..., qm importdisk..., qm set...) from server to create a VM with Cloud-Init (debian-10.2.0-openstack-amd64.qcow2), everything works properly but I got two IP addresses instead one IP on VM eth0 with Cloud-init.

I use these commands for the network and qemu guest-agent:
qm set "my_id" --net0 virtio,bridge=vmbr0
qm set "my_id" --agent 1
qm set "my_id" --ipconfig0 ip=192.168.1.100,gw=192.168.1.1
qm set "my_id" --net0 model=virtio,bridge=vmbr0

guest-agent is enabled
guest-agent is installed on the VM

When the VM is started, the VM got two IP adresses one is 192.168.1.100 and the second one (192.168.1.x) is obtained from my DHCP server.

How to allow only one IP address (192.168.1.100) and avoid the second address obtained from DHCP?

Many thanks for your help,

Any advice and suggestions would be greatly appreciated.

Regards,
YAGA
 

Attachments

  • 1585828044969.png
    1585828044969.png
    1.1 KB · Views: 13
hi,

How to allow only one IP address (192.168.1.100) and avoid the second address obtained from DHCP?

disable the DHCP service in your VM
 
it was just a guess, check in your VM using systemctl
 
I'm having a similar issue. What will be the solutions for only want single IP
 
Last edited: