diff --git a/net/tap.c b/net/tap.c
index 0147dab..f34dd9c 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -330,6 +330,9 @@ static int launch_script(const char *setup_script, const char *ifname, int fd)
     sigaddset(&mask, SIGCHLD);
     sigprocmask(SIG_BLOCK, &mask, &oldmask);
 
+    /* make sure no cpus are running, so the apic does not
+     * get confused */
+    vm_stop(0);
     /* try to launch network script */
     pid = fork();
     if (pid == 0) {
@@ -350,6 +353,7 @@ static int launch_script(const char *setup_script, const char *ifname, int fd)
         execv(setup_script, args);
         _exit(1);
     } else if (pid > 0) {
+        vm_start();
         while (waitpid(pid, &status, 0) != pid) {
             /* loop */
         }
