Accidentally deleted one of the APPVMs/. Pls Help!

Hello! I need help! I accidentally deleted one of the APPVMs from Qubes Manager. Please tell me a simple way (preferably step by step) to restore it.

It would help if you said which qube you had deleted - some have
specific requirements and configuration, others not.

If the qube was one that came installed , then the simplest way is
probably to salt it, as was done in the install.

In dom0:

  1. sudo su
  2. cd /srv/formulas/base/virtual-machines-formula/qvm
  3. Identify the files that match the qube you deleted - say, vault.sls
  4. qubesctl state.apply qvm.vault (Do not use the suffix )
  5. exit

(if it were firewall.sls 4 would be `qubesctl state.apply qvm.firewall)

I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.
2 Likes

When a qube storage is deleted, it’s wiped to be ready to be provisioned clean next time. It might still be possible to recover by forensics professionals, but it must be super expensive, and you should stop using the disk until data are recovered.

This removed APPVM was created by cloning anon-whonix.

I tried entering the command
cd /srv/formulas/base/virtual-machines-formula/qvm

I get the output of sls files, but among them is my remote AppVM, and there are not even those that are currently in the system.

Please explain what I should do.

Thank you for your reply. Yes, I understand that. But I need help trying to figure it out on my own.

Please explain what you want to do.

If you just want to recreate the removed AppVM then simply run the
same command you used to create it in the first place - qvm-clone anon-whonix...

If you want to recreate the removed AppVM with the data, restore from
your last backup. If you do not have a Qubes backup or a data backup
then stop immediately and contact a data recovery firm, as solene
suggests - it will be expensive.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.