Experimental Qube Manager feature: Convert AppVM to StandaloneVM
I have developed an experimental Qube Manager feature for Qubes OS 4.3 that adds a “Convert to StandaloneVM” action to the VM context menu.
Repository:
This is an unofficial development build and is not part of the standard Qubes OS packages.
What it does
When exactly one halted AppVM is selected, Qube Manager offers:
Convert to StandaloneVM
The original AppVM is retained. The feature creates a new VM named:
<source-name>-SA
The new VM is an independent StandaloneVM and has no TemplateVM dependency.
Configuration copied
The conversion copies:
- The template root filesystem into the StandaloneVM root volume
- The AppVM private volume
- Network configuration, including
netvm - Memory, CPU, boot, kernel, GUI, audio, and management settings
- Backup and disposable-VM settings
- VM features, including application-menu selections and service features
- Tags
- Notes
- Firewall rules
- Persistent device assignments where supported
- Generated application menus
The original AppVM is not modified, renamed, or deleted.
Application menus
Application-menu selections are stored as VM features, but dom0 menu entries must also be regenerated. The feature starts the new StandaloneVM and runs:
qvm-sync-appmenus --force-rpc <source-name>-SA
The synchronization is retried while the VM becomes ready. This allows the application list to be generated from the StandaloneVM filesystem rather than copying stale dom0 menu files.
Example verification
After conversion, run from dom0:
qvm-ls <source-name> <source-name>-SA
qvm-prefs <source-name>-SA template
qvm-sync-appmenus --verbose --force-rpc <source-name>-SA
qvm-appmenus --get-whitelist <source-name>-SA
The source should remain an AppVM. The new VM should be a StandaloneVM with no template.
Building
The package can be built with Qubes Builder v2 using the local executor:
./qb \
-d host-fc41 \
-o executor:type=local \
-o executor:options:directory=/home/user/qubes-builder-tmp \
-o skip-git-fetch=true \
-c qubes-manager package prep build
The resulting RPM can be installed in dom0 with:
sudo rpm -Uvh --oldpackage --replacepkgs \
qubes-manager-*.fc41.noarch.rpm
The source version should match the Qubes Manager version installed in dom0.
Testing status
The feature has been tested with:
- AppVM to StandaloneVM conversion
- Private-volume cloning
- Network configuration preservation
- Application-menu synchronization
- Service-feature preservation
- StandaloneVM startup after conversion
Testing and review are welcome, particularly for:
- Firewall-rule preservation
- Device-assignment preservation
- Additional VM properties
- Fedora and Debian templates
- Failure recovery and rollback behavior
- Compatibility with future Qubes Manager releases
Because this is an experimental package, test it with a disposable or non-critical AppVM first and keep backups of important data.