MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / newGuestsStopCmd

Function newGuestsStopCmd

internal/cli/guests.go:266–281  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264}
265
266func newGuestsStopCmd() *cobra.Command {
267 return &cobra.Command{
268 Use: "stop <vmid>",
269 Short: "Force stop a guest (immediate power off)",
270 Long: `Force stop a running VM or container.
271
272This is equivalent to pulling the power cord and may cause data loss.
273For a graceful shutdown, use 'guests shutdown' instead.`,
274 Example: ` pvetui guests stop 100`,
275 Args: cobra.ExactArgs(1),
276 ValidArgsFunction: completeVMIDs,
277 RunE: makeLifecycleCmd("stop", func(client *api.Client, vm *api.VM) (string, error) {
278 return client.StopVM(vm)
279 }),
280 }
281}
282
283func newGuestsShutdownCmd() *cobra.Command {
284 return &cobra.Command{

Callers 1

newGuestsCmdFunction · 0.85

Calls 2

makeLifecycleCmdFunction · 0.85
StopVMMethod · 0.80

Tested by

no test coverage detected