mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Unix socket backend for serial port
Cloud-Hypervisor takes a path for Unix socket, where it will listen
on. Users can connect to the other end of the socket and access serial
port on the guest.
"--serial socket=/path/to/socket" is the cmdline option to pass to
cloud-hypervisor.
Users can use socat like below to access guest's serial port once the
guest starts to boot:
socat -,crnl UNIX-CONNECT:/path/to/socket
Signed-off-by: Praveen K Paladugu <prapal@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
399c596af8
commit
6d1077fc3c
@@ -440,6 +440,7 @@ pub enum ConsoleOutputMode {
|
||||
Pty,
|
||||
Tty,
|
||||
File,
|
||||
Socket,
|
||||
Null,
|
||||
}
|
||||
|
||||
@@ -450,6 +451,7 @@ pub struct ConsoleConfig {
|
||||
pub mode: ConsoleOutputMode,
|
||||
#[serde(default)]
|
||||
pub iommu: bool,
|
||||
pub socket: Option<PathBuf>,
|
||||
}
|
||||
|
||||
pub fn default_consoleconfig_file() -> Option<PathBuf> {
|
||||
@@ -555,6 +557,7 @@ pub fn default_serial() -> ConsoleConfig {
|
||||
file: None,
|
||||
mode: ConsoleOutputMode::Null,
|
||||
iommu: false,
|
||||
socket: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -563,6 +566,7 @@ pub fn default_console() -> ConsoleConfig {
|
||||
file: None,
|
||||
mode: ConsoleOutputMode::Tty,
|
||||
iommu: false,
|
||||
socket: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user