implement support for creating domains

This commit is contained in:
Alex Zenla
2024-01-09 15:40:17 -08:00
parent 4b31d95e43
commit 35f3346858
16 changed files with 618 additions and 105 deletions

View File

@ -0,0 +1,11 @@
use xencall::domctl::DomainControl;
use xencall::sys::CreateDomain;
use xencall::{XenCall, XenCallError};
fn main() -> Result<(), XenCallError> {
let mut call = XenCall::open()?;
let mut domctl: DomainControl = DomainControl::new(&mut call);
let info = domctl.create_domain(CreateDomain::default())?;
println!("created domain {}", info.domid);
Ok(())
}