Re: Networking Problems with Debian Stretch + KVM + old Linux Guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 21.01.2018 um 10:53 schrieb Binarus:
> On 20.01.2018 17:04, Hermann Himmelbauer wrote:
>> Hi,
>> I today upgraded my KVM host from Debian 8 to the latest Debian 9
>> (Stretch). This worked perfectly, however, 2 old guest systems (SuSE
>> 9.1, kernel 2.6.7 / 2.6.5) have no network access.
>>
>> All other machines running on this host are Linux Debian machines and
>> use the "virtio" networking drivere whereas those two old machines use
>> RTL8139 (or e1000, makes no difference).
>>
>> On the guest side, the networking interface (eth0 / rtl8139) is up, it
>> states "Link Up / 100MBit" in the log file, everything looks fine, but I
>> can't get out, no ping, empty arp table etc.
>>
>> Basically, I use bridging for the virtual hosts, this looks like this:
>>
>> br0             8000.0026186273f4       no              eth0
>>                                                         vnet0
>>                                                         vnet1
>>
>> or like so:
>>
>> port no mac addr                is local?       ageing timer
>>   1     00:00:24:cc:c7:85       no                 0.42
>>   1     00:19:66:b3:cb:34       no                 3.97
>>   1     00:22:b0:cf:04:b2       no                 0.03
>>
>>
>> What is interesting is that I cannot find the MAC Address of the 2
>> machines in the above table, which is probably not good.
> 
> I had a similar problem some years ago. In my case, the network in the
> guests generally worked, but was stuttering such extremely that it
> actually could not be used.
> 
> After some research, it turned out that I had to assign a MAC address to
> the guests' (virtual) NICs explicitly.
> 
> You haven't told us how you configure / start your VMs. I personally
> don't use libvirt and colleagues, but I am starting the VMs from the
> command line. Consequently, I don't know how to assign MAC addresses
> using the high-level configuration tools. What I am doing on the command
> line (as far as it concerns the network) is something like that (please
> imagine the following code to be on one line):
> 
> /usr/bin/qemu-system-x86_64
> [...]
> -device virtio-net-pci,vlan=0,mac=02:01:01:01:02:01
> -net
> tap,vlan=0,name=dax,ifname=dax0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
> [...]
> 
> Please note how the MAC address is explicitly assigned. script and
> downscript are just two simple wrappers which add the virtual NIC to an
> existing bridge which connects them with the host and the other VMs.
> 
> The disadvantage of this method is that you have to manage the MAC
> addresses yourself (you ultimately must make sure that every VM gets its
> own and that no other device in the world (in practice in most cases: in
> your network) has the same as one of your virtual NICs). The MAC address
> shown above is from the semi-official private MAC address space, so I am
> hopefully out of trouble in this respect.
> 
> Please let us know if this solves your problem.

Thank you for your quick reply, I did not (yet) solve the problem, but I
unfortunately don't fully understand this "tap" device.

I start my virtual machines via libvirt (virt-manage / virsh). However,
looking at the command line, the virtual machine is started like this:
qemu-system-x86_64 -enable-kvm -name guest=horn,debug-threads=on -S
-object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-11-horn/master-key.aes
-machine pc-1.1,accel=kvm,usb=off,dump-guest-core=off
-cpu qemu32 -m 1024 -realtime mlock=off -smp 2,sockets=2,cores=1,threads=1
-uuid af3996ca-e192-65f0-4318-bd5054311d42 -no-user-config -nodefaults
-chardev
socket,id=charmonitor,path=/var/lib/libvirt/qemu/domain-11-horn/monitor.sock,server,nowait
-mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc
-no-shutdown -boot strict=on
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2
-drive file=/dev/gaia_data1/horn,format=raw,if=none,id=drive-ide0-0-0
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1
-netdev tap,fd=34,id=hostnet0
-device
rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:9a:db:c6,bus=pci.0,addr=0x3
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0
-vnc 127.0.0.1:0 -device cirrus-vga,id=video0,bus=pci.0,addr=0x2
-device intel-hda,id=sound0,bus=pci.0,addr=0x4
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on

So, the MAC-Address is assigend fixed. However, doing a "ip tuntap"
shows the following:

vnet8: tap
vnet6: tap vnet_hdr
vnet4: tap vnet_hdr
vnet2: tap
vnet0: tap vnet_hdr
vnet9: tap vnet_hdr
vnet7: tap vnet_hdr
vnet5: tap vnet_hdr
vnet3: tap vnet_hdr
vnet1: tap vnet_hdr

vnet2 / vnet8 are exactly the machines that have no network access.

So, I wonder if my problem has something to do with VLANs? I read
somewhere that only virtio support VLANs, the rtl8139 does not. I do not
use VLANs in any way, but perhaps there's something misconfigured?

What I do not know is how these "vnetX" - devices are created - you
mentioned two scripts - what do they do? Are the MAC addresses somehow
assigned to the "ventX" - devices, and if yes, how?

Best Regards,
Hermann

-- 
hermann@xxxxxxx
PGP/GPG: 299893C7 (on keyservers)



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux