/cloud-hypervisor/docs/ |
H A D | hotplug.md | 30 --api-socket=/tmp/ch-socket 34 Notice the addition of `--api-socket=/tmp/ch-socket` and a `max` parameter on `--cpus boot=4,max=8`. 39 ./ch-remote --api-socket=/tmp/ch-socket resize --cpus 8 59 ./ch-remote --api-socket=/tmp/ch-socket resize --cpus 2 88 --api-socket=/tmp/ch-socket 101 ./ch-remote --api-socket=/tmp/ch-socket resize --memory 3G 137 --api-socket=/tmp/ch-socket 144 ./ch-remote --api-socket=/tmp/ch-socket resize --memory 3G 175 --api-socket=/tmp/ch-socket 178 Notice the addition of `--api-socket=/tmp/ch-socket`. [all …]
|
H A D | live_migration.md | 22 --serial tty --console off --api-socket=/tmp/api1 28 $ target/release/cloud-hypervisor --api-socket=/tmp/api2 34 $ target/release/ch-remote --api-socket=/tmp/api2 receive-migration unix:/tmp/sock 40 $ target/release/ch-remote --api-socket=/tmp/api1 send-migration --local unix:/tmp/sock 75 ### Unix Socket Migration 77 If Unix socket is selected for migration, we can tunnel traffic through "socat". 84 dst $ cloud-hypervisor --api-socket /tmp/api 90 dst $ ch-remote --api-socket=/tmp/api receive-migration unix:/tmp/sock 93 In yet another terminal, forward TCP connections to the Unix domain socket: 110 --api-socket /tmp/api [all …]
|
H A D | snapshot_restore.md | 17 --api-socket /tmp/cloud-hypervisor.sock \ 28 ./ch-remote --api-socket=/tmp/cloud-hypervisor.sock pause 35 ./ch-remote --api-socket=/tmp/cloud-hypervisor.sock snapshot file:///home/foo/snapshot 71 --api-socket /tmp/cloud-hypervisor.sock \ 79 ./cloud-hypervisor --api-socket /tmp/cloud-hypervisor.sock 82 ./ch-remote --api-socket=/tmp/cloud-hypervisor.sock restore source_url=file:///home/foo/snapshot 90 ./ch-remote --api-socket=/tmp/cloud-hypervisor.sock resume 102 ./cloud-hypervisor --api-socket /tmp/cloud-hypervisor.sock 105 ./ch-remote --api-socket=/tmp/cloud-hypervisor.sock restore source_url=file:///home/foo/snapshot ne…
|
H A D | vfio-user.md | 3 …wing devices to be implemented in another process and communicate over a socket; ie.e VFIO-user is… 11 …socket=<path>` parameter is used to create a vfio-user device when creating the VM specifying the … 32 --user-device socket=/tmp/vfio-user.sock 48 Create an NVMe controller listening on a vfio-user socket with a simple AIO block device in spdk. 78 --user-device socket=/tmp/nvme-vfio-user/cntrl
|
H A D | tpm.md | 11 This argument takes an UNIX domain Socket as a `socket` value. 24 --tpm socket="/var/run/swtpm.socket" 29 process should be started to listen at the input socket. Below is an 33 swtpm socket --tpmstate dir=/var/run/swtpm \ 34 --ctrl type=unixio,path="/var/run/swtpm.socket" \
|
H A D | vsock.md | 3 VSOCK provides a way for guest and host to communicate through a socket. `cloud-hypervisor` only su… 46 --vsock cid=3,socket=/tmp/ch.vsock 65 …socket on the host side. The UNIX socket path has to be constructed by using the socket path used …
|
H A D | landlock.md | 87 --api-socket /tmpXXXX/ch.socket \ 97 ./ch-remote --api-socket /tmpXXXX/ch.socket \
|
H A D | api.md | 54 through either a local UNIX socket as given in the Cloud Hypervisor option `--api-socket path=...` 55 or a fd with `--api-socket fd=...`. 58 $ ./target/debug/cloud-hypervisor --api-socket path=/tmp/cloud-hypervisor.sock 123 $ ./target/debug/cloud-hypervisor --api-socket /tmp/cloud-hypervisor.sock 148 curl --unix-socket /tmp/cloud-hypervisor.sock -i \ 168 curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1/vm.boot' 178 curl --unix-socket /tmp/cloud-hypervisor.sock -i \ 190 curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1/vm.reboot' 200 curl --unix-socket /tmp/cloud-hypervisor.sock -i -X PUT 'http://localhost/api/v1/vm.shutdown' 386 curl --unix-socket /tmp/cloud-hypervisor.sock -i \
|
H A D | virtiofs-root.md | 68 sudo virtiofsd --socket-path=$PWD/virtiofs-rootfs.sock --shared-dir=$PWD/rootfs --cache=never & 72 --fs tag=/dev/root,socket=$PWD/virtiofs-rootfs.sock \ 75 --api-socket $PWD/ch.sock \
|
H A D | vhost-user-net-testing.md | 63 ovs-vsctl set Open_vSwitch . other_config:dpdk-socket-mem=1024 86 VMs run in client mode. They connect to the socket created by the `dpdkvhostuser` backend. 95 … --net mac=52:54:00:02:d9:01,vhost_user=true,socket=/tmp/vhost-user1,num_queues=4,vhost_mode=server 104 … --net mac=52:54:20:11:C5:02,vhost_user=true,socket=/tmp/vhost-user2,num_queues=4,vhost_mode=server
|
/cloud-hypervisor/api_client/src/ |
H A D | lib.rs | 14 #[error("Error writing to or reading from HTTP socket")] 15 Socket(#[source] std::io::Error), enumerator 92 fn parse_http_response(socket: &mut dyn Read) -> Result<Option<String>, Error> { in parse_http_response() 98 let count = socket.read(&mut bytes).map_err(Error::Socket)?; in parse_http_response() 142 socket: &mut T, in simple_api_full_command_with_fds_and_response() 148 socket in simple_api_full_command_with_fds_and_response() 159 socket in simple_api_full_command_with_fds_and_response() 161 .map_err(Error::Socket)?; in simple_api_full_command_with_fds_and_response() 164 socket.write_all(b"\r\n").map_err(Error::Socket)?; in simple_api_full_command_with_fds_and_response() 167 socket in simple_api_full_command_with_fds_and_response() [all …]
|
/cloud-hypervisor/tpm/src/ |
H A D | socket.rs | 16 #[error("Cannot connect to tpm Socket")] 18 #[error("Failed to read from socket")] 20 #[error("Failed to write to socket")] 69 Error::ConnectToSocket(anyhow!("Failed to connect to tpm Socket. Error: {:?}", e)) in connect() 74 debug!("Connected to tpm socket path : {:?}", socket_path); in connect() 95 Error::WriteToSocket(anyhow!("Failed to write to Socket. Error: {:?}", e)) in send_full() 104 "Stream for tpm socket was not initialized" in write() 119 "TPM Socket was not in Connected State" in write() 127 "Stream for tpm socket was not initialized" in read() 130 let mut socket = self.stream.as_ref().unwrap(); in read() localVariable [all …]
|
H A D | emulator.rs | 14 use crate::socket::SocketDev; 86 /// * `path` - A path to the Unix Domain Socket swtpm is listening on 91 "The input TPM Socket path: {:?} does not exist", in new() 95 let mut socket = SocketDev::new(); in new() localVariable 96 socket.init(path).map_err(|e| { in new() 102 control_socket: socket, in new() 126 /// Create socketpair, assign one socket/FD as data_fd to Control Socket 127 /// The other socket/FD will be assigned to msg_fd, which will be sent to swtpm 164 "Failed to set receive timeout on data fd socket. Error Code {:?}", in prepare_data_fd() 319 /// Function to write to data socket and read the response from it
|
/cloud-hypervisor/virtio-devices/src/vsock/unix/ |
H A D | mod.rs | 51 /// Error accepting a new connection from the host-side Unix socket. 52 #[error("Error accepting a new connection from the host-side Unix socket")] 54 /// Error binding to the host-side Unix socket. 55 #[error("Error binding to the host-side Unix socket")] 57 /// Error connecting to a host-side Unix socket. 58 #[error("Error connecting to a host-side Unix socket")] 60 /// Error reading from host-side Unix socket. 61 #[error("Error reading from host-side Unix socket")]
|
/cloud-hypervisor/vmm/src/ |
H A D | lib.rs | 108 /// Cannot bind to the UNIX domain socket path 109 #[error("Error binding to UNIX domain socket")] 184 /// Error binding API server socket 185 #[error("Error creation API server's socket")] 828 socket: &mut T, in vm_receive_config() 837 socket in vm_receive_config() 909 Response::ok().write_to(socket)?; in vm_receive_config() 917 socket: &mut T, in vm_receive_state() 926 socket in vm_receive_state() 974 Response::error().write_to(socket).ok(); in vm_receive_state() [all …]
|
H A D | serial_manager.rs | 62 /// Cannot bind to Unix socket 63 #[error("Error binding to socket")] 66 /// Cannot accept connection from Unix socket 78 /// Cannot remove the serial socket 79 #[error("Error removing serial socket")] 93 Socket = 2, enumerator 104 2 => Socket, in from() 128 socket: Option<PathBuf>, in new() 162 ConsoleOutput::Socket(ref fd) => { in new() 163 if let Some(path_in_socket) = socket { in new() [all …]
|
H A D | config.rs | 37 /// Filesystem socket is missing 38 #[error("Error parsing --fs: socket missing")] 43 /// Missing vsock socket path parameter. 44 #[error("Error parsing --vsock: socket missing")] 139 /// Missing socket for userspace device 140 #[error("Error parsing --user-device: socket missing")] 176 /// Missing socket path for console 177 #[error("Path missing when using socket console mode")] 186 /// Both socket and path specified 187 #[error("Disk path and vhost socket both provided")] [all …]
|
H A D | console_devices.rs | 39 /// No socket option support for console device 40 #[error("No socket option support for console device")] 64 Socket(Arc<UnixListener>), enumerator 227 ConsoleOutputMode::Socket => { in pre_create_console_devices() 262 ConsoleOutputMode::Socket => { in pre_create_console_devices() 263 let listener = UnixListener::bind(vmconfig.serial.socket.as_ref().unwrap()) in pre_create_console_devices() 265 ConsoleOutput::Socket(Arc::new(listener)) in pre_create_console_devices() 290 ConsoleOutputMode::Socket => { in pre_create_console_devices()
|
H A D | vm_config.rs | 448 pub socket: PathBuf, field 469 landlock.add_rule_with_access(self.socket.to_path_buf(), "rw")?; in apply_landlock() 503 Socket, enumerator 514 pub socket: Option<PathBuf>, field 526 if let Some(socket) = &self.socket { in apply_landlock() 527 landlock.add_rule_with_access(socket.to_path_buf(), "rw")?; in apply_landlock() 594 pub socket: PathBuf, field 603 landlock.add_rule_with_access(self.socket.to_path_buf(), "rw")?; in apply_landlock() 635 pub socket: PathBuf, field 646 landlock.add_rule_with_access(self.socket.to_path_buf(), "rw")?; in apply_landlock() [all …]
|
/cloud-hypervisor/src/bin/ |
H A D | ch-remote.rs | 267 fn rest_api_do_command(matches: &ArgMatches, socket: &mut UnixStream) -> ApiResult { in rest_api_do_command() 270 simple_api_command(socket, "PUT", "boot", None).map_err(Error::HttpApiClient) in rest_api_do_command() 273 simple_api_command(socket, "PUT", "delete", None).map_err(Error::HttpApiClient) in rest_api_do_command() 275 Some("shutdown-vmm") => simple_api_full_command(socket, "PUT", "vmm.shutdown", None) in rest_api_do_command() 278 simple_api_command(socket, "PUT", "resume", None).map_err(Error::HttpApiClient) in rest_api_do_command() 281 simple_api_command(socket, "PUT", "power-button", None).map_err(Error::HttpApiClient) in rest_api_do_command() 284 simple_api_command(socket, "PUT", "reboot", None).map_err(Error::HttpApiClient) in rest_api_do_command() 287 simple_api_command(socket, "PUT", "pause", None).map_err(Error::HttpApiClient) in rest_api_do_command() 290 simple_api_command(socket, "GET", "info", None).map_err(Error::HttpApiClient) in rest_api_do_command() 293 simple_api_command(socket, "GET", "counters", None).map_err(Error::HttpApiClient) in rest_api_do_command() [all …]
|
/cloud-hypervisor/vhost_user_net/src/ |
H A D | lib.rs | 57 /// No socket provided. 58 #[error("No socket provided")] 69 \"ip=<ip_addr>,mask=<net_mask>,socket=<socket_path>,client=on|off,\ 280 pub socket: String, field 299 .add("socket") in parse() 326 let socket = parser.get("socket").ok_or(Error::SocketParameterMissing)?; in parse() localVariable 338 socket, in parse() 395 net_daemon.start_client(&backend_config.socket) in start_net_backend() 397 net_daemon.start(Listener::new(&backend_config.socket, true).unwrap()) in start_net_backend()
|
/cloud-hypervisor/src/ |
H A D | main.rs | 71 #[error("Error parsing --api-socket")] 190 Arg::new("api-socket") in get_cli_options_sorted() 191 .long("api-socket") in get_cli_options_sorted() 192 .help("HTTP API socket (UNIX domain socket): path=</path/to/a/file> or fd=<fd>.") in get_cli_options_sorted() 275 .help("GDB socket (UNIX domain socket): path=</path/to/a/file>") in get_cli_options_sorted() 413 … .help("Control serial port: off|null|pty|tty|file=</path/to/a/file>|socket=</path/to/a/file>") in get_cli_options_sorted() 509 if let Some(socket_config) = cmd_arguments.get_one::<String>("api-socket") { in start_vmm() 524 .get_one::<String>("api-socket") in start_vmm() 995 socket: None, in test_valid_vm_config_default() 1001 socket: None, in test_valid_vm_config_default() [all …]
|
/cloud-hypervisor/vhost_user_block/src/ |
H A D | lib.rs | 73 /// No socket provided 74 #[error("No socket provided")] 79 \"path=<image_path>,socket=<socket_path>,num_queues=<number_of_queues>,\ 441 socket: String, field 458 .add("socket") in parse() 477 let socket = parser.get("socket").ok_or(Error::SocketParameterMissing)?; in parse() localVariable 490 socket, in parse() 526 let listener = Listener::new(&backend_config.socket, true).unwrap(); in start_block_backend()
|
/cloud-hypervisor/vmm/src/api/openapi/ |
H A D | cloud-hypervisor.yaml | 1006 - socket 1012 socket: 1055 socket: 1059 enum: ["Off", "Pty", "Tty", "File", "Socket", "Null"] 1097 - socket 1100 socket: 1126 - socket 1134 socket: 1136 description: Path to UNIX domain socket, used to proxy vsock connections. 1278 - socket [all …]
|
/cloud-hypervisor/net_util/src/ |
H A D | lib.rs | 43 #[error("Failed to create a socket")] 64 /// an opaque sockaddr suitable for usage by socket ioctls. 87 let sock = unsafe { libc::socket(domain, libc::SOCK_DGRAM, 0) }; in create_inet_socket() 98 let sock = unsafe { libc::socket(libc::AF_UNIX, libc::SOCK_DGRAM, 0) }; in create_unix_socket()
|