[virt-tools-list] Curious Connectivity Issue

Gustave Stresen-Reuter tedmasterweb at gmail.com
Tue Nov 17 18:26:32 UTC 2015


Hi again,

Until this is resolved, here's the workaround I've implemented…

Inside the Smoothwall guest I've created a crontab that runs every 5
minutes and pings a known, external IP. If there is no immediate response,
it shuts itself down (/sbin/shutdown -h now).

Inside the host I execute another crontab every minute that checks to see
if the Smoothwall virtual machine is running and if not, starts it with
virsh start Smoothie.

This workaround works, mostly, keeping the system mostly available.

You might be wondering why -h rather than -r. The reason is, with -r, the
virtual interfaces (macvtap0 in particular) are not "destroyed" so their
connections are not brought back up. With -h, the machine shuts down
completely and when the machine is started again, it recreates the
interfaces and everything works fine.

I sure hope someone out there sees this and can lend a hand. This feels
very, very 1990s…

Sincerely,

Ted

On Tue, Nov 17, 2015 at 12:11 PM Gustave Stresen-Reuter <
tedmasterweb at gmail.com> wrote:

> Here's the output of that command and to be clear, the guest loses
> connectivity on that interface. The host is still able to connect (but over
> the enp5s0 interface).
>
> $ sudo virsh domif-setlink Smoothie --interface '52:54:00:3B:22:31'
> --state down
> Device updated successfully
>
> $ sudo virsh domif-setlink Smoothie --interface '52:54:00:3B:22:31'
> --state up
> Device updated successfully
>
> Nevertheless, connectivity is not reestablished on the guest and the
> Network settings panel still does not show the ON/OFF button nor the
> Options button.
>
> I shut down the guest. I would expect the interfaces to disappear from the
> host Network Settings control panel, but they don't (well, the Macvtap
> interfaces don't). So, just for kicks, with the guest shut down, I executed
> the 'up' command again. It replied "Device updated successfully" but again,
> the Network Settings control panel still doesn't show the on off button,
> nor an IPV6 address. In other words, unchanged.
>
> I restarted the guest (Smoothie) and upon doing so, the macvtap0 interface
> came back up (the Network Settings control panel in the host shows the
> ON/OFF button and the Options button is also visible). And as one would
> expect, connectivity is restored.
>
> So, I did it all again, but this time, I didn't execute the 'up' command.
> Rather, I just shut the guest down and started it up again. This time, the
> Network Settings control panel on the host crashed (disappeared) when I
> unplugged the ethernet cable. Other than that, everything was the same
> (connectivity was restored).
>
> My question is, is this a CentOS 7 issue or a virt issue? I'm beginning to
> suspect the former.
>
> And before I go, where can I find a complete list of virsh commands (so I
> don't have to bother others for the info)?
>
> Thanks again for your help!
>
> Ted
>
> On Tue, Nov 17, 2015 at 11:25 AM Gustave Stresen-Reuter <
> tedmasterweb at gmail.com> wrote:
>
>> Hi again. Sorry for the last email. $VM should obviously be the name of
>> the guest (Smoothie in this case) and the $MAC should be the MAC address of
>> the interface in question. Duh.
>>
>> I'll let you know how it goes.
>>
>> Ted
>>
>> On Tue, Nov 17, 2015 at 11:06 AM Gustave Stresen-Reuter <
>> tedmasterweb at gmail.com> wrote:
>>
>>> Hi and thanks for checking this out. If I can't get this resolved soon
>>> I'm going to have to install an older version of the host OS, get
>>> everything configured, and then try upgrading. Is CentOS a good choice for
>>> the host? I'd use REL but I've never been clear on the licensing and don't
>>> want to put myself in a spot unnecessarily.
>>>
>>> Those screen shots are from the host, unfortunately. Apparently, when
>>> the Smoothwall starts up, it executes some sort of script that creates the
>>> Macvtap interfaces and that seems to be where the issue is. If I unplug the
>>> cable without those interfaces created, and plug it back in, connectivity
>>> is restored without issue.
>>>
>>> I'll try the command you suggest but…
>>>
>>> What should the value of $VM be? macvtap0 or enp5s0 (the interface
>>> defined by the host)? Same question for $MAC…
>>>
>>> Thanks again for lending a hand. This is frustrating because these sorts
>>> of things normally just work (thankfully).
>>>
>>> Kind regards,
>>>
>>> Ted Stresen-Reuter
>>>
>>> On Tue, Nov 17, 2015 at 1:13 AM Cole Robinson <crobinso at redhat.com>
>>> wrote:
>>>
>>>> On 11/16/2015 06:28 AM, Gustave Stresen-Reuter wrote:
>>>> > Hi,
>>>> >
>>>> > I'm new to the list and not even sure if this is the right list to be
>>>> writing
>>>> > to so please feel free to redirect if needed.
>>>> >
>>>> > I've summarized my issue in this blog post:
>>>> >
>>>> http://chicagoitsystems.com/centos-7-kvm-macvtap-loses-all-connectivity/
>>>> >
>>>> > However, since writing that, I've found that I can regain
>>>> connectivity by
>>>> > stopping and restarting the guest that uses the Macvtap connections.
>>>> > Apparently, the command that executes that creates the interfaces
>>>> does not
>>>> > include the "allow reconnections" options.+
>>>> >
>>>> > I would really appreciate it if someone could point me in the
>>>> direction I need
>>>> > to go to verify that this is indeed the issue (like, modifying the
>>>> script used
>>>> > to start the machine from the command line to see if I can add… oh
>>>> wait, maybe
>>>> > there is a switch in the XML that is not being set???)
>>>> >
>>>> > Anyway, as you can see, I would appreciate any pointers people on
>>>> this list
>>>> > can give.
>>>> >
>>>>
>>>> Are those screenshots from inside the guest, or is the host side
>>>> screwed up?
>>>>
>>>> If it's just the guest side, maybe this can be fixed by emulating a VM
>>>> nic
>>>> unplug and replug event. You can do that with
>>>>
>>>> sudo virsh domif-setlink $VM --interface $MAC --state up|down
>>>>
>>>> So give that a shot and let us know if it works
>>>>
>>>> Thanks,
>>>> Cole
>>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20151117/d1d4e25a/attachment.htm>


More information about the virt-tools-list mailing list