krata/crates/xen/xencall/examples/domain_create.rs

13 lines
284 B
Rust
Raw Normal View History

2024-01-31 02:09:26 +00:00
use xencall::error::Result;
2024-01-09 23:40:17 +00:00
use xencall::sys::CreateDomain;
2024-01-31 02:09:26 +00:00
use xencall::XenCall;
2024-01-09 23:40:17 +00:00
2024-01-31 02:09:26 +00:00
fn main() -> Result<()> {
2024-01-11 20:21:33 +00:00
env_logger::init();
let call = XenCall::open()?;
2024-01-17 13:22:47 +00:00
let domid = call.create_domain(CreateDomain::default())?;
println!("created domain {}", domid);
2024-01-09 23:40:17 +00:00
Ok(())
}