Deactivating a Network Extension

After using OSSystemExtensionRequest deactivationRequestForExtension for Network Extension and after a reboot the extension is still seen with the status "uninstalling"

so it looks like we require 2 reboots for deactivating the Extension.

is it a known behaviour for system extension?
how to achieve this with only 1 reboot programatically (not via systemextensionsctl reset) ?


If you delete the container app and you enter the password during this time it should enqueue the Network System Extension to be removed on next reboot. You can also try using systemextensionsctl uninstall <uuid/sysex name> to enqueue for removal on reboot. I would not have expected this to take two reboots to complete.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
thankyou.

there are 2 states/messages seen on systemextensionsctl list comand:
  1. on deactivation without reboot: "terminated waiting to uninstall on reboot"

  2. on deactivation after reboot: "uninstalling"

so the confusion .
fine matt . will try out . thank you.

on deactivation without reboot: "terminated waiting to uninstall on reboot"

In this stage you should be able to verify that the process of your sysex is not running anymore and is waiting to be uninstalled.

on deactivation after reboot: "uninstalling"

This one is a bit more confusing. Check to make sure that the process is not hung somehow by looking for the Network Extension name in the Activity Monitor.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
I don't know if this is the same situation I had early on, but when I was in the compile/link/install/run/uninstall/repeat loop, if I didn't reboot after the uninstall, that removal would queue up. After half a dozen or so loops, I'd have a list of extensions ready to uninstall on reboot. I'd reboot and one would be gone, reboot again and another would be gone. I'd have to keep rebooting to get rid of them one by one.

Like I said, this was a while ago and I've gotten into a habit of either restarting the VM or restoring the snapshot. Not sure if this is what you're seeing or not.
A good point brought up here is also testing Network System Extension on a Virtual Machine. That way you can start from a fresh install and wipe it away this install if you find that you run into problems that you are not able to recover from.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
This one is a bit more confusing. Check to make sure that the process is not hung somehow by looking for the Network Extension name in the Activity Monitor.
  • I had rebooted and sure the process is not running in activity monitor . so it ws surprising.


Deactivating a Network Extension
 
 
Q