vm meta manifest#32
Conversation
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>
|
@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 |
|
ok cool |
|
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>
|
@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() |
There was a problem hiding this comment.
empty default on cache miss?
There was a problem hiding this comment.
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.
| 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), |
There was a problem hiding this comment.
why disable nested kvm?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
nah it was an experiment I forgot to remove, we can omit it and leave it to Default::default()
| 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() | ||
| } | ||
| ]), |
There was a problem hiding this comment.
disk config should be defined by the VirtualMachine manifest with volumes as an array or something
| 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() | ||
| } |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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}; |
No description provided.