Skip to content

Commit 82eab4e

Browse files
committed
imp(vmm): remove max disk size limit
1 parent 1ad75c0 commit 82eab4e

File tree

5 files changed

+0
-15
lines changed

5 files changed

+0
-15
lines changed

vmm/rpc/proto/vmm_rpc.proto

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ message ResourcesSettings {
198198
uint32 max_cvm_number = 1; // equals to the cid pool size.
199199
uint32 max_allocable_vcpu = 2;
200200
uint32 max_allocable_memory_in_mb = 3; // in MB.
201-
uint32 max_disk_size_in_gb = 4; // in GB.
202201
}
203202

204203
message GetMetaResponse {

vmm/src/app.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,6 @@ impl App {
178178
workdir: vm_work_dir.path().to_path_buf(),
179179
gateway_enabled: app_compose.gateway_enabled(),
180180
};
181-
if vm_config.manifest.disk_size > self.config.cvm.max_disk_size {
182-
bail!(
183-
"disk size too large, max size is {}",
184-
self.config.cvm.max_disk_size
185-
);
186-
}
187181
match states.get_mut(&vm_id) {
188182
Some(vm) => {
189183
vm.config = vm_config.into();

vmm/src/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ pub struct CvmConfig {
9090
pub pccs_url: String,
9191
/// The URL of the Docker registry
9292
pub docker_registry: String,
93-
/// The maximum disk size in GB
94-
pub max_disk_size: u32,
9593
/// The start of the CID pool that allocates CIDs to VMs
9694
pub cid_start: u32,
9795
/// The size of the CID pool that allocates CIDs to VMs

vmm/src/main_service.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,10 +362,6 @@ impl VmmRpc for RpcHandler {
362362
manifest.image = image;
363363
}
364364
if let Some(disk_size) = request.disk_size {
365-
let max_disk_size = self.app.config.cvm.max_disk_size;
366-
if disk_size > max_disk_size {
367-
bail!("Disk size is too large, max is {max_disk_size}GB");
368-
}
369365
if disk_size < manifest.disk_size {
370366
bail!("Cannot shrink disk size");
371367
}
@@ -439,7 +435,6 @@ impl VmmRpc for RpcHandler {
439435
max_cvm_number: self.app.config.cvm.cid_pool_size,
440436
max_allocable_vcpu: self.app.config.cvm.max_allocable_vcpu,
441437
max_allocable_memory_in_mb: self.app.config.cvm.max_allocable_memory_in_mb,
442-
max_disk_size_in_gb: self.app.config.cvm.max_disk_size,
443438
}),
444439
})
445440
}

vmm/vmm.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ gateway_urls = ["http://127.0.0.1:8082"]
2222
# PCCS URL used by guest to verify the quote from local key provider
2323
pccs_url = ""
2424
docker_registry = ""
25-
max_disk_size = 10000
2625
cid_start = 1000
2726
cid_pool_size = 1000
2827
max_allocable_vcpu = 20

0 commit comments

Comments
 (0)