I'm trying to setup a KVM based VMs on a local server, and following this doc: https://wiki.debian.org/KVM
In this documentation it states that you'll get virbr0 for bridge connection, but unfortunately it wasn't created automatically. Doc suggest to use virt-manager to fix that, but I'm having just a standard debian server installation w/o GUI. So how can I create that from command line?
I have created br0, all looks good:
$ ip addr show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP group default qlen 1000 link/ether 00:1f:c6:9c:0f:0d brd ff:ff:ff:ff:ff:ff 3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 00:1f:c6:9c:0f:0d brd ff:ff:ff:ff:ff:ff inet 192.168.1.200/24 brd 192.168.1.255 scope global br0 valid_lft forever preferred_lft forever inet6 fe80::21f:c6ff:fe9c:f0d/64 scope link valid_lft forever preferred_lft forever $ sudo ip route default via 192.168.1.1 dev br0 $ brctl show bridge name bridge id STP enabled interfaces br0 8000.001fc69c0f0d no eth0 notice, there're no virbr0.
If I try to create ifage-bridge I get error:
$ virsh iface-bridge eth0 br0 error: failed to get interface 'eth0' error: internal error: couldn't find interface named 'eth0': required entry missing I also have bridge configured for qemu, which I did manually and added to qemu autostart:
$ cat /etc/libvirt/qemu/networks/bridge.xml <network> <name>bridge</name> <bridge name="br0"/> <forward mode="bridge"/> </network> And I can't create/start a VM because of bridge:
$ virt-install --virt-type kvm --name testvm --network bridge Starting install... Retrieving file MANIFEST... | 3.3 kB 00:00 ... Retrieving file linux... | 6.0 MB 00:08 ... Retrieving file initrd.gz... | 29 MB 00:56 ... Allocating 'testvm.qcow2' | 8.0 GB 00:00 ERROR failed to retrieve file descriptor for interface: Transport endpoint is not connected It works if I omit --network configuration. This VM wouldn't have network, so useless basically. If I add a bridge config by virsh edit testvm:
<interface type='bridge'> <source bridge='br0'/> <model type='virtio'/> </interface> and run, it will fail anyway:
$ virsh start testvm error: Failed to start domain testvm error: failed to retrieve file descriptor for interface: Transport endpoint is not connected What I did incorrectly? How I should add virbr0 and hot to setup network for VMs?
I have a fresh Debian Jessie installation, nothing was installed except core components, ssh and kvm/qemu/libvirt