D
D
Den2015-06-03 17:43:11
linux
Den, 2015-06-03 17:43:11

Setting up KVM/QEMU bridging. How to set up a network?

Hello. Need help setting up a network between a host and virtual machines. All this happens on a remote server via SSH. There are a lot of instructions on the network, but basically everyone uses a physical interface, for example eth0, and gets dhcp addressing to all ports of the bridge, but since there is no physical access, nothing is suitable. It is necessary to make a network in which the host will see the virtual machines, for example, have SSH access to them, while the virtual machines will not have access to the Internet but will see one alone, in fact, because they are connected to the bridge. I already have a guest installed on the server via virt-install and use Open vSwitch, then follow this instruction.
I create a bridge
sudo ovs-vsctl add-br ovsbr
Next, I configure the guest via xml (virsh edit guest)

<interface type='bridge'>
    <mac address='52:54:00:71:b1:b6'/>
    <source bridge='ovsbr'/>
    <virtualport type='openvswitch'/>
    <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
  </interface>

After that, the ovsbr bridge receives the vnet0 port on which the guest is sitting. But how now to set up addressing please tell me?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
zorruch, 2015-06-03
@zorruch

Write the network manually. Or raise dhcp on the hypervisor - so that it distributes the addresses of your private network.

K
kazatchkoff, 2015-06-05
@kazatchkoff

There was a good article on Habré

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question