CLOUD-HYPERVISOR(1)
π CLOUD-HYPERVISOR π
okay bestie, welcome to the cloud-hypervisor manual page β she's a User Commands girlie (that's section 1 for the manpage girlies keeping score) and she is literally about to run an entire virtual machine for you. no cap.
β¨ NAME β¨
cloud-hypervisor β launch a cloud-hypervisor virtual machine monitor π«Ά
π SYNOPSIS π
cloud-hypervisor [OPTIONS]
that's it. that's the whole vibe. you give her [OPTIONS] and she gives you a whole ass virtual machine. iconic behavior fr fr.
π¦ DESCRIPTION π¦
okay so. cloud-hypervisor is an open source Virtual Machine Monitor β a VMM, which is just the fancy name for the thing that runs your VMs β and she runs on top of KVM. putting it simply: KVM does the heavy hardware lifting, and cloud-hypervisor is the main character directing the whole production. π
her whole thing, her mission, is running modern, cloud workloads with paravirtualised I/O (virtio). and when she says modern she means it β she's targeting recent 64-bit CPUs on x86_64 and aarch64 architectures. so if you're out here on some ancient 32-bit situationβ¦ bestie she's not the one. π
and here's the part that's genuinely giving main character energy: you can configure the whole VMM entirely via command-line options, OR you can manage her at runtime through an HTTP API that's exposed over a UNIX domain socket. so like, set her up from the terminal and then keep steering her while she's running?? we love a flexible queen. π
oh and if you wanna talk to that HTTP API, check out ch-remote(1) β that's the bestie who handles the runtime management convo. iykyk. β¨
β¨ OPTIONS β¨
okay bestie, buckle up π this is the part where Cloud Hypervisor shows you literally everything it can do, and it can do a LOT. every single flag, every value, every default, all of it β no skips, no "you'll figure it out", fr fr.
--api-socketpath=<path>|fd=<fd>β the HTTP API socket, aka a UNIX domain socket π«Ά. hand it either apath=<path>on the filesystem or anfd=<fd>, which is a file descriptor you already have open.--balloonparams β balloon device parameters π (the memory that goes pshhh and inflates/deflates in the guest). Syntax:size=<balloon_size>,deflate_on_oom=on|off,free_page_reporting=on|off,iommu=on|off,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>--cmdlinestring β the kernel command line you're passing straight to the guest π». yes, that string, exactly.--consoleparams β control the (virtio) console setup πΈ. Syntax:off|null|pty|tty|file=<path>,iommu=on|off,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>. Default istty, bestie.--cpusparams β vCPU config, aka how many little brains your VM gets π§ β¨. Syntax:boot=<boot_vcpus>,max=<max_vcpus>,topology=<threads_per_core>:<cores_per_die>:<dies_per_package>:<packages>,kvm_hyperv=on|off,max_phys_bits=<maximum_number_of_physical_bits>,affinity=<list_of_vcpus_with_their_associated_cpuset>,features=<list_of_features_to_enable>,nested=on|off,core_scheduling=vm|vcpu|off. Default:boot=1,max_phys_bits=46.--debug-consoleparams β debug console config, the β¨extraβ¨ little channel for debugging. Syntax:off|pty|tty|file=<path>,iobase=<port_in_hex>. Default:off,iobase=0xe9.--deviceparams ... β direct device assignment (VFIO) parameters π₯. this one may be specified multiple times. Syntax:path=<device_path>,fd=<vfio_cdev_fd>,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>...]--diskparams ... β block device parameters πΎ, and yes you can specify it multiple times. 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>,bw_size=<bytes>,bw_one_time_burst=<bytes>,bw_refill_time=<ms>,ops_size=<io_ops>,ops_one_time_burst=<io_ops>,ops_refill_time=<ms>,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>,rate_limit_group=<group_id>,queue_affinity=<list_of_queue_indices_with_their_associated_cpuset>,serial=<serial_number>,backing_files=on|off,sparse=on|off,image_type=<raw,qcow2,vhd,vhdx>,lock_granularity=byte-range|full--event-monitorpath=<path>|fd=<fd>β where the event monitor writes its output π. give it either a filepath=<path>or a filefd=<fd>, and that's where events get reported.--firmwarepath β path to the firmware, loaded the architecture-specific way (think UEFI) π.--fsparams ... β virtio-fs device parameters π. may be specified multiple times. 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>--generic-vhost-userparams ... β generic vhost-user device parameters π¦. may be specified multiple times. 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>--initramfspath β path to an initramfs image to load into the guest π¦.--kernelpath β path to a kernel or firmware that supports a PVH entry point (likevmlinux) or the architecture equivalent π§.--landlockβ turn on Landlock-based filesystem sandboxing π. yes, it's giving secure.--landlock-rulesparams ... β Landlock rule parameters π§, may be specified multiple times. Syntax:path=<path/to/{file/dir}>,access=[rw]--log-filepath β where the log goes π. if you don't specify it, standard error gets it instead.--log-formatformat β the log format string π . common tokens include{boottime},{wallclock},{glog},{localglog},{thread},{level},{location},{msg}. Default:"cloud-hypervisor: {boottime}s: <{thread}> {level}:{location} -- {msg}".--memoryparams β guest memory configuration, the main character of resource allocation π. Syntax:size=<guest_memory_size>,mergeable=on|off,shared=on|off,hugepages=on|off,hugepage_size=<hugepage_size>,hotplug_method=acpi|virtio-mem,hotplug_size=<hotpluggable_memory_size>,hotplugged_size=<hotplugged_memory_size>,prefault=on|off,reserve=on|off,thp=on|off. Default:size=512M.--memory-zoneparams ... β user-defined memory zone parameters, may be specified multiple times ποΈ. Syntax:size=<guest_memory_region_size>,file=<backing_file>,shared=on|off,hugepages=on|off,hugepage_size=<hugepage_size>,host_numa_node=<node_id>,id=<zone_identifier>,hotplug_size=<hotpluggable_memory_size>,hotplugged_size=<hotplugged_memory_size>,prefault=on|off,reserve=on|off--netparams ... β network device parameters, may be specified multiple times πβ¨. 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=<vhost_user_enable>,socket=<vhost_user_socket_path>,vhost_mode=client|server,bw_size=<bytes>,bw_one_time_burst=<bytes>,bw_refill_time=<ms>,ops_size=<io_ops>,ops_one_time_burst=<io_ops>,ops_refill_time=<ms>,pci_segment=<segment_id>,pci_device_id=<pci_slot>,offload_tso=on|off,offload_ufo=on|off,offload_csum=on|off--no-shutdownβ do not exit the VMM process when the guest shuts down π. super handy for VMs you expect to reboot or that get managed externally.--numaparams ... β NUMA node configuration, may be specified multiple times π§©. Syntax:guest_numa_id=<node_id>,cpus=<cpus_id>,distances=<list_of_distances_to_destination_nodes>,device_id=<device_id>,memory_zones=<list_of_memory_zones>,pci_segments=<list_of_pci_segments>--pci-segmentparams ... β PCI segment parameters, may be specified multiple times π. Syntax:pci_segment=<segment_id>,mmio32_aperture_weight=<scale>,mmio64_aperture_weight=<scale>--platformparams β platform configuration parameters, all the DMI-flavored goodies π. Syntax:num_pci_segments=<num_pci_segments>,iommu_segments=<list_of_segments>,iommu_address_width=<bits>,iommufd=on|off,iommufd_fd=<fd>,vfio_p2p_dma=on|off,system_manufacturer=<dmi_system_manufacturer>,system_product_name=<dmi_system_product_name>,system_version=<dmi_system_version>,system_serial_number=<dmi_system_serial_number>,system_uuid=<dmi_system_uuid>,system_sku_number=<dmi_system_sku_number>,system_family=<dmi_system_family>,oem_strings=<list_of_strings>,chassis_asset_tag=<dmi_chassis_asset_tag>--pmemparams ... β persistent memory device parameters π, may be specified multiple times. 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>--pvpanicβ enables the pvpanic device π±, so the guest can tell the host about kernel panics. very "not me screaming for help" energy.--rate-limit-groupparams ... β rate limit group parameters β³, may be specified multiple times. Syntax:bw_size=<bytes>,bw_one_time_burst=<bytes>,bw_refill_time=<ms>,ops_size=<io_ops>,ops_one_time_burst=<io_ops>,ops_refill_time=<ms>,id=<device_id>--restoreparams β restore a VM from a 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
so source_url has to be a valid URL (like file:///foo/bar or tcp://192.168.1.10/foo), periodt. prefault controls eager prefaulting for the copy-based restore path, and it's disabled by default. memory_restore_mode=copy preserves the existing eager read-copy restore behavior, while memory_restore_mode=ondemand enables lazy demand paging β and heads up bestie, that one requires userfaultfd β οΈ. net_fds supplies new file descriptors for net devices backed by FDs. and resume controls whether the VM is resumed right after restore.
--rngparams β random number generator parameters π². Syntax:src=<entropy_source_path>,iommu=on|off,pci_segment=<segment_id>,pci_device_id=<pci_slot>. Default:src=/dev/urandom.--rtc[params] β virtio RTC device parameters β°. just passing--rtcwith no arguments at all enables the device with default settings, slay. Syntax:iommu=on|off,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>--seccomptrue|false|logβ seccomp filtering mode π‘οΈ. whentrue, system calls the VMM doesn't need are blocked. whenlog, violations get logged but not blocked. Default:true.--serialmode β serial port configuration π. Syntax:off|null|pty|tty|file=<path>|socket=<path>. Default:null.--tpmparams β TPM device parameters π. note: this requires an externalswtpm(8)instance. Syntax:socket=</path/to/a/socket>.--user-deviceparams ... β userspace device parameters, may be specified multiple times π§Έ. Syntax:socket=<socket_path>,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>.-v,-vv,-vvvβ crank up the verbosity of debugging output π. you can repeat it for even more detail. more v's, more tea.--vdpaparams ... β vDPA device parameters, may be specified multiple times π. Syntax:path=<device_path>,num_queues=<number_of_queues>,iommu=on|off,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>-V,--versionβ print version info and exit π·οΈ.--vsockparams β virtio VSOCK device parameters π. Syntax:cid=<context_id>,socket=<socket_path>,iommu=on|off,id=<device_id>,pci_segment=<segment_id>,pci_device_id=<pci_slot>--watchdogβ enable the virtio-watchdog device π. someone's gotta keep watch.-h,--helpβ print a help summary and exit πββοΈ. the classic.
β¨ EXAMPLES β¨
Okay bestie, this is the part where it all comes together π. Two full recipes, copy-paste energy, let's gooo.
π§ Boot a VM with a kernel image and a root disk
Classic direct-boot moment. No firmware, no drama, just kernel + rootfs:
cloud-hypervisor \
--kernel /path/to/vmlinux \
--disk path=/path/to/rootfs.img \
--cpus boot=2 \
--memory size=1G \
--cmdline "root=/dev/vda1 console=hvc0" \
--api-socket path=/tmp/ch.sock
Look at her. Two CPUs, one gig of RAM, a root disk, and a kernel that knows exactly where to find its root via root=/dev/vda1 and where to yell its logs via console=hvc0 π₯. And --api-socket drops a socket at /tmp/ch.sock so you can talk to her later like the main character she is. Periodt.
π¦ Boot a VM using UEFI firmware
Now the glow-up version β firmware instead of a raw kernel, plus networking because we're connected like that:
cloud-hypervisor \
--firmware /usr/share/OVMF/OVMF_CODE.fd \
--disk path=/path/to/disk.qcow2 \
--cpus boot=4 \
--memory size=4G \
--net tap=tap0,mac=12:34:56:78:90:ab \
--api-socket path=/tmp/ch.sock
Four CPUs, four gigs, a qcow2 disk, OVMF firmware doing its thing, and a tap interface named tap0 with the MAC 12:34:56:78:90:ab so she's on the network and everyone knows her name π
. Same API socket, same /tmp/ch.sock, same iconic energy.
Not me noticing both examples end with --api-socket path=/tmp/ch.sock β because managing your VM over a socket is just how it's done, iykyk π
π SEE ALSO π
Go read these next, bestie, they're the friend group: π«Ά
Project documentation: https://www.cloudhypervisor.org/ β
π AUTHORS π
The Cloud Hypervisor Authors. That's the whole squad, no individual shoutouts, just the collective. Iconic behaviour honestly π.
π LICENSE π
Apache-2.0 AND BSD-3-Clause β both of them, together, as a duo. Slay.
And that's the whole page, babe!! This was cloud-hypervisor 52.0.0, dated 2025-07-01, and you've officially read the entire CLOUD-HYPERVISOR(1) manual like the certified Unix main character you are. π¦β¨ Go boot something. π
πΈ
π¦ 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