LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 03-25-2024, 11:35 AM   #1
L-28C
Member
 
Registered: Oct 2006
Posts: 38

Rep: Reputation: 0
[KVM] Guest network connection irreparably dies if the host is disconnected


Every time I disconnect my host from the Internet, all of my virtual machines lose network access permanently until I reboot the host. This happens on Linux (tested various distros) and Windows guests. Is there a workaround for this? As a last resort I could live with having to reboot the guests, but rebooting the host is overkill. Any kind of forced reboot gives me PTSD flashbacks of my Windows days.

I'm running KVM/QEMU/virt-manager on MX Linux 21.3
 
Old 03-27-2024, 02:07 PM   #2
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 777

Rep: Reputation: 243Reputation: 243Reputation: 243
Vaguely, it has to do with your network topography and how you set it up. The problem I had was disconnecting a guest caused the host to lose its external IP4 address. Now I keep the guests on their bridge and the external interface separate. I don't know if you're using netplan or network manager or scripts because I'm not familiar with MX Linux, but there's a way to do it. Yes, reboot is overkill and unneeded.
 
Old 03-28-2024, 08:05 AM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,516

Rep: Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492Reputation: 2492
What network settings do you have on KVM? Do you understand the difference in the various settings, particularly between NAT and bridged?
 
Old 04-08-2024, 06:28 PM   #4
L-28C
Member
 
Registered: Oct 2006
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jayjwa View Post
Vaguely, it has to do with your network topography and how you set it up. The problem I had was disconnecting a guest caused the host to lose its external IP4 address. Now I keep the guests on their bridge and the external interface separate. I don't know if you're using netplan or network manager or scripts because I'm not familiar with MX Linux, but there's a way to do it. Yes, reboot is overkill and unneeded.
Pretty sure it's just Network Manager doing everything network wise

Quote:
Originally Posted by yancek View Post
What network settings do you have on KVM? Do you understand the difference in the various settings, particularly between NAT and bridged?
I'm using "Virtual network (default)" as the NIC in virt-manager, which gives VMs IPs in the range 192.168.122.x which is fine with me. I'd rather keep it that way because I'm sure a couple of my VMs will break if I change it (specially those that need port forwarding) but I'll fiddle with the other options if there's no other way to fix it as it is. I don't really understand how they differ exactly, no

Last edited by L-28C; 04-08-2024 at 06:33 PM.
 
Old 04-15-2024, 10:10 PM   #5
L-28C
Member
 
Registered: Oct 2006
Posts: 38

Original Poster
Rep: Reputation: 0
I figured it out on my own guys!! This is all I have to do to restore networking to my guests:

```
ip addr add 192.168.122.1/24 dev virbr0
ip link set virbr0 up
```
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel-based Virtual Machine (KVM): Switching from KVM guest to host (e.g. Linux Mint) & maximize guest screen fanoflq Linux - Newbie 2 07-13-2016 06:10 PM
Presenting logical volume from host to KVM guest. Partition within guest? batfastad Linux - Server 2 07-27-2015 03:53 PM
Redirect logs from KVM guest to KVM host essential1 Linux - Virtualization and Cloud 2 10-08-2013 03:29 PM
data push from box to removable usb drive dies, then dies, then dies again. bodyofabanshee Linux - Server 11 03-15-2012 11:34 AM
Guest to Host message passing - guest's memory usage statistics & guest's IP address Prince_Pangeni Linux - Virtualization and Cloud 2 03-03-2012 03:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration