Skip to content

vm meta manifest#32

Open
TheHeroBrine422 wants to merge 10 commits intomainfrom
caleb/vm-meta-manifest
Open

vm meta manifest#32
TheHeroBrine422 wants to merge 10 commits intomainfrom
caleb/vm-meta-manifest

Conversation

@TheHeroBrine422
Copy link
Copy Markdown
Contributor

@TheHeroBrine422 TheHeroBrine422 commented Apr 28, 2026

No description provided.

Signed-off-by: Caleb Jones <caleb@calebgj.io>
Signed-off-by: Caleb Jones <caleb@calebgj.io>
Signed-off-by: Caleb Jones <caleb@calebgj.io>
isolating ch references.

will move this to another crate later.

Signed-off-by: Caleb Jones <caleb@calebgj.io>
Signed-off-by: Caleb Jones <caleb@calebgj.io>
Signed-off-by: Caleb Jones <caleb@calebgj.io>
Signed-off-by: Caleb Jones <caleb@calebgj.io>
@TheHeroBrine422 TheHeroBrine422 linked an issue Apr 28, 2026 that may be closed by this pull request
@TheHeroBrine422 TheHeroBrine422 changed the title cm meta manifest vm meta manifest Apr 28, 2026
Comment thread odoroboctl/src/cli.rs Outdated
Comment thread odorobo/src/types.rs
Comment thread odorobo/src/ch_driver/actor.rs
Comment thread odorobo/src/ch_driver/actor.rs Outdated
Comment thread odorobo/src/ch_driver/actor.rs Outdated
Comment thread odorobo/src/ch_driver/actor.rs
Comment thread odorobo/src/ch_driver/actor.rs Outdated
@TheHeroBrine422
Copy link
Copy Markdown
Contributor Author

@korewaChino most of those are intended to be temporary. just was getting it good enough so it would boot. If I was thinking better, I would have had it where the ctl could modify those values instead of hardcoding them lol.

was intending on adding more later, but it wasnt necessary for just getting the the manifest arguably working.

@korewaChino
Copy link
Copy Markdown
Collaborator

@korewaChino most of those are intended to be temporary. just was getting it good enough so it would boot. If I was thinking better, I would have had it where the ctl could modify those values instead of hardcoding them lol.

was intending on adding more later, but it wasnt necessary for just getting the the manifest arguably working.

you can resolve those specific review comments then, mark them with a TODO or something too just in case

@TheHeroBrine422
Copy link
Copy Markdown
Contributor Author

ok cool

@TheHeroBrine422
Copy link
Copy Markdown
Contributor Author

oh forgot one thing. the operators stuff was based on the kubernetes pod affinity stuff. affinity isnt really finished though anyway, I just started writing it and then realized it is kinda integrated into the meta manifest. it arguably should be its own PR, but somehow i accidentally mixed it in.

Signed-off-by: Caleb Jones <caleb@calebgj.io>
Comment thread odorobo/src/ch_driver/actor.rs Fixed
Comment thread odorobo/src/ch_driver/actor.rs Fixed
Comment thread odorobo/src/ch_driver/actor.rs Fixed
@TheHeroBrine422
Copy link
Copy Markdown
Contributor Author

@korewaChino added todos, or did the review comments if they were simple. anything else, or good to merge?

VMCacheData {
actor_ref: actor_ref.clone(),
config: msg.config.clone()
config: Default::default()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty default on cache miss?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to decide if the migrate messages are ch specific or used for everything. the cache is now setup to store the overall meta-manifest and the current migrate messages are ch specific. so they don't have a copy of the manfiest. we also could just get a copy from the old vm, but im not 100% sure if we want to rely on getting a copy from there.

Comment thread odorobo/src/ch_driver/actor.rs
Comment thread odorobo/src/ch_driver/actor.rs Outdated
max_vcpus: vm.data.max_vcpus.unwrap_or(vm.data.vcpus) as i32,
kvm_hyperv: Some(false),
max_phys_bits: Some(46),
nested: Some(false),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why disable nested kvm?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what the example config you gave me had it set to. I also thought it was odd, but assumed you had a good reason.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah it was an experiment I forgot to remove, we can omit it and leave it to Default::default()

Comment thread odorobo/src/ch_driver/actor.rs Outdated
Comment thread odorobo/src/ch_driver/actor.rs Outdated
Comment on lines +133 to +149
DiskConfig {
// todo: the json i was given by cappy had disable_io_uring and disable_aio in this config, but I can't find these. I assume they were just a mistake.
path: Some(vm.data.image),
readonly: Some(false),
direct: Some(false),
iommu: Some(false),
num_queues: Some(1),
queue_size: Some(128),
vhost_user: Some(false),
id: Some("_disk0".to_string()),
pci_segment: Some(0),
backing_files: Some(false),
sparse: Some(true),
image_type: Some(ImageType::Raw),
..Default::default()
}
]),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disk config should be defined by the VirtualMachine manifest with volumes as an array or something

Comment on lines +106 to +174
VmConfig {
cpus: Some(CpusConfig {
boot_vcpus: vm.data.vcpus as i32,
max_vcpus: vm.data.max_vcpus.unwrap_or(vm.data.vcpus) as i32,
kvm_hyperv: Some(false),
max_phys_bits: Some(46),
nested: Some(false),
features: Some(CpuFeatures {
amx: Some(false)
}),
..Default::default()
}),
memory: Some(MemoryConfig {
size: vm.data.memory.as_u64() as i64,
mergeable: Some(false),
hotplug_method: Some("Acpi".to_string()),
shared: Some(true),
hugepages: Some(false),
prefault: Some(false),
thp: Some(true),
..Default::default()
}),
payload: PayloadConfig {
firmware: Some("/var/lib/odorobo/CLOUDHV.fd".to_string()),
..Default::default()
},
disks: Some(vec![
DiskConfig {
// todo: the json i was given by cappy had disable_io_uring and disable_aio in this config, but I can't find these. I assume they were just a mistake.
path: Some(vm.data.image),
readonly: Some(false),
direct: Some(false),
iommu: Some(false),
num_queues: Some(1),
queue_size: Some(128),
vhost_user: Some(false),
id: Some("_disk0".to_string()),
pci_segment: Some(0),
backing_files: Some(false),
sparse: Some(true),
image_type: Some(ImageType::Raw),
..Default::default()
}
]),
net: Some(vec![
NetConfig {
id: Some("net://devnet".to_string()),
mac: Some("46:59:52:67:67:67".to_string()),
..Default::default()
}
]),
rng: Some(
RngConfig {
src: "/dev/urandom".to_string(),
iommu: Some(false)
}
),
serial: None,
debug_console: None,
iommu: Some(false),
watchdog: Some(false),
pvpanic: Some(false),
platform: Some(PlatformConfig {
serial_number: Some("ds=nocloud".to_string()),
..Default::default()
}),
landlock_enable: Some(false),
..Default::default()
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the options here should be left undefined since Default::default() should default to None and infer to upstream CH itself, having these explicit is probably going to be bad

Copy link
Copy Markdown
Contributor Author

@TheHeroBrine422 TheHeroBrine422 Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you just make a commit setting the default config to whatever you want? You should be able to add commits to the PR. i dont know enough about the cloud hypervisor settings to know what the exact details for all the config options.

Comment thread odoroboctl/src/cli.rs Outdated
TheHeroBrine422 and others added 2 commits April 29, 2026 12:44
Signed-off-by: Caleb Jones <caleb@calebgj.io>
use crate::state::VMInstance;
use cloud_hypervisor_client::models::VmConfig;
use crate::{ch_driver::VMInstance, types::VirtualMachine};
use cloud_hypervisor_client::models::{CpuFeatures, CpusConfig, DiskConfig, ImageType, MemoryConfig, NetConfig, PayloadConfig, PlatformConfig, VmConfig};
use crate::state::VMInstance;
use cloud_hypervisor_client::models::VmConfig;
use crate::{ch_driver::VMInstance, types::VirtualMachine};
use cloud_hypervisor_client::models::{CpuFeatures, CpusConfig, DiskConfig, ImageType, MemoryConfig, NetConfig, PayloadConfig, PlatformConfig, VmConfig};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proper VM meta-manifest

3 participants