Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
fix(cua-sdk): the QEMU monitor listens on a private socket and the display asks for a password (#6301)
ddupont504c0a4828d2
diff --git a/libs/cua/crates/cua-cli/tests/cache.rs b/libs/cua/crates/cua-cli/tests/cache.rsindex 3705a393a4..e2bfe2421d 100644--- a/libs/cua/crates/cua-cli/tests/cache.rs+++ b/libs/cua/crates/cua-cli/tests/cache.rs@@ -48,6 +48,8 @@ fn qemu_state(h: &Home, name: &str, disk: &Path, created_at: u64) {ports: Default::default(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,accel: String::new(),ssh: None,diff --git a/libs/cua/crates/cua-disk/tests/gc.rs b/libs/cua/crates/cua-disk/tests/gc.rsindex abead734e1..9808a0fca6 100644--- a/libs/cua/crates/cua-disk/tests/gc.rs+++ b/libs/cua/crates/cua-disk/tests/gc.rs@@ -80,6 +80,8 @@ fn qemu_sandbox(l: &Layout, name: &str, backing: &Path) {ports: Default::default(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,accel: String::new(),ssh: None,diff --git a/libs/cua/crates/cua-vmm/src/qemu/args.rs b/libs/cua/crates/cua-vmm/src/qemu/args.rsindex 3f85398c03..ab8a7ce627 100644--- a/libs/cua/crates/cua-vmm/src/qemu/args.rs+++ b/libs/cua/crates/cua-vmm/src/qemu/args.rs@@ -67,6 +67,11 @@ pub struct LaunchConfig {pub restrict_network: bool,pub vnc_display: Option<u16>,pub qmp_port: u16,+ /// QMP on this chardev instead of `qmp_port`: `unix:<path>` or+ /// `pipe:<name>` (Windows).+ pub qmp_listen: Option<String>,+ /// The display asks for a password (set over QMP once QEMU runs).+ pub vnc_password: bool,pub serial_log: Option<PathBuf>,pub pidfile: Option<PathBuf>,pub daemonize: bool,@@ -352,10 +357,12 @@ pub fn build(cfg: &LaunchConfig) -> Vec<String> {// Management.let mut push = |xs: &[&str]| a.extend(xs.iter().map(|s| s.to_string()));- push(&[- "-qmp",- &format!("tcp:127.0.0.1:{},server=on,wait=off", cfg.qmp_port),- ]);+ let qmp = match cfg.qmp_listen.as_deref() {+ Some(a) if a.starts_with("pipe:") => a.to_string(),+ Some(a) => format!("{a},server=on,wait=off"),+ None => format!("tcp:127.0.0.1:{},server=on,wait=off", cfg.qmp_port),+ };+ push(&["-qmp", &qmp]);match &cfg.serial_log {Some(p) => push(&["-serial", &format!("file:{}", p.display())]),None => push(&["-serial", "none"]),@@ -401,6 +408,7 @@ fn display(a: &mut Vec<String>, cfg: &LaunchConfig) {None => push(&["-display", "none"]),}match cfg.vnc_display {+ Some(d) if cfg.vnc_password => push(&["-vnc", &format!("127.0.0.1:{d},password=on")]),Some(d) => push(&["-vnc", &format!("127.0.0.1:{d}")]),None => push(&["-vnc", "none"]),}@@ -445,6 +453,8 @@ mod tests {restrict_network: false,vnc_display: Some(3),qmp_port: 4444,+ qmp_listen: None,+ vnc_password: false,serial_log: Some(PathBuf::from("/s/vm1/serial.log")),pidfile: Some(PathBuf::from("/s/vm1/qemu.pid")),daemonize: true,@@ -459,6 +469,40 @@ mod tests {}}+ /// Nothing the guest's user-mode network can reach through its host+ /// alias (`10.0.2.2` is the host's loopback) controls QEMU: QMP is a+ /// unix socket or named pipe, the display asks for a password, and no+ /// monitor, chardev or debug stub listens on TCP. Only the guest's own+ /// forwards do.+ #[test]+ fn no_control_channel_listens_on_tcp() {+ for listen in ["unix:/s/vm1/qmp.sock", "pipe:cua-qmp-0123456789abcdef"] {+ let mut c = cfg(Arch::X86_64, "kvm");+ c.qmp_listen = Some(listen.into());+ c.vnc_password = true;+ let a = build(&c);+ let qmp = a+ .windows(2)+ .find(|w| w[0] == "-qmp")+ .map(|w| w[1].clone())+ .unwrap();+ assert!(qmp.starts_with(listen), "{qmp}");+ assert!(has(&a, ["-vnc", "127.0.0.1:3,password=on"]), "{a:?}");+ for (i, x) in a.iter().enumerate() {+ let flag = i.checked_sub(1).map(|p| a[p].as_str()).unwrap_or_default();+ if flag == "-netdev" {+ continue; // the guest's own forwards+ }+ assert!(!x.contains("tcp:"), "{flag} {x}");+ assert!(!x.contains("telnet:"), "{flag} {x}");+ }+ for flag in ["-gdb", "-s", "-spice"] {+ assert!(!a.iter().any(|x| x == flag), "{flag} in {a:?}");+ }+ assert!(has(&a, ["-monitor", "none"]), "{a:?}");+ }+ }+#[test]fn headless_has_no_display_input_or_vnc() {for arch in [Arch::Aarch64, Arch::X86_64] {diff --git a/libs/cua/crates/cua-vmm/src/qemu/export.rs b/libs/cua/crates/cua-vmm/src/qemu/export.rsindex 601fead0ca..e661f59358 100644--- a/libs/cua/crates/cua-vmm/src/qemu/export.rs+++ b/libs/cua/crates/cua-vmm/src/qemu/export.rs@@ -240,6 +240,8 @@ impl QemuRuntime {st.name = name.to_string();st.pid = None;st.qmp_port = None;+ st.qmp_socket = None;+ st.vnc_password = None;st.vnc_display = None;st.ports.clear();st.paused = false;diff --git a/libs/cua/crates/cua-vmm/src/qemu/mod.rs b/libs/cua/crates/cua-vmm/src/qemu/mod.rsindex a54f1e8b4c..d4b3ee63f1 100644--- a/libs/cua/crates/cua-vmm/src/qemu/mod.rs+++ b/libs/cua/crates/cua-vmm/src/qemu/mod.rs@@ -202,6 +202,18 @@ pub struct QemuState {pub vnc_display: Option<u16>,#[serde(default)]pub qmp_port: Option<u16>,+ /// Where QMP listens when not on `qmp_port`: `unix:<path>` (a unix+ /// socket in a private directory) or `pipe:<name>` (a Windows named+ /// pipe). Never a TCP port: the guest's user-mode network maps its+ /// host alias (`10.0.2.2`) to the host's loopback. `None`: `qmp_port`+ /// (a VM started by an older cua).+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub qmp_socket: Option<String>,+ /// The VNC password of the current run: the display listens on the+ /// host's loopback, which the guest can reach, so it never opens+ /// without one.+ #[serde(default, skip_serializing_if = "Option::is_none")]+ pub vnc_password: Option<String>,#[serde(default)]pub pid: Option<u32>,#[serde(default)]@@ -784,6 +796,8 @@ impl QemuRuntime {ports: BTreeMap::new(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,accel: String::new(),ssh: spec_like.ssh.clone(),@@ -1144,6 +1158,9 @@ impl QemuRuntime {};qmp_port};+ // QMP and the display only for this process (see `qmp_socket`).+ st.qmp_socket = Some(qmp_listen(&dir, &st.name));+ st.vnc_password = st.vnc_display.map(|_| vnc_password());// An egress policy that blocks anything: the VM runs inside its// own network namespace, where the policy is enforced// ([`netns_script`]).@@ -1246,6 +1263,8 @@ impl QemuRuntime {restrict_network: st.restrict_network,vnc_display: st.vnc_display,qmp_port,+ qmp_listen: st.qmp_socket.clone(),+ vnc_password: st.vnc_password.is_some(),serial_log: Some(dir.join("serial.log")),pidfile: Some(pidfile.clone()),daemonize: false,@@ -1304,7 +1323,9 @@ impl QemuRuntime {})?;std::fs::write(dir.join(NETNS_SCRIPT), netns_script(rules))?;let mut ports: Vec<u16> = st.ports.values().copied().collect();- ports.push(qmp_port);+ if st.qmp_socket.is_none() {+ ports.push(qmp_port);+ }if let Some(d) = st.vnc_display {ports.push(5900 + d);}@@ -1409,7 +1430,7 @@ impl QemuRuntime {),});}- match QmpClient::connect(&format!("127.0.0.1:{qmp_port}")).await {+ match QmpClient::connect(&qmp_addr(st)?).await {Ok(q) => {if st.netns {// QEMU is pasta's child: that is the VM's process.@@ -1439,6 +1460,15 @@ impl QemuRuntime {"qemu started but VM status is '{status}'")));}+ // The display opens only with its password (QEMU refuses every+ // VNC login until one is set).+ if let Some(pw) = &st.vnc_password {+ q.execute(+ "set_password",+ Some(serde_json::json!({"protocol": "vnc", "password": pw})),+ )+ .await?;+ }launch_guard.disarm();Ok(())}@@ -1464,12 +1494,16 @@ impl QemuRuntime {vnc: st.vnc_display.map(|d| VncEndpoint {host: host.clone(),port: 5900 + d,- password: None,- }),- qmp: st.qmp_port.map(|p| HostPort {- host: host.clone(),- port: p,+ password: st.vnc_password.clone(),}),+ // A unix socket or named pipe is no host port.+ qmp: st+ .qmp_port+ .filter(|_| st.qmp_socket.is_none())+ .map(|p| HostPort {+ host: host.clone(),+ port: p,+ }),serial_log: Some(self.dir(&st.name).join("serial.log")),bulk: st.bulk.then(|| self.dir(&st.name).join(crate::bulk::FILE)),ssh: match (&st.ssh, st.ports.get(&22)) {@@ -1494,10 +1528,7 @@ impl QemuRuntime {"sandbox '{name}' is not running")));}- let port = st- .qmp_port- .ok_or_else(|| VmmError::other("no QMP port recorded"))?;- QmpClient::connect(&format!("127.0.0.1:{port}")).await+ QmpClient::connect(&qmp_addr(&st)?).await}/// Restore an internal snapshot taken by [`Runtime::checkpoint`] on a@@ -1887,10 +1918,7 @@ impl QemuRuntime {// While our connection is open, slirp lists the guest leg of every// accepted forward as `TCP[<state>] … 127.0.0.1 <host_port> … <guest_port>`;// it only reaches ESTABLISHED once the guest accepted.- let port = st- .qmp_port- .ok_or_else(|| VmmError::other("no QMP port recorded"))?;- let mut q = QmpClient::connect(&format!("127.0.0.1:{port}")).await?;+ let mut q = QmpClient::connect(&qmp_addr(st)?).await?;// The guest leg is up within a round trip or two when the guest// listens; when it refuses, slirp closes the host side.let mut buf = [0u8; 1];@@ -2106,6 +2134,84 @@ fn netns_rules_script(rules: &crate::egress::Rules) -> String {)}+/// Where a VM's QMP listens: its unix socket or named pipe, else (a VM+/// an older cua started) its loopback port.+pub(crate) fn qmp_addr(st: &QemuState) -> Result<String> {+ qmp_addr_of(st.qmp_socket.as_deref(), st.qmp_port)+}++fn qmp_addr_of(listen: Option<&str>, port: Option<u16>) -> Result<String> {+ match (listen, port) {+ (Some(a), _) => Ok(a.to_string()),+ (None, Some(port)) => Ok(format!("127.0.0.1:{port}")),+ (None, None) => Err(VmmError::other("no QMP port recorded")),+ }+}++/// Where VM `name`'s QMP listens: on Unix a socket with a random name in a+/// private (0700) directory of this user, never under the VM's own+/// directory (a warm-pool member's directory is renamed when a Space claims+/// it, and the recorded path must stay valid); on Windows a named pipe with+/// a random name.+fn qmp_listen(dir: &Path, name: &str) -> String {+ let _ = (dir, name);+ #[cfg(unix)]+ {+ format!("unix:{}", qmp_socket_path().display())+ }+ #[cfg(not(unix))]+ {+ format!("pipe:cua-qmp-{}", random_token(16))+ }+}++/// `<tmp>/cua-qmp-<uid>/<random>.sock`. The directory is created 0700; one+/// that already exists must be ours and 0700, or the socket goes in a fresh+/// random directory instead (another user could otherwise have made it+/// first, in a shared `/tmp`).+#[cfg(unix)]+fn qmp_socket_path() -> PathBuf {+ use std::os::unix::fs::{MetadataExt as _, PermissionsExt as _};+ // SAFETY: getuid has no preconditions.+ let uid = unsafe { libc::getuid() };+ let ours = |p: &Path| {+ std::fs::symlink_metadata(p)+ .is_ok_and(|m| m.is_dir() && m.uid() == uid && m.permissions().mode() & 0o077 == 0)+ };+ let mut private = std::env::temp_dir().join(format!("cua-qmp-{uid}"));+ if !private.exists() {+ let _ = std::fs::create_dir(&private);+ let _ = std::fs::set_permissions(&private, std::fs::Permissions::from_mode(0o700));+ }+ if !ours(&private) {+ private = std::env::temp_dir().join(format!("cua-qmp-{uid}-{}", random_token(12)));+ let _ = std::fs::create_dir(&private);+ let _ = std::fs::set_permissions(&private, std::fs::Permissions::from_mode(0o700));+ }+ private.join(format!("{}.sock", random_token(16)))+}++/// `n` random lowercase hex characters, from the OS's randomness on every+/// host (the standard library seeds its hasher keys from it).+fn random_token(n: usize) -> String {+ use std::hash::{BuildHasher as _, Hasher as _};+ let mut out = String::new();+ let mut i = 0u64;+ while out.len() < n {+ let mut h = std::collections::hash_map::RandomState::new().build_hasher();+ h.write_u64(i);+ out.push_str(&format!("{:016x}", h.finish()));+ i += 1;+ }+ out.truncate(n);+ out+}++/// A VNC password for one run (VNC passwords are 8 characters at most).+fn vnc_password() -> String {+ random_token(8)+}+/// The first child of process `pid` (pasta's command).#[cfg_attr(not(unix), allow(dead_code))]fn netns_child(pid: u32) -> Option<u32> {@@ -2357,6 +2463,8 @@ impl Runtime for QemuRuntime {ports: BTreeMap::new(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,accel: String::new(),ssh: None,@@ -2781,6 +2889,8 @@ impl Runtime for QemuRuntime {ports: BTreeMap::new(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,snapshots: vec![],paused: false,@@ -2862,6 +2972,8 @@ impl Runtime for QemuRuntime {ports: BTreeMap::new(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,snapshots: vec![],paused: false,@@ -2918,6 +3030,8 @@ impl Runtime for QemuRuntime {ports: BTreeMap::new(),pid: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,vnc_display: None,snapshots: vec![],paused: false,@@ -2999,6 +3113,8 @@ impl Runtime for QemuRuntime {ports: BTreeMap::new(),pid: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,vnc_display: None,snapshots: vec![],paused: false,@@ -3847,6 +3963,41 @@ mod tests {assert!(image.exists(), "the source image is never deleted");}+ #[test]+ fn qmp_never_listens_where_the_guest_can_reach_it() {+ assert_eq!(+ qmp_addr_of(Some("unix:/s/vm1/qmp.sock"), Some(4444)).unwrap(),+ "unix:/s/vm1/qmp.sock"+ );+ assert_eq!(qmp_addr_of(None, Some(4444)).unwrap(), "127.0.0.1:4444");+ assert!(qmp_addr_of(None, None).is_err());+ let a = qmp_listen(Path::new("/s/vm1"), "vm1");+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt as _;+ let path = PathBuf::from(a.strip_prefix("unix:").unwrap());+ assert!(+ !path.starts_with("/s/vm1"),+ "never under the VM's renamable folder"+ );+ assert!(path.as_os_str().len() < 104, "{}", path.display());+ let dir = path.parent().unwrap();+ let mode = std::fs::metadata(dir).unwrap().permissions().mode();+ assert_eq!(mode & 0o077, 0, "private folder");+ assert_ne!(+ a,+ qmp_listen(Path::new("/s/vm1"), "vm1"),+ "a fresh name each run"+ );+ }+ #[cfg(windows)]+ assert!(a.starts_with("pipe:cua-qmp-"), "{a}");+ let (p, q) = (vnc_password(), vnc_password());+ assert_eq!(p.len(), 8);+ assert_ne!(p, q, "a password per run");+ assert_ne!(random_token(16), random_token(16));+ }+#[test]fn a_vm_with_a_policy_runs_in_a_namespace_that_holds_it() {let rules = crate::egress::EgressPolicy {diff --git a/libs/cua/crates/cua-vmm/src/qemu/qmp.rs b/libs/cua/crates/cua-vmm/src/qemu/qmp.rsindex dd34f2dbf9..0a429708b1 100644--- a/libs/cua/crates/cua-vmm/src/qemu/qmp.rs+++ b/libs/cua/crates/cua-vmm/src/qemu/qmp.rs@@ -7,9 +7,11 @@ use std::path::Path;use std::time::Duration;use serde_json::{Value, json};-use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};+use tokio::io::{AsyncBufReadExt, AsyncRead, AsyncWrite, AsyncWriteExt, BufReader};use tokio::net::TcpStream;-use tokio::net::tcp::{OwnedReadHalf, OwnedWriteHalf};++type Reader = Box<dyn AsyncRead + Send + Unpin>;+type Writer = Box<dyn AsyncWrite + Send + Unpin>;use crate::error::{Result, VmmError};@@ -19,20 +21,72 @@ const UNTHROTTLED: u64 = 1 << 40;/// One negotiated QMP session.pub struct QmpClient {- reader: BufReader<OwnedReadHalf>,- writer: OwnedWriteHalf,+ reader: BufReader<Reader>,+ writer: Writer,/// Asynchronous events received while waiting for command replies.pub events: Vec<Value>,}impl QmpClient {- /// Connect to `addr` (`127.0.0.1:port`) and negotiate capabilities.+ /// Connect to `addr` (`unix:<path>` for a unix socket, `pipe:<name>`+ /// for a Windows named pipe, else `127.0.0.1:port`) and negotiate+ /// capabilities.pub async fn connect(addr: &str) -> Result<Self> {- let stream = tokio::time::timeout(Duration::from_secs(5), TcpStream::connect(addr))+ let timed_out = |_| VmmError::Qmp(format!("connect to {addr} timed out"));+ let failed = |e: std::io::Error| VmmError::Qmp(format!("connect to {addr}: {e}"));+ #[cfg(windows)]+ if let Some(name) = addr.strip_prefix("pipe:") {+ let path = format!(r"\\.\pipe\{name}");+ let pipe = tokio::time::timeout(Duration::from_secs(5), async {+ loop {+ match tokio::net::windows::named_pipe::ClientOptions::new().open(&path) {+ Ok(p) => return Ok(p),+ // All instances busy: try again shortly.+ Err(e) if e.raw_os_error() == Some(231) => {+ tokio::time::sleep(Duration::from_millis(50)).await+ }+ Err(e) => return Err(e),+ }+ }+ }).await- .map_err(|_| VmmError::Qmp(format!("connect to {addr} timed out")))?- .map_err(|e| VmmError::Qmp(format!("connect to {addr}: {e}")))?;- let (r, w) = stream.into_split();+ .map_err(timed_out)?+ .map_err(failed)?;+ let (r, w) = tokio::io::split(pipe);+ return Self::negotiate(Box::new(r), Box::new(w)).await;+ }+ let (r, w): (Reader, Writer) = match addr.strip_prefix("unix:") {+ #[cfg(unix)]+ Some(path) => {+ let stream = tokio::time::timeout(+ Duration::from_secs(5),+ tokio::net::UnixStream::connect(path),+ )+ .await+ .map_err(timed_out)?+ .map_err(failed)?;+ let (r, w) = stream.into_split();+ (Box::new(r), Box::new(w))+ }+ #[cfg(not(unix))]+ Some(_) => {+ return Err(VmmError::Qmp(format!(+ "{addr}: unix sockets are for Unix hosts"+ )));+ }+ None => {+ let stream = tokio::time::timeout(Duration::from_secs(5), TcpStream::connect(addr))+ .await+ .map_err(timed_out)?+ .map_err(failed)?;+ let (r, w) = stream.into_split();+ (Box::new(r), Box::new(w))+ }+ };+ Self::negotiate(r, w).await+ }++ async fn negotiate(r: Reader, w: Writer) -> Result<Self> {let mut c = Self {reader: BufReader::new(r),writer: w,@@ -338,6 +392,42 @@ mod tests {);}+ /// QMP over a unix socket (how a VM's QMP listens on a Unix host).+ #[cfg(unix)]+ #[tokio::test]+ async fn client_connects_over_a_unix_socket() {+ let dir = tempfile::tempdir().unwrap();+ let path = dir.path().join("qmp.sock");+ let l = tokio::net::UnixListener::bind(&path).unwrap();+ tokio::spawn(async move {+ let (s, _) = l.accept().await.unwrap();+ let (r, mut w) = s.into_split();+ let mut r = BufReader::new(r);+ w.write_all(b"{\"QMP\": {\"version\": {}, \"capabilities\": []}}\n")+ .await+ .unwrap();+ let mut line = String::new();+ while r.read_line(&mut line).await.unwrap() > 0 {+ let v: Value = serde_json::from_str(&line).unwrap();+ let reply = match v["execute"].as_str().unwrap() {+ "qmp_capabilities" => json!({"return": {}}),+ _ => json!({"return": {"status": "running", "running": true}}),+ };+ w.write_all(format!("{reply}\n").as_bytes()).await.unwrap();+ line.clear();+ }+ });+ let mut c = QmpClient::connect(&format!("unix:{}", path.display()))+ .await+ .unwrap();+ assert_eq!(c.status().await.unwrap(), "running");+ assert!(+ QmpClient::connect(&format!("unix:{}", dir.path().join("none").display()))+ .await+ .is_err()+ );+ }+/// Fake QMP server: greeting, capabilities, an interleaved event, replies.#[tokio::test]async fn client_negotiates_and_skips_events() {diff --git a/libs/cua/crates/cua-vmm/src/qemu/snapshot.rs b/libs/cua/crates/cua-vmm/src/qemu/snapshot.rsindex f0e33bceb1..d30ee698a4 100644--- a/libs/cua/crates/cua-vmm/src/qemu/snapshot.rs+++ b/libs/cua/crates/cua-vmm/src/qemu/snapshot.rs@@ -503,6 +503,8 @@ impl QemuRuntime {ports: Default::default(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,snapshots: vec![],paused: false,@@ -670,10 +672,7 @@ impl QemuRuntime {/// A QMP session to `st` (which need not be a saved entry).pub(crate) async fn qmp_at(&self, st: &QemuState) -> Result<QmpClient> {- let port = st- .qmp_port- .ok_or_else(|| VmmError::other("no QMP port recorded"))?;- QmpClient::connect(&format!("127.0.0.1:{port}")).await+ QmpClient::connect(&super::qmp_addr(st)?).await}/// Makes new instance `st` a restore of golden `snap`: its disk becomes@@ -1078,6 +1077,8 @@ impl QemuRuntime {ports: Default::default(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,snapshots: vec![],paused: false,@@ -1311,6 +1312,8 @@ mod tests {ports: Default::default(),vnc_display: None,qmp_port: None,+ qmp_socket: None,+ vnc_password: None,pid: None,accel: String::new(),ssh: None,