LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-26-2022, 05:37 PM   #46
Fearless Fred
Member
 
Registered: Jan 2022
Location: UK
Distribution: Mabox - Manjaro/Arch
Posts: 51

Rep: Reputation: 37

Taken from the KVM docs here...

https://wiki.debian.org/KVM#Libvirt_default_network



If you use libvirt to manage your VMs, libvirt provides a NATed bridged network named "default" that allows the host to communicate with the guests. This network is available only for the system domains (that is VMs created by root or using the qemu:///system connection URI). VMs using this network end up in 192.168.122.1/24 and DHCP is provided to them via dnsmasq. This network is not automatically started. To start it use:

virsh --connect=qemu:///system net-start default

To make the default network start automatically use:

virsh --connect=qemu:///system net-autostart default
 
Old 01-27-2022, 11:30 AM   #47
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Post

Hi Fred.

Code:
virsh --connect=qemu:///system net-start default
Code:
error: Failed to start network default
error: Requested operation is not valid: network is already active
Code:
virsh --connect=qemu:///system net-autostart default
Code:
Network default marked as autostarted
 
Old 01-27-2022, 08:54 PM   #48
Fearless Fred
Member
 
Registered: Jan 2022
Location: UK
Distribution: Mabox - Manjaro/Arch
Posts: 51

Rep: Reputation: 37
I would probably remove virt-manager, reboot, and then try installing it again, it sounds like something is amiss with it.. and at least then you know it should be 'default'
 
Old 01-28-2022, 08:49 AM   #49
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Thumbs up

Quote:
Originally Posted by Fearless Fred View Post
I would probably remove virt-manager, reboot, and then try installing it again, it sounds like something is amiss with it.. and at least then you know it should be 'default'
I did that. So far so good, this seems to be the solution.
 
Old 01-29-2022, 01:22 AM   #50
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
After starting the PC this morn, I tried virt-man again. The issue is back.
 
Old 01-31-2022, 06:45 AM   #51
Fearless Fred
Member
 
Registered: Jan 2022
Location: UK
Distribution: Mabox - Manjaro/Arch
Posts: 51

Rep: Reputation: 37
Launch virt-manager then highlight the VM and choose 'Edit -> Connection Details' next window make sure 'Autoconnect' is ticked, and on
'Virtual Networks' tab make sure 'Autostart on Boot' it ticked and the network is using NAT

I know I have actually set a different Network up than the default one created before to fix such issues;
Attached Thumbnails
Click image for larger version

Name:	net1.png
Views:	7
Size:	35.1 KB
ID:	38232   Click image for larger version

Name:	net2.png
Views:	10
Size:	44.1 KB
ID:	38233   Click image for larger version

Name:	net3.png
Views:	10
Size:	53.6 KB
ID:	38234  
 
Old 01-31-2022, 08:15 AM   #52
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Post

Hi FF. Here's what I see. I changed nothing. I don't see a virtnet option.
Attached Thumbnails
Click image for larger version

Name:	2022-01-31_14-14.png
Views:	7
Size:	26.0 KB
ID:	38235   Click image for larger version

Name:	2022-01-31_14-14_1.png
Views:	10
Size:	37.7 KB
ID:	38236  
 
Old 01-31-2022, 11:05 AM   #53
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
XML view after running the temporary fix of 'sudo adduser $USER libvirt && sudo reboot'.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2022-01-31_16-57-27.png
Views:	10
Size:	55.2 KB
ID:	38239  
 
Old 02-01-2022, 07:48 AM   #54
Fearless Fred
Member
 
Registered: Jan 2022
Location: UK
Distribution: Mabox - Manjaro/Arch
Posts: 51

Rep: Reputation: 37
VirtNet was the extra Network I created myself, and gave my own IP range... The 'Default' is the 192.168.122.0/24 network, and, like you are now finding, for me it didn't work reliably. I tried removing this default network, and setting it up again, but it didn't help as it always wanted to created the same subnet 192.168.122.0/24, so I just created a new network I called virtNet and gave it the subnet of 192.168.100.0/24 and use this one instead, and it 'just works' and is available as soon as the VM boots up.

Like yourself, I got fed up of having to 'fix' the default Network interface every time I wanted to use a VM..

virt-manager -> Edit -> Virtual Machine Details -> Add Hardware -> Network and then create a new NAT interface
 
Old 02-01-2022, 07:51 AM   #55
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Quote:
Originally Posted by Fearless Fred View Post
... virt-manager -> Edit -> Virtual Machine Details -> Add Hardware -> Network and then create a new NAT interface
Does it matter which device model I use - e.g. e1000?
 
Old 02-01-2022, 06:14 PM   #56
Fearless Fred
Member
 
Registered: Jan 2022
Location: UK
Distribution: Mabox - Manjaro/Arch
Posts: 51

Rep: Reputation: 37
I use virtio
 
1 members found this post helpful.
Old 02-06-2022, 09:45 AM   #57
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Quote:
Originally Posted by Fearless Fred View Post
I use virtio
Still no change.
 
Old 03-27-2022, 11:01 AM   #58
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 5,116

Original Poster
Rep: Reputation: 460Reputation: 460Reputation: 460Reputation: 460Reputation: 460
Post

Today, my internet connection to the house was on and off. I had ran the usual temp fix of 'sudo adduser $USER libvirt && sudo reboot' before the internet starting being sporadic. The VM had internet for a while then none (along with my host and all other devices in the house). When the home internet came back online - the internet on the VMs was gone but working again on the host.
 
  


Reply

Tags
internet, virt man, virt-man


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: How To Migrate Virtualbox VMs Into KVM VMs In Linux LXer Syndicated Linux News 0 07-10-2020 01:01 AM
[URGENT] Is 'virt-install' cannot generate isolated VMs using same existing qcow2 ? donghyun Kim Linux - Virtualization and Cloud 8 10-05-2014 12:51 PM
Virt manager won't start my VMs kkroopani Linux - Virtualization and Cloud 1 10-21-2012 12:53 AM
[Tcptraceroute/Traceroute/Ping] Windows VMs & Linux VMs BiFo Linux - Networking 0 08-24-2010 02:07 PM
LXer: Using Xen With LVM-Based VMs Instead Of Image-Based VMs (Debian Etch) LXer Syndicated Linux News 0 01-14-2009 08:20 PM

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

All times are GMT -5. The time now is 05:01 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