/cloud-hypervisor/docs/ |
H A D | hotplug.md | 8 or by using this kernel patch (available in 5.5-rc1 and later): https://git.kernel.org/pub/scm/linu… 12 Extra vCPUs can be added and removed from a running `cloud-hypervisor` instance. This is controlled… 21 $ sudo setcap cap_net_admin+ep ./cloud-hypervisor/target/release/cloud-hypervisor 22 $ ./cloud-hypervisor/target/release/cloud-hypervisor \ 23 --kernel custom-vmlinux.bin \ 24 --cmdline "console=ttyS0 console=hvc0 root=/dev/vda1 rw" \ 25 --disk path=focal-server-cloudimg-amd64.raw \ 26 --cpus boot=4,max=8 \ 27 --memory size=1024M \ 28 --net "tap=,mac=,ip=,mask=" \ [all …]
|
H A D | windows.md | 3 Starting with the release version [0.10.0](https://github.com/cloud-hypervisor/cloud-hypervisor/rel… 7 - Host with KVM enabled 8 - [UEFI](uefi.md) capable Windows guest image with Virtio drivers integrated 22 - QEMU, version >=5.0.0 is recommended. 23 - Windows installation ISO. Obtained through MSDN, Visual Studio subscription, evaluation center, e… 24 - [VirtIO driver ISO](https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virti… 25 - Suitable firmware for Cloud Hypervisor (`CLOUDHV.fd`) and for QEMU (`OVMF.fd`) 26 - With the suggested image size of 30G, there should be enough free disk space to hold the installa… 33 IMG_FILE=windows-disk.raw 35 VIRTIO_ISO_FILE=virtio-win-0.1.185.iso [all …]
|
H A D | vhost-user-net-testing.md | 1 # How to test Vhost-user net with OpenVSwitch/DPDK 3 The purpose of this document is to illustrate how to test vhost-user-net 4 in cloud-hypervisor with OVS/DPDK as the backend. This document was 10 …date the communication between two virtual machine, connecting them to vhost-user ports respective… 12 … +----+----------+ +-------------+-----------+-------------+ +----------+----+ 14 … | |vhost-user|----------| vhost-user | ovs | vhost-user |----------|vhost-user| | 17 … | +----------+ +-------------+-----------+-------------+ +----------+ | 21 …+--+---------------------------------------------------------------------------------------------+… 23 …| +---------------------------------------------------------------------------------------------+… 27 …+-------------------------------------------------------------------------------------------------… [all …]
|
H A D | vfio-user.md | 1 # Cloud Hypervisor VFIO-user HOWTO 3 …-user is an *experimental* protocol for allowing devices to be implemented in another process and … 5 The protocol is documented here: https://github.com/nutanix/libvfio-user/blob/master/docs/vfio-user… 7 …*. Not all Cloud Hypervisor functionality is supported in particular: virtio-mem and iommu are not… 11 …--user-device socket=<path>` parameter is used to create a vfio-user device when creating the VM s… 15 …re is a simple GPIO device included in the libvfio-user repository: https://github.com/nutanix/lib… 17 Run the example from the libvfio-user repository: 20 rm /tmp/vfio-user.sock 21 ./build/dbg/samples/gpio-pci-idio-16 -v /tmp/vfio-user.sock & 27 target/debug/cloud-hypervisor \ [all …]
|
H A D | api.md | 1 - [Cloud Hypervisor API](#cloud-hypervisor-api) 2 - [External API](#external-api) 3 - [REST API](#rest-api) 4 - [REST API Location and availability](#rest-api-location-and-availability) 5 - [REST API Endpoints](#rest-api-endpoints) 6 - [Virtual Machine Manager (VMM) Actions](#virtual-machine-manager-vmm-actions) 7 - [Virtual Machine (VM) Actions](#virtual-machine-vm-actions) 8 - [REST API Examples](#rest-api-examples) 9 - [Create a Virtual Machine](#create-a-virtual-machine) 10 - [Boot a Virtual Machine](#boot-a-virtual-machine) [all …]
|
H A D | vdpa.md | 3 vDPA aims at achieving bare-metal performance for devices passed into a virtual 8 the VIRTIO specification on their data-path, while the control path is vendor 11 vDPA framework, being exposed through the vhost interface as a vhost-vdpa 20 The official [website](https://vdpa-dev.gitlab.io/) contains some extensive 25 `VdpaConfig` (known as `--vdpa` from the CLI perspective) contains the list of 38 --vdpa <vdpa> vDPA device "path=<device_path>,num_queues=<number_of_queues>,iommu=on|off,id=<device… 43 Path of the vDPA device. Usually `/dev/vhost-vdpa-X`. 52 --vdpa path=/dev/vhost-vdpa-0 66 --vdpa path=/dev/vhost-vdpa-0,num_queues=2 81 --vdpa path=/dev/vhost-vdpa-0,id=vdpa0 [all …]
|
H A D | landlock.md | 19 Landlock should be enabled in Host kernel to use it with cloud-hypervisor. 20 Please following [Kernel-Support](https://docs.kernel.org/userspace-api/landlock.html#kernel-suppor… 25 $ sudo dmesg | grep -w landlock 32 At the time of enabling Landlock, Cloud-Hypervisor process needs the complete 37 Append `--landlock` to Cloud-Hypervisor's command line to enable Landlock 41 (ex: during hotplug), those paths can be passed using `--landlock-rules` command 71 ./cloud-hypervisor \ 72 --kernel ./linux-cloud-hypervisor/arch/x86/boot/compressed/vmlinux.bin \ 73 --disk path=focal-server-cloudimg-amd64.raw path=/tmp/ubuntu-cloudinit.img \ 74 --cmdline "console=hvc0 root=/dev/vda1 rw" \ [all …]
|
H A D | amd_sev_snp.md | 1 # AMD SEV-SNP 7 AMD Secure Encrypted Virtualization & Secure Nested Paging (SEV-SNP) is an AMD 8 technology designed to add strong memory integrity protection to help prevent 9 malicious hypervisor-based attacks like data replay, memory-remapping and more 13 - [SNP Homepage](https://www.amd.com/content/dam/amd/en/documents/epyc-business-docs/solution-brief… 14 more information about SEV-SNP technical aspects, design and specification. 18 It is required to use a machine which has enabled support for AMD SEV-SNP in 25 cargo build --no-default-features --features "sev_snp" 31 You can run a SEV-SNP VM using the following command: 34 ./cloud-hypervisor \ [all …]
|
H A D | macvtap-bridge.md | 12 sudo ip link add link "$host_net" name macvtap0 type macvtap 23 # Use --net fd=3 to point to fd 3 which the shell has opened to point to the /dev/tapN device 24 target/debug/cloud-hypervisor \ 25 --kernel ~/src/linux/vmlinux \ 26 --disk path=~/workloads/focal.raw \ 27 --cpus boot=1 --memory size=512M \ 28 --cmdline "root=/dev/vda1 console=hvc0" \ 29 --net fd=3,mac=$mac 3<>$"$tapdevice"
|
H A D | iommu.md | 50 ## Why virtio-iommu? 52 The Cloud Hypervisor project decided to implement the brand new virtio-iommu 59 ## Pre-requisites 63 As of Kernel 5.14, virtio-iommu is available for both X86-64 and Aarch64. 68 virtio-iommu device and expose it through the ACPI IORT table. This can be 78 Refer to the command line `--help` to find out which device support to be 81 Below is a simple example exposing the `virtio-blk` device as attached to the 85 ./cloud-hypervisor \ 86 --cpus boot=1 \ 87 --memory size=512M \ [all …]
|
H A D | vfio.md | 4 access to userspace. `cloud-hypervisor`, as many VMMs do, uses the VFIO 9 To assign a device to a `cloud-hypervisor` guest, the device needs to be managed 14 it to `cloud-hypervisor` for assigning it to a guest. 21 `cloud-hypervisor` only supports assigning PCI devices to its guests. `lspci` 36 First we add VFIO support to the host: 39 # modprobe -r vfio_pci 40 # modprobe -r vfio_iommu_type1 45 In case the VFIO drivers are built-in, enable unsafe interrupts with: 61 $ lspci -n -s 01:00.0 64 # echo 10ec 525a > /sys/bus/pci/drivers/vfio-pci/new_id [all …]
|
/cloud-hypervisor/vmm/src/api/openapi/ |
H A D | cloud-hypervisor.yaml | 4 description: Local HTTP based API for managing and inspecting a cloud-hypervisor virtual machine. 7 url: http://www.apache.org/licenses/LICENSE-2.0.html 11 - url: http://localhost/api/v1 27 summary: Shuts the cloud-hypervisor VMM. 35 summary: Returns general information about the cloud-hypervisor Virtual Machine (VM) instance. 57 …summary: Create the cloud-hypervisor Virtual Machine (VM) instance. The instance is not booted, on… 72 summary: Delete the cloud-hypervisor Virtual Machine (VM) instance. 136 /vm.power-button: 139 operationId: power-buttonVM 166 /vm.resize-zone: [all …]
|
/cloud-hypervisor/src/bin/ |
H A D | ch-remote.rs | 3 // SPDX-License-Identifier: Apache-2.0 48 #[error("Error parsing disk syntax")] 79 fn vmm_ping(&self) -> zbus::Result<String>; in vmm_ping() 80 fn vmm_shutdown(&self) -> zbus::Result<()>; in vmm_shutdown() 81 fn vm_add_device(&self, device_config: &str) -> zbus::Result<Optional<String>>; in vm_add_device() 82 fn vm_add_disk(&self, disk_config: &str) -> zbus::Result<Optional<String>>; in vm_add_disk() 83 fn vm_add_fs(&self, fs_config: &str) -> zbus::Result<Optional<String>>; in vm_add_fs() 84 fn vm_add_net(&self, net_config: &str) -> zbus::Result<Optional<String>>; in vm_add_net() 85 fn vm_add_pmem(&self, pmem_config: &str) -> zbus::Result<Optional<String>>; in vm_add_pmem() 86 fn vm_add_user_device(&self, vm_add_user_device: &str) -> zbus::Result<Optional<String>>; in vm_add_user_device() [all …]
|
/cloud-hypervisor/vmm/src/ |
H A D | config.rs | 3 // SPDX-License-Identifier: Apache-2.0 32 #[error("Error parsing --fs: tag missing")] 35 #[error("Error parsing --fs: max tag length is {VIRTIO_FS_TAG_LEN}")] 38 #[error("Error parsing --fs: socket missing")] 41 #[error("Error parsing --pmem: file missing")] 44 #[error("Error parsing --vsock: socket missing")] 47 #[error("Error parsing --vsock: cid missing")] 50 #[error("Error parsing --restore: source_url missing")] 53 #[error("Error parsing --cpus")] 56 #[error("Invalid feature in --cpus features list: {0}")] [all …]
|
H A D | device_manager.rs | 4 // Use of this source code is governed by a BSD-style license that can be 5 // found in the LICENSE-BSD-3-Clause file. 9 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause 148 const VIRTIO_PCI_DEVICE_NAME_PREFIX: &str = "_virtio-pci"; 157 /// Cannot open disk path 158 #[error("Cannot open disk path")] 159 Disk(#[source] io::Error), enumerator 161 /// Cannot create vhost-user-net device 162 #[error("Cannot create vhost-user-net device")] 165 /// Cannot create virtio-blk device [all …]
|
H A D | vm.rs | 6 // Use of this source code is governed by a BSD-style license that can be 7 // found in the LICENSE-BSD-3-Clause file. 11 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause 219 #[error("Too many virtio-vsock devices")] 259 #[error("Error enabling SEV-SNP VM")] 336 #[error("Error locking disk images: Another instance likely holds a lock")] 351 fn valid_transition(self, new_state: VmState) -> Result<()> { in valid_transition() 396 fn guest_mem_write(&self, gpa: u64, buf: &[u8]) -> result::Result<usize, HypervisorVmError> { in guest_mem_write() 403 fn guest_mem_read(&self, gpa: u64, buf: &mut [u8]) -> result::Result<usize, HypervisorVmError> { in guest_mem_read() 410 fn mmio_read(&self, gpa: u64, data: &mut [u8]) -> result::Result<(), HypervisorVmError> { in mmio_read() [all …]
|
H A D | lib.rs | 3 // SPDX-License-Identifier: Apache-2.0 132 /// Cannot create D-Bus thread 134 #[error("Error spawning D-Bus thread")] 137 /// Cannot start D-Bus session 139 #[error("Error starting D-Bus session")] 142 /// Cannot create `event-monitor` thread 143 #[error("Error spawning `event-monitor` thread")] 179 // TODO We should add #[source] here once the type implements Error. 230 fn from(v: u64) -> Self { in from() 249 fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> { in read() [all …]
|
/cloud-hypervisor/tests/ |
H A D | integration.rs | 3 // SPDX-License-Identifier: Apache-2.0 7 // hence have known dead-code. This annotation silences dead-code 36 pub const FOCAL_IMAGE_NAME: &str = "focal-server-cloudimg-amd64-custom-20210609-0.raw"; 38 "jammy-server-cloudimg-amd64-custom-vfio-20241012-0.raw"; 39 pub const FOCAL_IMAGE_NAME_QCOW2: &str = "focal-server-cloudimg-amd64-custom-20210609-0.qcow2"; 41 "focal-server-cloudimg-amd64-custom-20210609-0-backing.qcow2"; 42 pub const FOCAL_IMAGE_NAME_VHD: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhd"; 43 pub const FOCAL_IMAGE_NAME_VHDX: &str = "focal-server-cloudimg-amd64-custom-20210609-0.vhdx"; 44 pub const JAMMY_IMAGE_NAME: &str = "jammy-server-cloudimg-amd64-custom-20241017-0.raw"; 45 pub const WINDOWS_IMAGE_NAME: &str = "windows-server-2022-amd64-2.raw"; [all …]
|
/cloud-hypervisor/ |
H A D | README.md | 1 - [1. What is Cloud Hypervisor?](#1-what-is-cloud-hypervisor) 2 - [Objectives](#objectives) 3 - [High Level](#high-level) 4 - [Architectures](#architectures) 5 - [Guest OS](#guest-os) 6 - [2. Getting Started](#2-getting-started) 7 - [Host OS](#host-os) 8 - [Use Pre-built Binaries](#use-pre-built-binaries) 9 - [Packages](#packages) 10 - [Building from Source](#building-from-source) [all …]
|
H A D | release-notes.md | 1 - [v46.0](#v460) 2 - [File-level Locking Support with `--disk`](#file-level-locking-support-with---disk) 3 - [Improved Error Reporting with VM Resizing](#improved-error-reporting-with-vm-resizing) 4 - [IPv6 Address Support with `--net`](#ipv6-address-support-with---net) 5 …- [Experimental AArch64 Support with the MSHV Hypervisor](#experimental-aarch64-support-with-the-m… 6 - [Deprecated SGX Support](#deprecated-sgx-support) 7 - [Notable Bug Fixes](#notable-bug-fixes) 8 - [Contributors](#contributors) 9 - [v45.0](#v450) 10 - [Experimental `riscv64` Architecture Support](#experimental-riscv64-architecture-support) [all …]
|
/cloud-hypervisor/src/ |
H A D | main.rs | 3 // SPDX-License-Identifier: Apache-2.0 40 #[cfg(feature = "dhat-heap")] 71 #[error("Error parsing --api-socket")] 73 #[error("Error parsing --event-monitor")] 76 #[error("`--dbus-object-path` option isn't provided")] 79 #[error("`--dbus-service-name` option isn't provided")] 81 #[error("Error parsing --event-monitor: path or fd required")] 88 #[error("Error parsing --gdb")] 91 #[error("Error parsing --gdb: path required")] 123 fn enabled(&self, _metadata: &log::Metadata) -> bool { in enabled() [all …]
|
/cloud-hypervisor/vmm/src/api/http/ |
H A D | mod.rs | 3 // SPDX-License-Identifier: Apache-2.0 75 /// The error message contained in the response is supposed to be user-facing, 78 pub fn error_response(error: HttpError, status: StatusCode) -> Response { in error_response() 85 // See <https://github.com/rust-lang/rust/issues/141673> in error_response() 112 ) -> Response { in handle_request() 149 ) -> std::result::Result<Option<Body>, HttpError> { in put_handler() 158 ) -> std::result::Result<Option<Body>, HttpError> { in get_handler() 175 /// HTTP_ROUTES contain all the cloud-hypervisor HTTP routes. 182 endpoint!("/vm.add-device"), 186 endpoint!("/vm.add-user-device"), [all …]
|
/cloud-hypervisor/vm-migration/src/ |
H A D | lib.rs | 3 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause 52 #[error("Failed to release a disk lock before the migration")] 59 fn pause(&mut self) -> std::result::Result<(), MigratableError> { in pause() 64 fn resume(&mut self) -> std::result::Result<(), MigratableError> { in resume() 82 pub fn to_state<'a, T>(&'a self) -> Result<T, MigratableError> in to_state() 91 pub fn new_from_state<T>(state: &T) -> Result<Self, MigratableError> in new_from_state() 106 /// through the snapshots field, which is basically their sub-components. 126 pub fn from_data(data: SnapshotData) -> Self { in from_data() 134 pub fn new_from_state<T>(state: &T) -> Result<Self, MigratableError> in new_from_state() 141 /// Add a sub-component's Snapshot to the Snapshot. [all …]
|
/cloud-hypervisor/test_infra/src/ |
H A D | lib.rs | 3 // SPDX-License-Identifier: Apache-2.0 91 pub fn wait_vm_boot(&self, custom_timeout: Option<i32>) -> Result<(), WaitForBootError> { in wait_vm_boot() 93 …// The 'port' is unique per 'GUEST' and listening to wild-card ip avoids retrying on 'TcpListener:… in wait_vm_boot() 102 let mut closure = || -> Result<(), WaitForBootError> { in wait_vm_boot() 107 .expect("Cannot set non-blocking for tcp listener"); in wait_vm_boot() 119 .expect("Cannot add 'tcp_listener' event to epoll"); in wait_vm_boot() 184 fn prepare_cloudinit(&self, tmp_dir: &TempDir, network: &GuestNetworkConfig) -> String; in prepare_cloudinit() 185 fn disk(&self, disk_type: DiskType) -> Option<String>; in disk() method 196 pub fn new(image_name: String) -> Self { in new() 214 pub fn new(image_name: String) -> Self { in new() [all …]
|
/cloud-hypervisor/block/src/qcow/ |
H A D | mod.rs | 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE-BSD-3-Clause file. 5 // SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause 33 /// Nesting depth limit for disk formats that can open other disk files. 75 #[error("Maximum disk nesting depth exceeded")] 151 // bits 0-8 and 56-63 are reserved. 194 // Post-header entries 200 pub fn new(f: &mut RawFile) -> Result<QcowHeader> { in new() 208 fn read_u32_from_file(f: &mut RawFile) -> Result<u32> { in new() 213 fn read_u64_from_file(f: &mut RawFile) -> Result<u64> { in new() [all …]
|