Create and Run a VM
Create, start and stop VMs with vphone-cli in Terminal. Use this page when you work without Launchpad, script VM creation, or need to repeat one stage of the process.
Launchpad drives VMs through the vphone-cli inside VPhone.bundle; the same commands work in Terminal:
VMs are stored in ~/.vphone/. Run vphone-cli <group> --help to see all commands.
Create a VM
You need an iPhone17,3 restore IPSW and a compatible PCC/cloudOS IPSW, as local paths or URLs. Compatibility lists the pairs verified so far.
Creation runs these stages: prepare, firmware patch, online DFU restore, host-mounted CFW installation, first GUI boot.
- It needs network access for the restore ticket.
- CFW installation needs root. The bundle has no authorization dialog or privilege helper, so you provide root yourself.
- The default virtual disk is 64 GB.
Success ends with [+] First boot: vphoned ping succeeded. and CFW VM created; vphoned connected. Guest user environment is untouched. The VM is then stopped: the ping proves that vphoned answered during that boot, and no running VM is left behind.
Options
--cpu, --memory, --network and --unlock-at-startup set the same vm config settings on the new VM.
Templates
By default the pipeline builds a template and clones the VM from it. The next vm create for the same device, iOS and cloudOS builds, preset and disk size clones from that template instead of restoring again. Pass --no-template to build the VM on its own.
Patches and firmware preparation
The firmware workflow has one mode. It patches the boot chain and guest system, installs vphoned, and leaves the user environment empty: it does not install Sileo, apt, TrollStore, an SSH server or a VNC server. A patch preset selects which patches apply; vphone-cli fw set-patches with --block or --allow turns single patches off or on.
Before patching, creation prepares the firmware: a temporary cloudOS restore supplies the GPU driver, and a cloudOS without vphone600 components needs a rebuilt kernelcache. See Firmware Preparation. To create several machines from one list, see Many Machines.
Start and stop
vm launch starts the guest without waiting for vphoned; the daemon connects during boot. The VM window and menu provide Home and power keys, app installation and file browsing. vm launch --headless boots without a VM window or menu bar.
These all shut the guest down cleanly (vphoned system.shutdown):
- closing the VM window
- ⌘Q
vm stop- Control-C in the
vm launchterminal
The VM ends once the guest has stopped, or after 15 seconds if it has not. A guest vphoned cannot answer for, such as one in DFU or still starting up, is turned off at once, as pulling the power would. A second Control-C turns it off without waiting.
vm stop only signals the machine's own processes, vphone-vm and Virtualization's VM service. Another program that has the disk open, such as Launchpad measuring its size, Spotlight or a backup tool, is named and left running.
Control socket
Each running VM has a control socket at vphone.sock in its folder (~/.vphone/machines/<name>/vphone.sock): one JSON line in, one JSON line out. Connections are served concurrently, and the socket also exists for a VM without a window, where tap and swipe go through vphoned's touch injection and screen images come from the guest.
Besides tap, swipe, key and screenshot, an rpc request calls any vphoned method in the API reference:
For example, input.key with {"name":"cmd+v"} pastes, and input.type types text. This workflow installs no SSH or VNC endpoint. For HTTP and WebSocket access, see Automation API.
Run each stage by hand
Use these when you investigate or repeat one phase. Keep a DFU boot running while restore talks to it:
The online restore obtains its ticket in process. For an offline restore, see vphone-cli restore --help for --get-shsh and --offline. The manual flow does not run the first-boot ping check that vm create does.