Hello XSS,
I'm currently working on a Rust application for ESXi and need to execute commands on the host system.
For this, I'm using
When I run this on ESXi, it panics and outputs the following error:
I am compiling the application with the following command:
It seems that ESXi doesn’t support
I found a related GitHub issue where the solution involved modifying the Rust standard library to avoid using
Has anyone encountered a similar problem, or does anyone have suggestions on how I can execute commands on the ESXi host without running into this issue? Any help would be greatly appreciated.
I'm currently working on a Rust application for ESXi and need to execute commands on the host system.
For this, I'm using
std::process::Command, but it doesn't seem to be working as expected. Here’s the code I’m using:
C-подобный:
use std::process::Command;
fn main() {
let output = Command::new(“ls”).output().unwrap();
if output.status.success() {
let stdout = String::from_utf8_lossy(&output.stdout);
println!(“{}”, stdout);
} else {
let stderr = String::from_utf8_lossy(&output.stderr);
eprintln!(“Error: {}”, stderr);
}
}
When I run this on ESXi, it panics and outputs the following error:
Код:
thread 'main' panicked at std/src/sys_common/process.rs:153:17:
called `Result::unwrap()` on an `Err` value: Os { code: 25, kind: Uncategorized, message: “Not a tty” }
I am compiling the application with the following command:
Код:
cargo build --target x86_64-unknown-linux-musl --release
It seems that ESXi doesn’t support
SOCK_SEQPACKET, which might be related to this issue. I found a related GitHub issue where the solution involved modifying the Rust standard library to avoid using
SOCK_SEQPACKET. However, I encountered problems when trying to compile the standard library for x86_64-unknown-linux-musl, and I believe there might be simpler and more appropriate ways to solve this.Has anyone encountered a similar problem, or does anyone have suggestions on how I can execute commands on the ESXi host without running into this issue? Any help would be greatly appreciated.
