Open SulimanLab opened 1 year ago
Hi,
I created new libvirt network using this file:
<network> <name>new-network</name> <forward mode='nat'> <nat> <port start='1024' end='65535'/> </nat> </forward> <bridge name='virbr011' stp='on' delay='0'/> <ip address='192.168.152.1' netmask='255.255.255.0'> <dhcp> <range start='192.168.152.2' end='192.168.152.254'/> </dhcp> </ip> </network>
and I added it to virt-lightning file:
- name: tmp distro: centos-8 networks: - network: new-network ipv4: 192.168.152.12 memory: 4028 vcpus: 4
Then I have noticed that I can't access the internet inside the vm, after some debugging I found that my host ip is not set in /etc/resolv.conf file
; Created by cloud-init on instance boot automatically, do not edit. ; # Generated by NetworkManager nameserver 192.168.122.1 nameserver 192.168.123.1
moreover, when I added new-network in ~/.config/virt-lightning/config.ini as default network
[main] network_name = new-network
it works fine.
It looks like the problem doesn't exist anymore with recent libvirt releases.
Hi @SulimanLab. Do you still gave the problem (I personally don't anymore)? Can I close this?
Hi,
I created new libvirt network using this file:
and I added it to virt-lightning file:
Then I have noticed that I can't access the internet inside the vm, after some debugging I found that my host ip is not set in /etc/resolv.conf file
moreover, when I added new-network in ~/.config/virt-lightning/config.ini as default network
it works fine.