()
| 264 | } |
| 265 | |
| 266 | func 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 | |
| 272 | This is equivalent to pulling the power cord and may cause data loss. |
| 273 | For 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 | |
| 283 | func newGuestsShutdownCmd() *cobra.Command { |
| 284 | return &cobra.Command{ |
no test coverage detected