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

YAGA

Renowned Member
Feb 15, 2016
76
8
73
58
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:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!