LinuxQuestions.org
Help answer threads with 0 replies.
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 06-02-2014, 09:37 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Rep: Reputation: 54
Is there an easier way to do bridged networking with KVM?


Every other VM solution I've used never required to screw around with network configuration to create virtual interfaces, or having to restart the service or reboot, but everything I read seems to lead to having to edit the interfaces file and restarting networking.

Is there not a better way to do this? Why can't I just bridge directly to the eth0.3/bond0.3 etc interfaces? (where 3 is vlan id). Is there something I'm missing?

Also when they say "use virtio" what exactly do they mean? What do I do to use that? I feel like all the documentation I read makes too many assumptions about existing knowledge. I can't seem to find anything that starts from the beginning.

Currently to add vlans I just use "vconfig add bond0 3" where 3 is vlan 3. I don't use the interface script because that requires a network restart, which is unacceptable on a production machine. I have a startup script that also executes all these to add vlans. If I later on want to add another vlan then I just edit that script, but I can also issue the command.

Is there a way to do this with bridging, or a way to just bridge directly to the actual vlan interface instead of having to create two interfaces per vlan?

I also read a lot about xml files, where am I suppose to create these?

Last edited by Red Squirrel; 06-02-2014 at 09:50 PM.
 
Old 06-02-2014, 10:30 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

the short answer is yes. Longer answer is that you can use lib-virt, and virt-manager to easily set this up once and forget about it. How to install these depends on your OS.

Evo2.
 
Old 06-02-2014, 10:37 PM   #3
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Using Debian. I saw the option in virt-manager but everything is grayed out, can't select any of the vlan interfaces.
 
Old 06-02-2014, 11:00 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

in the "Virtual Networks" tab click on the "+" to add a new network and then you should be walked through setting up a new network however you like.

Alternatively you can use the virsh on the command line to create, modify, start, stop, etc networks. See the man page or online documentation for details.

Evo2.
 
Old 06-02-2014, 11:12 PM   #5
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
I was trying to figure out how to use vish but it wants a xml file to create a network, I have no idea what that file is, how or where I create it. Nothing seems to explain that.
 
Old 06-02-2014, 11:38 PM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by Red Squirrel View Post
I was trying to figure out how to use vish but it wants a xml file to create a network, I have no idea what that file is, how or where I create it. Nothing seems to explain that.
You can create it using virt-manager as explained above. Then if you need to tweak some seetings you can use virsh. For example if you have a network called "default", you can modify it with:
Code:
virsh net-edit default
You'll need to read the documentation if you want to use virsh.

Evo2.
 
Old 06-03-2014, 12:20 AM   #7
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Do you have any documentation I should start with? I'm having trouble finding something that's targeted at someone who has never used it before. I'm also really confused about all the different tools/systems used. There's qemu, kvm, libvirt, virt-manager, virtsh etc... just not sure what I'm suppose to use and what not, so even googling for documentation is hard as I'm not even sure what I should be searching for.
 
Old 06-03-2014, 12:40 AM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

Quote:
Originally Posted by Red Squirrel View Post
Do you have any documentation I should start with? I'm having trouble finding something that's targeted at someone who has never used it before. I'm also really confused about all the different tools/systems used. There's qemu, kvm, libvirt, virt-manager, virtsh etc... just not sure what I'm suppose to use and what not, so even googling for documentation is hard as I'm not even sure what I should be searching for.
libvirt is a set of libraries/tools for managing virtual machines. It can be used to manage kvm and others. Roughly speaking, virt-manager is a graphical front end for using libvirt and virsh is a commandline front end for using libvirt. Perhaps https://wiki.debian.org/libvirt is reasonable place to start.

Evo2.
 
Old 06-04-2014, 03:49 PM   #9
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
If you have libvirt installed on your machine, there is a very nice, version specific documentation library in your docs directory. On my Slackware install the index page for it is file:///usr/doc/libvirt-1.0.3/html/index.html.
Evo is exactly correct with the reference but when I first started digging into libvirt I created confusion for myself looking at some documentation that didn't refer to my particular version.
Libvirt seems to be under extremely heavy development releasing version 1.2.5 just the other day.

Last edited by dijetlo; 06-04-2014 at 03:52 PM.
 
Old 06-04-2014, 05:23 PM   #10
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
I decided to give up and go ESXi. Installing it now. Maybe once libvirt/kvm/qemu etc is more mature and has a more unified management system I will reconsider it. There is just too much involved to do simple things that are normally a mouse click away in any other hypervisor. I don't know why Linux devs always make things more complicated than they have to be. I think that is the biggest thing that keeps people away from Linux. Nothing is plug and play, you always have to read tons of documentations and do tons of stuff manually.
 
Old 06-04-2014, 05:40 PM   #11
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Here's about 30 3rd party management tools that work with QEMU-KVM. Many of them web based so their as graphical as any other GUI.
That said, they have an extremely well developed commandline interface (I thinks so anyway)
One of the things I really prefer about QEMU-KVM is they seem to work on developing functionality instead of interface. They leave that to the user, which makes sense in the environment they're working in.

Last edited by dijetlo; 06-04-2014 at 05:43 PM.
 
Old 06-04-2014, 06:11 PM   #12
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Wow did not know there was that many management interfaces, I googled but did not find much. Once I migrate everything over from my old server I can maybe experiment more on the old server when I get the chance.

I'm already setting up VMs and everything in vmware now so probably going to stick with that, but I will still need a fallback plan in case they stop making it free, and eventually if I add multiple servers I will want to be able to do live migrations and stuff. Though another issue with kvm is having to shut down the vm just to do a trivial change like changing the cd though, unless some of those tools fix that problem?
 
Old 06-04-2014, 08:22 PM   #13
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
You know Red, I'm really interested in comparing vmware to QEMU-KVM in some limited applications, anything you can post about your experiences converting images would be welcome.
 
Old 06-04-2014, 09:50 PM   #14
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by dijetlo View Post
If you have libvirt installed on your machine, there is a very nice, version specific documentation library in your docs directory. On my Slackware install the index page for it is file:///usr/doc/libvirt-1.0.3/html/index.html.
OP is running Debian, so would need to install the libvirt-doc package and will then find the docs at file:///usr/share/doc/libvirt-doc/index.html

Evo2.
 
Old 06-04-2014, 10:26 PM   #15
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
thanks
 
  


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
[SOLVED] Networking using bridged interfaces to KVM guests midorikawa Linux - Networking 1 12-19-2013 05:17 PM
[SOLVED] Centos 6 and KVM - how to setup bridged networking in KVM in a -Class B- environment? rylan76 Linux - Virtualization and Cloud 7 11-07-2012 06:46 AM
no route to host on certain ports, kvm bridged guest el_tedward Linux - Networking 4 05-21-2012 01:11 AM
QEMU KVM bridged networking? iwanttolickazunyan Linux - Virtualization and Cloud 8 05-04-2012 11:21 AM
LXer: How To Install KVM And libvirt On CentOS 6.2 With Bridged Networking LXer Syndicated Linux News 0 03-02-2012 02:20 PM

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

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