MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / stopVm

Function stopVm

vmm/ui/src/composables/useVmManager.ts:1362–1373  ·  view source on GitHub ↗
(vm: VmListItem)

Source from the content-addressed store, hash-verified

1360 const dangerConfirmEnabled = () => !devMode.value;
1361
1362 async function stopVm(vm: VmListItem) {
1363 if (dangerConfirmEnabled() &&
1364 !confirm(`You are killing "${vm.name}". This might cause data corruption.`)) {
1365 return;
1366 }
1367 try {
1368 await vmmRpc.stopVm({ id: vm.id });
1369 loadVMList();
1370 } catch (error) {
1371 recordError(`Failed to stop ${vm.name}`, error);
1372 }
1373 }
1374
1375 async function removeVm(vm: VmListItem) {
1376 if (dangerConfirmEnabled() &&

Callers

nothing calls this directly

Calls 3

dangerConfirmEnabledFunction · 0.85
loadVMListFunction · 0.85
recordErrorFunction · 0.85

Tested by

no test coverage detected