CH-REMOTE(1)

πŸ“¦ version 53.0, in ubuntu stonking

πŸ’– 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-socket path β€” path to the HTTP API UNIX domain socket of the target cloud-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 the create command πŸ‘Άβœ¨
  • 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 πŸ“₯
  • resize options β€” resize the VM resources πŸ“
    • --cpus count β€” new vCPU count
    • --memory size β€” new memory size in bytes (supports K/M/G suffix)
    • --balloon size β€” new balloon size in bytes (supports K/M/G suffix)
  • resize-disk options β€” resize an attached block device πŸ’Ύ
    • --disk id β€” disk device identifier
    • --size size β€” new disk size
  • resize-zone options β€” resize a memory zone πŸ—ΊοΈ
    • --id zone_id β€” memory zone identifier
    • --size size β€” new memory zone size in bytes (supports K/M/G suffix)

πŸ”₯ Device Hotplug

  • add-device config β€” 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-disk config β€” 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-fs config β€” 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-user config β€” 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-net config β€” 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-pmem config β€” 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-device config β€” add a userspace device πŸ› οΈ syntax:
socket=<socket_path>,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>.
  • add-vdpa config β€” 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-vsock config β€” 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-device id β€” remove a VFIO or PCI device by its device identifier βœ‚οΈ

πŸ¦‹ Snapshot, Restore and Migration

  • snapshot destination_url β€” create a snapshot of the VM and save it to the given URL (e.g. file:///path/to/snapshot) πŸ“Έ
  • restore config β€” 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-migration config β€” 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-migration receiver_url β€” prepare to receive a VM migration on the given URL (e.g. tcp://0.0.0.0:1234) πŸ“₯
  • coredump file_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 🧚

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