You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 81dfcbb
Browse filesBrowse the repository at this point in the historyBrowse files
server: Use ACPI event to reboot VM on KVM, and Use 'forced' reboot option to stop and start the VM(s) (apache#4681)
* Updated libvirt's native reboot operation for VM on KVM using ACPI event, and Added 'forced' reboot option to stop and start the VM (using rebootVirtualMachine API)
* Added 'forced' reboot option for System VM and Router
- New parameter 'forced' in rebootSystemVm API, to stop and then start System VM
- New parameter 'forced' in rebootRouter API, to force stop and then start Router
* Added force reboot tests for User VM, System VM and Router
Copy file name to clipboardExpand all lines: api/src/main/java/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,9 @@ public class RebootRouterCmd extends BaseAsyncCmd {
49
49
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the router")
50
50
privateLongid;
51
51
52
+
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the router (Router is force Stopped and then Started)", since = "4.16.0")
Copy file name to clipboardExpand all lines: api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,9 @@ public class RebootSystemVmCmd extends BaseAsyncCmd {
52
52
description = "The ID of the system virtual machine")
53
53
privateLongid;
54
54
55
+
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the system VM (System VM is Stopped and then Started)", since = "4.16.0")
Copy file name to clipboardExpand all lines: api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -53,6 +53,9 @@ public class RebootVMCmd extends BaseAsyncCmd implements UserCmd {
53
53
required=true, description="The ID of the virtual machine")
54
54
privateLongid;
55
55
56
+
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the VM (VM is Stopped and then Started)", since = "4.16.0")
57
+
privateBooleanforced;
58
+
56
59
@Parameter(name = ApiConstants.BOOT_INTO_SETUP, type = CommandType.BOOLEAN, required = false, description = "Boot into hardware setup menu or not", since = "4.15.0.0")
s_logger.info("Unable to reboot VM " + vm + " on " + dest.getHost() + " due to " + (rebootAnswer == null ? " no reboot answer" : rebootAnswer.getDetails()));
3478
+
3479
+
StringerrorMsg = "Unable to reboot VM " + vm + " on " + dest.getHost() + " due to " + (rebootAnswer == null ? "no reboot response" : rebootAnswer.getDetails());
3480
+
s_logger.info(errorMsg);
3481
+
thrownewCloudRuntimeException(errorMsg);
3480
3482
} catch (finalOperationTimedoutExceptione) {
3481
3483
s_logger.warn("Unable to send the reboot command to host " + dest.getHost() + " for the vm " + vm + " due to operation timeout", e);
3482
3484
thrownewCloudRuntimeException("Failed to reboot the vm on host " + dest.getHost());
0 commit comments