G
G
grabbee2016-10-26 12:30:41
Computer networks
grabbee, 2016-10-26 12:30:41

How to change the network configuration of a kvm virtual machine?

I'm trying to set up libvirt virtual machines via Ansible. If I need to change the IP of the machine (and with it the MAC, as I understand it) - then I can change the mac address through virsh define xml - but what about the IP address?
The IP is static, it is now registered in /etc/network/interfaces of the virtual machine. I can't directly edit it from the host, right? It is possible to go to the VM console (virsh console) - but I can’t do this from Ansible, if it is already / not yet accessible from the outside via SSH via the old IP, and I don’t know such a module / plugin for Ansible to go into virtual machines through the host machine. How then do all sorts of web panels like ISP work, everything changes automatically there ..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dyasny, 2016-11-03
@dyasny

1. why change poppy? If you need to change the IP, then you need to change exactly the IP, at least ansible with your hands, but in any case on the VM itself and not on the host.
2. changing the poppy in order to change the IP makes sense only when the machine uses DHCP and specific IP addresses are reserved for pre-known MACs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question