mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vm-virtio: Enable the vmm support for virtio-console
To use the implemented virtio console device, the users can select one
of the three options ("off", "tty" or "file=/path/to/the/file") with
the command line argument "--console". By default, the console is
enabled as a device named "hvc0" (option: tty). When "off" option is
used, the console device is not added to the VM configuration at all.
Signed-off-by: A K M Fazla Mehrab <fazla.mehrab.akm@intel.com>
This commit is contained in:
committed by
Rob Bradford
parent
577d44c8eb
commit
24438e0390
@@ -92,6 +92,12 @@ fn main() {
|
||||
Arg::with_name("serial")
|
||||
.long("serial")
|
||||
.help("Control serial port: off|tty|file=/path/to/a/file")
|
||||
.default_value("off"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("console")
|
||||
.long("console")
|
||||
.help("Control (virtio) console: off|tty|file=/path/to/a/file")
|
||||
.default_value("tty"),
|
||||
)
|
||||
.get_matches();
|
||||
@@ -109,6 +115,7 @@ fn main() {
|
||||
|
||||
let disks: Option<Vec<&str>> = cmd_arguments.values_of("disk").map(|x| x.collect());
|
||||
let net: Option<Vec<&str>> = cmd_arguments.values_of("net").map(|x| x.collect());
|
||||
let console = cmd_arguments.value_of("console").unwrap();
|
||||
let fs: Option<Vec<&str>> = cmd_arguments.values_of("fs").map(|x| x.collect());
|
||||
let pmem: Option<Vec<&str>> = cmd_arguments.values_of("pmem").map(|x| x.collect());
|
||||
|
||||
@@ -123,6 +130,7 @@ fn main() {
|
||||
fs,
|
||||
pmem,
|
||||
serial,
|
||||
console,
|
||||
}) {
|
||||
Ok(config) => config,
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user