mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
chore(xen): move device creation into transaction interface (#196)
* chore(xen): move domain creation to xenplatform * chore(xen): move device transactions into separate interface
This commit is contained in:
@ -15,6 +15,7 @@ use krataoci::packer::OciPackedImage;
|
||||
use tokio::sync::Semaphore;
|
||||
use uuid::Uuid;
|
||||
use xenclient::{DomainChannel, DomainConfig, DomainDisk, DomainNetworkInterface};
|
||||
use xenplatform::domain::BaseDomainConfig;
|
||||
|
||||
use crate::cfgblk::ConfigBlock;
|
||||
use crate::RuntimeContext;
|
||||
@ -220,13 +221,18 @@ impl GuestLauncher {
|
||||
}
|
||||
|
||||
let config = DomainConfig {
|
||||
base: BaseDomainConfig {
|
||||
max_vcpus: request.vcpus,
|
||||
mem_mb: request.mem,
|
||||
kernel: request.kernel,
|
||||
initrd: request.initrd,
|
||||
cmdline,
|
||||
uuid,
|
||||
owner_domid: 0,
|
||||
enable_iommu: true,
|
||||
},
|
||||
backend_domid: 0,
|
||||
name: xen_name,
|
||||
max_vcpus: request.vcpus,
|
||||
mem_mb: request.mem,
|
||||
kernel: request.kernel,
|
||||
initrd: request.initrd,
|
||||
cmdline,
|
||||
swap_console_backend: Some("krata-console".to_string()),
|
||||
disks,
|
||||
channels: vec![DomainChannel {
|
||||
@ -241,7 +247,6 @@ impl GuestLauncher {
|
||||
}],
|
||||
pcis: request.pcis.clone(),
|
||||
filesystems: vec![],
|
||||
event_channels: vec![],
|
||||
extra_keys,
|
||||
extra_rw_paths: vec!["krata/guest".to_string()],
|
||||
};
|
||||
|
Reference in New Issue
Block a user