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

14 lines
312 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-04-02 00:56:18 +00:00
#[tokio::main]
async fn main() -> Result<()> {
2024-01-11 20:21:33 +00:00
env_logger::init();
2024-03-10 00:22:24 +00:00
let call = XenCall::open(0)?;
2024-04-02 00:56:18 +00:00
let domid = call.create_domain(CreateDomain::default()).await?;
println!("created domain {}", domid);
2024-01-09 23:40:17 +00:00
Ok(())
}