Make libvirt notice network device disconnection when backend domain is shut down #1426

Open
marmarek opened this Issue Nov 14, 2015 · 0 comments

Projects

None yet

1 participant

@marmarek
Member

Xen toolstack used in R3.0 (libxl + libvirt) does not have any device monitoring mechanisms. If the device is detached by the VM itself (for any reason), or some external tool (like xl), the toolstack will still think the device is present and connected (also some settings of xen network frontend and backend will not be cleaned up because of that). The only way to tell the toolstack that device is no longer connected, is to detach it from VM (action initiated by the user, through qubes manager or qvm-prefs, not by backend driver in response to shutting down the domain). But if the device is no longer there, such detach action would fail. And more importantly trying to attach it again (after starting backend domain again) would also fail, because libvirt still thinks the device is already there (detach action failed, right?).

This is the main reason why NetVM restart isn't working.
This is similar issue as #1082 (which is about block devices).

@marmarek marmarek added this to the Release 3.2 milestone Nov 14, 2015
@marmarek marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Nov 15, 2015
@marmarek marmarek core: detach connected VMs when shutting down NetVM
This is workaround for missing libxl/libvirt functionality: QubesOS/qubes-issues#1426

Also it should improve system shutdown time, as this is the situation
where all the VMs are shutting down simultaneously.

Fixes QubesOS/qubes-issues#1425
7359e39
@marmarek marmarek added a commit to QubesOS/qubes-core-admin that referenced this issue Nov 15, 2015
@marmarek marmarek core: detach connected VMs when shutting down NetVM
This is workaround for missing libxl/libvirt functionality: QubesOS/qubes-issues#1426

Also it should improve system shutdown time, as this is the situation
where all the VMs are shutting down simultaneously.

Fixes QubesOS/qubes-issues#1425

(cherry picked from commit 7359e39)
83e73b4
@andrewdavidwong andrewdavidwong added a commit that referenced this issue May 31, 2016
@andrewdavidwong andrewdavidwong Track #1426 f876f3a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment