CH-REMOTE(1)
π NAME π
okay bestie, meet ch-remote β the little command-line baddie that remotely controls a cloud-hypervisor VMM π (that's CH-REMOTE(1) in the manual, iykyk)
β¨ SYNOPSIS β¨
ch-remote [OPTIONS] COMMAND [ARGS]
πΈ DESCRIPTION πΈ
so like, ch-remote is a command-line client (yes, a whole client, she's employed π
) that talks to a running cloud-hypervisor(1) instance through its HTTP API socket π
and the way that she can do so much, it's giving main character energy, fr fr:
- query VM status π
- hotplug devices π₯
- trigger lifecycle operations (
boot,pause,resume,reboot,shutdown) π¦ - perform live migration βοΈ
- create or restore snapshots πΈ
periodt. no cap.
π«Ά OPTIONS π«Ά
--api-socketpath β path to the HTTP API UNIX domain socket of the targetcloud-hypervisor(1)instance π§¦-h,--helpβ print a help summary and exit (she's helpful like that π)-V,--versionβ print version information and exit β
π COMMANDS π
π Lifecycle Commands
bootβ boot a created VM. the VM must have been previously created with thecreatecommand πΆβ¨pauseβ pause a running VM. all vCPUs are suspended βΈοΈresumeβ resume a previously paused VM βΆοΈrebootβ reboot the VM πshutdownβ shutdown the VM (graceful guest-initiated shutdown) ποΈshutdown-vmmβ shutdown the VMM process itself π (not the guest β the whole dang VMM)power-buttonβ trigger an ACPI power button event in the VM, allowing the guest to handle the shutdown gracefully πnmiβ trigger a Non-Maskable Interrupt (NMI) in the VM. useful for debugging guest hangs πdeleteβ delete a VM and free its resources π§Ή
π VM Creation and Configuration
create[path] β create a VM from a JSON configuration file. if path is β-β or omitted, the configuration is read from standard input π₯resizeoptions β resize the VM resources π--cpuscount β new vCPU count--memorysize β new memory size in bytes (supports K/M/G suffix)--balloonsize β new balloon size in bytes (supports K/M/G suffix)
resize-diskoptions β resize an attached block device πΎ--diskid β disk device identifier--sizesize β new disk size
resize-zoneoptions β resize a memory zone πΊοΈ--idzone_id β memory zone identifier--sizesize β new memory zone size in bytes (supports K/M/G suffix)
π₯ Device Hotplug
add-deviceconfig β add a VFIO device π§© syntax:
path=<device_path>,iommu=on|off,id=<device_id>,
pci_segment=<segment_id>,pci_device_id=<pci_slot>,
x_nv_gpudirect_clique=<clique_id>,
x_exclude_mmap_bars=[<bar>...]
add-diskconfig β add a block device π½ syntax:
path=<disk_image_path>,readonly=on|off,
direct=on|off,iommu=on|off,
num_queues=<number_of_queues>,
queue_size=<size_of_each_queue>,vhost_user=on|off,
socket=<vhost_user_socket_path>,id=<device_id>,
pci_segment=<segment_id>,pci_device_id=<pci_slot>
add-fsconfig β add a virtio-fs backed filesystem device π syntax:
tag=<tag_name>,socket=<socket_path>,
num_queues=<number_of_queues>,
queue_size=<size_of_each_queue>,id=<device_id>,
pci_segment=<segment_id>,pci_device_id=<pci_slot>
add-generic-vhost-userconfig β add a generic vhost-user device π§ syntax:
virtio_id=<ID_or_name>,socket=<socket_path>,
queue_sizes=<list_of_queue_sizes>,id=<device_id>,
pci_segment=<segment_id>,pci_device_id=<pci_slot>
add-netconfig β add a network device π syntax:
tap=<if_name>,ip=<ip_addr>,mask=<net_mask>,
mac=<mac_addr>,fd=<[fd1,fd2,...]>,iommu=on|off,
num_queues=<number_of_queues>,
queue_size=<size_of_each_queue>,id=<device_id>,
vhost_user=on|off,socket=<vhost_user_socket_path>,
vhost_mode=client|server,pci_segment=<segment_id>,
pci_device_id=<pci_slot>
add-pmemconfig β add a persistent memory device π§ syntax:
file=<backing_file_path>,size=<persistent_memory_size>,
iommu=on|off,discard_writes=on|off,id=<device_id>,
pci_segment=<segment_id>,pci_device_id=<pci_slot>
add-user-deviceconfig β add a userspace device π οΈ syntax:
socket=<socket_path>,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>.
add-vdpaconfig β add a vDPA device β‘ syntax:
path=<device_path>,num_queues=<number_of_queues>,
iommu=on|off,id=<device_id>,
pci_segment=<segment_id>,pci_device_id=<pci_slot>
add-vsockconfig β add a vsock device π§΅ syntax:
cid=<context_id>,socket=<socket_path>,iommu=on|off,
id=<device_id>,pci_segment=<segment_id>,
pci_device_id=<pci_slot>
remove-deviceid β remove a VFIO or PCI device by its device identifier βοΈ
π¦ Snapshot, Restore and Migration
snapshotdestination_url β create a snapshot of the VM and save it to the given URL (e.g.file:///path/to/snapshot) πΈrestoreconfig β restore a VM from a previously taken snapshot πͺ syntax:
source_url=<source_url>,prefault=on|off,
memory_restore_mode=copy|ondemand,
net_fds=<list_of_net_ids_with_their_associated_fds>,
resume=true|false
send-migrationconfig β initiate a live migration of the VM to a remote destination βοΈ syntax:
destination_url=<url>,local=on|off,
downtime_ms=<milliseconds>,timeout_s=<seconds>,
timeout_strategy=cancel|ignore,
connections=<amount>
receive-migrationreceiver_url β prepare to receive a VM migration on the given URL (e.g.tcp://0.0.0.0:1234) π₯coredumpfile_path β create a coredump of the VM and write it to the specified file path π«
π Monitoring
pingβ ping the VMM to verify API server availability πinfoβ display information about the current VM configuration and state πcountersβ display performance counters from the VM π
π EXAMPLES π
ping a running VMM instance:
ch-remote --api-socket /tmp/ch.sock ping
boot a VM that was previously created:
ch-remote --api-socket /tmp/ch.sock boot
hotplug a disk to a running VM:
ch-remote --api-socket /tmp/ch.sock add-disk \
path=/path/to/disk.raw,id=disk1
resize a VM to 4 vCPUs and 2G of memory:
ch-remote --api-socket /tmp/ch.sock resize \
--cpus 4 --memory 2G
take a snapshot:
ch-remote --api-socket /tmp/ch.sock snapshot \
file:///tmp/vm-snapshot
initiate a live migration:
ch-remote --api-socket /tmp/ch.sock send-migration \
destination_url=tcp://192.168.1.10:1234
π§ SEE ALSO π§
cloud-hypervisor(1)kvm(4)
project documentation: https://www.cloudhypervisor.org/ π
π AUTHORS π
the Cloud Hypervisor Authors π«Ά (yes, all of them, collectively iconic)
β LICENSE β
Apache-2.0 AND BSD-3-Clause π
and that's the whole page bestie π
β straight from cloud-hypervisor 52.0.0, dated 2025-07-01, manual page CH-REMOTE(1). go forth and control those VMMs remotely, you absolute legend ππ¦
π¦ where this page comes from
- ubuntu stonking: cloud-hypervisor 53.0-0ubuntu1 Β· Apache-2.0 AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms