diff --git a/appvm/qubes_core b/appvm/qubes_core index c291ec78..1b7aa3f9 100755 --- a/appvm/qubes_core +++ b/appvm/qubes_core @@ -35,13 +35,8 @@ start() (read a b c d ; xenstore-write device/qubes_used_mem $c) # we're still running in DispVM template echo "Waiting for save/restore..." - # WARNING: Nergalism! - # Apparently it has been determined that DomU kernel - # dmesg's "using vcpu" after restore - while ! dmesg -c | grep "using vcpu" ; do usleep 10 ; done - # we're now after restore in a new instance of a DispVM # ... wait until qubes_restore.c (in Dom0) recreates VM-specific keys - while ! xenstore-read qubes_vm_type 2>/dev/null ; do + while ! xenstore-read qubes_restore_complete 2>/dev/null ; do usleep 10 done echo Back to life. diff --git a/dom0/restore/qubes_restore.c b/dom0/restore/qubes_restore.c index 9ab3550e..0374eff3 100644 --- a/dom0/restore/qubes_restore.c +++ b/dom0/restore/qubes_restore.c @@ -336,6 +336,7 @@ void setup_xenstore(int domid, char *name) snprintf(val, sizeof(val), "10.%s.255.254", netvm_id); write_xs_single(xs, domid, "qubes_secondary_dns", val); write_xs_single(xs, domid, "qubes_vm_type", "AppVM"); + write_xs_single(xs, domid, "qubes_restore_complete", "True"); xs_daemon_close(xs); }