subuk / vmango

Your own personal IaaS cloud
https://vmango.org
MIT License
329 stars 55 forks source link

IP of the VM is not listed #47

Closed arafath-mk closed 5 years ago

arafath-mk commented 5 years ago

Latest version of vamango is installed in CentOS 7.6 using the following commands.

yum install -y yum-plugin-copr && yum copr -y enable subuk/vmango
yum install -y vmango
systemctl enable --now vmango

A new VM was created from CentOS-7-x86_64-GenericCloud-1901.qcow2. The IP of the VM was not listed in the vamango web page. virsh net-dhcp-leases vmango command showed the IP address correctly. After rebooting the VM, the IP was shown properly in the vmango web page too.

subuk commented 5 years ago

I think that's because in 0.9.1 ip addresses are fetched from host arp cache https://github.com/subuk/vmango/blob/v0.9.1/libvirt/virtual_machine_repository.go#L222

Next version will fetch it from qemu guest agent or libvirt network lease https://github.com/subuk/vmango/blob/master/libvirt/virtual_machine_repository.go#L222