He configurado kvm/quemu en un servidor. Seguí la guía y funcionó con una excepción. Solo puedo acceder por ssh a las máquinas virtuales a través del servidor que ejecuta kvm. Si uso mi computadora portátil no puedo. Primero tengo que enviar ssh al servidor y luego a la máquina virtual.
SERVIDOR Servidor Ubuntu 18.04
Aquí está el /etc/network/interfaces en el servidor.
fuente /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# primary network interface
#auto eth0
#iface eth0 inet manual
# address 192.168.1.100
# netmask 255.255.255.0
# dns-nameservers 8.8.8.8
#bridge
auto br0
iface br0 inet static
address 192.168.1.100
netmask 255.255.224.0
gateway 192.168.1.1
dns-nameserver 192.168.100.1 8.8.8.8
bridge_ports eth0
bridge_stp n
bridge_fd 0
bridge_maxwait 0
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 255.255.224.0 broadcast 192.168.31.255
ether 0e:37:a0:d5:da:e5 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:ac:48:67:60 txqueuelen 0 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255
ether 78:2b:cb:03:27:5c txqueuelen 1000 (Ethernet)
RX packets 209192 bytes 21456278 (21.4 MB)
RX errors 0 dropped 1400 overruns 0 frame 0
TX packets 1220945 bytes 1689016362 (1.6 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 1000 (Local Loopback)
RX packets 350787 bytes 5953177436 (5.9 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 350787 bytes 5953177436 (5.9 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
virbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.1 netmask 255.255.255.0 broadcast 192.168.100.255
ether 52:54:00:81:56:35 txqueuelen 1000 (Ethernet)
RX packets 4662 bytes 313603 (313.6 KB)
RX errors 0 dropped 41 overruns 0 frame 0
TX packets 2177 bytes 228116 (228.1 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
vnet0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether fe:54:00:de:c7:b6 txqueuelen 1000 (Ethernet)
RX packets 4223 bytes 336843 (336.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 24991 bytes 1402572 (1.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Virsh editar 16
<domain type='qemu'>
<name>ubuntu18.04</name>
<uuid>bf380e27-73bf-4633-b69a-4b04cae4d0ab</uuid>
<memory unit='KiB'>2097152</memory>
<currentMemory unit='KiB'>2097152</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc-i440fx-bionic'>hvm</type>
<boot dev='hd'/>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/mnt/md1/vm/images/ubuntu18.04.qcow2'/>
<target dev='vda' bus='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
<disk type='file' device='cdrom'>
<driver name='qemu' type='raw'/>
<target dev='hda' bus='ide'/>
<readonly/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='usb' index='0' model='ich9-ehci1'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x7'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci1'>
<master startport='0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0' multifunction='on'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci2'>
<master startport='2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x1'/>
</controller>
<controller type='usb' index='0' model='ich9-uhci3'>
<master startport='4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pci-root'/>
<controller type='ide' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='virtio-serial' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</controller>
<interface type='bridge'>
<mac address='52:54:00:de:c7:b6'/>
<source bridge='br0'/>
<model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
</serial>
<console type='pty'>
<target type='serial' port='0'/>
</console>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<input type='tablet' bus='usb'>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<graphics type='spice' autoport='yes'>
<listen type='address'/>
</graphics>
<sound model='ich6'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</sound>
<video>
<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</video>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<address type='usb' bus='0' port='3'/>
</redirdev>
<memballoon model='virtio'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
</memballoon>
</devices>
</domain>
Después de eno1... pierdo el acceso ssh. Intenté usar cualquier cadena además de eno1 y obtuve los mismos resultados... ejemplo "bridge_ports mycatisbadass6969". Supongo que el área bridge_ports es la culpable. ¿Alguna sugerencia?
PORTÁTIL Ubuntu 18.04 de escritorio
Ifconfig de la computadora portátil
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::eb74:44f9:ec1e:5c64 prefixlen 64 scopeid 0x20<link>
ether ac:22:0b:50:ae:ea txqueuelen 1000 (Ethernet)
RX packets 1350919 bytes 1948697230 (1.9 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 328633 bytes 28035898 (28.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf7b00000-f7b20000
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 6029 bytes 566246 (566.2 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6029 bytes 566246 (566.2 KB)
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:a3:f6:29 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
/etc/red/interfaces
auto lo
iface lo inet loopback
Servidor VM Ubuntu18.04
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.100.147 netmask 255.255.255.0 broadcast 192.168.100.255
inet6 fe80::5054:ff:fede:c7b6 prefixlen 64 scopeid 0x20<link>
ether 52:54:00:de:c7:b6 txqueuelen 1000 (Ethernet)
RX packets 278 bytes 24506 (24.5 KB)
RX errors 0 dropped 119 overruns 0 frame 0
TX packets 169 bytes 17083 (17.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
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 284 bytes 21556 (21.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 284 bytes 21556 (21.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Cambié
<interface type='network'>
<source network='default'/>
</interface>
a
<interface type='bridge'>
<source bridge='br0'/>
</interface>
tiene adaptador lo..adaptador ens3
También reinicié las interfaces de red miles de veces mientras jugaba con sudo /etc/inint.d/network restart
Editar... Creo que ejecutar esto a continuación me permite usar el adaptador. Todavía no puedo enviar ssh directamente a la máquina virtual
sudo ip addr flush dev br0
sudo ip addr flush dev eno1