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

13 lines
285 B
Rust
Raw Normal View History

2024-01-30 18:09:26 -08:00
use xencall::error::Result;
2024-01-09 15:40:17 -08:00
use xencall::sys::CreateDomain;
2024-01-30 18:09:26 -08:00
use xencall::XenCall;
2024-01-09 15:40:17 -08:00
2024-01-30 18:09:26 -08:00
fn main() -> Result<()> {
2024-01-11 12:21:33 -08:00
env_logger::init();
2024-03-10 00:22:24 +00:00
let call = XenCall::open(0)?;
2024-01-17 05:22:47 -08:00
let domid = call.create_domain(CreateDomain::default())?;
println!("created domain {}", domid);
2024-01-09 15:40:17 -08:00
Ok(())
}