Results 1 to 3 of 3

Thread: Connecting a VM to second NIC in KVM (Virtual Machine Manager)

  1. #1
    Join Date
    Dec 2019
    Beans
    7

    Connecting a VM to second NIC in KVM (Virtual Machine Manager)

    So this is a somewhat newbie question. I have Ubuntu 19.10 running as a HTPC but it's got power to spare. I have a second NIC it and would like to connect a guest VM (Ubuntu or CentOS) directly to this card so it's seem on my LAN; meaning it gets a DHCP address and local DNS name from my rougher while my host OS does the same from the onboard NIC. I plan to use this for light back-up services.

    I was planning on using KVM with Virtual Machine Manager to accomplish this. My reading has got me confused. It seem like I need to set up a bridge but might be able to do some sort of hardware direct addressing. What would be best way to do this. I feel like this is simple but some discussions and tutorials have me going in circles.

    Thanks in advance for your help!

  2. #2
    Join Date
    Jul 2008
    Location
    The Left Coast of the USA
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Connecting a VM to second NIC in KVM (Virtual Machine Manager)

    When you set up the VM, you can choose its NIC directly. Just make sure you don't use the one dedicated to your host.

    I have 13 VMs on this machine with 1 spare NIC on the mobo and 3 4-port NIC cards. One of the NICs on the mobo is dedicated to the host.

    No bridge needed.
    Please read The Forum Rules and The Forum Posting Guidelines

    A thing discovered and kept to oneself must be discovered time and again by others. A thing discovered and shared with others need be discovered only the once.
    This universe is crazy. I'm going back to my own.

  3. #3
    Join Date
    Dec 2019
    Beans
    7

    Re: Connecting a VM to second NIC in KVM (Virtual Machine Manager)

    Thanks, I hoped it was that easy but I am having problems:

    My ifconfig looks like this:

    eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.0.234 netmask 255.255.255.0 broadcast 192.168.0.255
    inet6 fe80::8a17:6c08:6733:8d3c prefixlen 64 scopeid 0x20<link>
    ether 98:90:96:9f:89:dd txqueuelen 1000 (Ethernet)
    RX packets 1030474 bytes 365795691 (365.7 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 1609289 bytes 1031614589 (1.0 GB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 20 memory 0xf7f00000-f7f20000
    enp4s2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    ether 00:0a:5e:19:c2:cc txqueuelen 1000 (Ethernet)
    RX packets 380732 bytes 369544437 (369.5 MB)
    RX errors 0 dropped 6123 overruns 0 frame 0
    TX packets 96312 bytes 7663699 (7.6 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 19
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 39721 bytes 5167336 (5.1 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 39721 bytes 5167336 (5.1 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255
    ether 52:54:00:68:45:9c txqueuelen 1000 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 20 bytes 6090 (6.0 KB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    I am tying to use enp4s2. When I start of new VM and the wizard ask me select s Network I can pick "Host device enp4s2: maxtap. Then ask for as source what should I select, nothing seems to work. Thanks!

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •