From 2326164c1781c6241d34170f3b77ffd5ce2133ac Mon Sep 17 00:00:00 2001 From: Harikrishna Date: Thu, 30 Jun 2022 17:36:42 +0530 Subject: [PATCH] api: Added information about deviceid 0 to attach root volume to VM (#6518) This is in the workflow of attaching and detaching a root volume of a VM. We can detach the root volume from a VM and Cloudstack marks it as datadisk. We can reattach the volume to make it root volume again. During attach Device ID 0 has to be passed so that the volume will be converted back to ROOT again Added a small information in the DeviceID section in Attach volume form. --- .../cloudstack/api/command/user/volume/AttachVolumeCmd.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java index b7e10be074a..687d683309c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java @@ -49,7 +49,7 @@ public class AttachVolumeCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.DEVICE_ID, type = CommandType.LONG, description = "The ID of the device to map the volume to the guest OS. " - + "If no deviceID is informed, the next available deviceID will be chosen. When using a linux operating system and the hypervisor XenServer, the devices IDs will be mapped as follows:" + + "If no deviceID is informed, the next available deviceID will be chosen. Use 0 when volume needs to be attached as ROOT.
When using a linux operating system and the hypervisor XenServer, the devices IDs will be mapped as follows:" + "" + "Please refer to the docs of your hypervisor for the correct mapping of the deviceID and the actual logical disk structure.") private Long deviceId;