Re: rede na KVM - era - Re: duc: falha na construç ão em hurd-i386

Lucas Castro <[email protected]>
Newsgroups gmane.linux.debian.devel.portuguese
Message-ID <[email protected]>

On 04-04-2016 15:13, Herbert Fortes (hpfn) wrote:
>>> eu criei uma máquina virtual no qemu/kvm. Usando libvirt [1]
>>>
>>> Baixei o CD de instalação: debian-sid-hurd-i386-CD-1.iso em [2]
>>>
>>> Bootei a máquina virtual com esse CD e instalei o Debian GNU/Hurd.
>>>
>>> usei os procedimentos do guia de empacotamento do Eriberto [3]
>>>
>>> [1] https://wiki.debian.org/KVM
>>> [2] https://people.debian.org/~sthibault/hurd-i386/installer/cdimage/current/
>>> [3] http://eriberto.pro.br/debian/guia_empacotamento_debian_2.10.pdf
>>>
>>> A partir daí empacotei como sempre fazemos na jaula.
>>>
>> Instalei o kvm hoje.
>>
>>   - se estiver usando a testing, o pacote é libvirt-daemon-system e
>>     não libvirt-bin.
>>   - atenção com as permissões. Editei o /etc/group para kvm e 
>> libvirt-qemu (acho). E rmmod - modprobe
>>   - libvirtd e virtlogd rodando para criar a imagem. :)
>>
>> Consultei o debian-handbook. https://debian-handbook.info/browse/stable/
>> É para stable, mas serve também.
>>
> Humm...
>
> Não estou conseguindo acesso a internet na
> VM.
>
> Na máquina onde roda o KVM tenho o ip default,
> mas na VM a eth0 tem um endereço inet6. E nada
> no '/etc/resolv.conf'.
Se você quiser apenas internet creio que o método mais simples é criar
uma internet nat.
Pode ver facilmente em 'preferencia > detalhes conexão > rede virtuais'.
lá vai poder criar uma rede nat, caso não exista.

caso queira ligar na mesma de rede do seu computador,
só configurar um bridge com a interface do seu computador e configurar a
vm para utilizá-la.

uso essa segunda alternativa.
iface br0 inet manual
    bridge_ports eth0
    bridge_stp off
> Onde roda a VM:
> # iptables -n -t nat -L
> Chain POSTROUTING (policy ACCEPT)
> target     prot opt source               destination         
> RETURN     all  --  192.168.122.0/24     224.0.0.0/24        
> RETURN     all  --  192.168.122.0/24     255.255.255.255     
> MASQUERADE  tcp  --  192.168.122.0/24    !192.168.122.0/24     masq ports: 1024-65535
> MASQUERADE  udp  --  192.168.122.0/24    !192.168.122.0/24     masq ports: 1024-65535
> MASQUERADE  all  --  192.168.122.0/24    !192.168.122.0/24 
>
> # ifconfig
> br0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
>         inet6 fe80::92b1:1cff:fef7:6bd7  prefixlen 64  scopeid 0x20<link>
>         ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)
>         RX packets 37321  bytes 33592959 (32.0 MiB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 39285  bytes 6707468 (6.3 MiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>
> br0:avahi: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
>         inet 169.254.37.59  netmask 255.255.0.0  broadcast 169.254.255.255
>         ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)
>
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.0.13  netmask 255.255.255.0  broadcast 192.168.0.255
>         inet6 fe80::f310:28e8:816b:920  prefixlen 64  scopeid 0x20<link>
>         ether 90:b1:1c:f7:6b:d7  txqueuelen 1000  (Ethernet)
>         RX packets 713442  bytes 885988551 (844.9 MiB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 560567  bytes 351142989 (334.8 MiB)
>         TX errors 7  dropped 2 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 1  (Loopback Local)
>         RX packets 96847  bytes 41493651 (39.5 MiB)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 96847  bytes 41493651 (39.5 MiB)
>         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:b5:cd:7e  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
>
> Na VM:
> eth0 com inet6 diferente da br0
> /etc/resolv.conf vazio
>
> Tentei colocar o endereço, na VM, fazendo parte
> de virbr0 (192.168.122.5), mas não funcionou.
>
> E também tirei o iptables. Nada.
>
> Alguma dica ?
signature.asc (application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJXArrYAAoJEKFpOc7gOOPodCgP/3MoOFSpwHKcRtdCasbuyM3t
+pI4UwDAqi5PgDZBnlxBvlfdaXP7Ks/07XpVPQRdOjXOzEf2uHAa4Wv/3P0cGlO7
3K8E3WwOzo7ZNaZ88DSbveV2fC5zPpiKdycYgfFaEaaorvinbUtEuxa94i9Vyw4F
X+nU+U9GRTjpG84ueS2XgOod62k4u4bCj+NuFgdzXWTNrRJTLhgYGRiZ7W1Bn9sJ
XsBKyMITH7YRiVRof2+AN6Axx0OVT8luYTb2b1ajvTwrsllG6sCptHapwRL062CZ
NE2HtL4fQ+B4EbQ3DsbaP3ZdKJPLSMMwghN9fpYGSRpKYaUqG2dP1zsrli9LUrzV
Qm73wH87DqzvvHoiSyBsDJgjT4dhWFjLF6MmdVLprRtPry5XYvsB84rCRtsbmGYZ
4LuKwLVIP3uWuZ265KyY2QvGOzPwNwmK3owEi5sWFsHS22THNeUstj44ExMfvg4D
2TuCnhgEhiAKc45aXk/u8WZco3KWxBf00El1FB+u0ikePaRnF/ApNIMPlMblaMpv
GQRZp6Zsp+CwzG7JODCbBeo7C7htkCS3lqQqDL0ARVuZTSjmIP2my0M6LamMLDxn
6XNO+ijvOIfDw208TwhB0mV8frHAZwIFd8ZZII9xCZM0e4bcvhJFOkmUO2xPeuR0
INbOrP8HkmdyKGamFzZv
=mQDo
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.