diff --git a/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java b/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java index c8322af13b..8d72547b17 100644 --- a/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java +++ b/src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java @@ -121,7 +121,7 @@ public class VirtualMachine extends PoolElement{ "clea", "unkn", "hotp", - "poff", + "shut", "boot", "boot", "boot", @@ -469,26 +469,40 @@ public class VirtualMachine extends PoolElement{ /** * Sets the specified vm's disk to be saved in a new image when the - * VirtualMachine shutdowns. + * VirtualMachine shuts down. * * @param diskId ID of the disk to be saved. * @param imageName Name of the new Image that will be created. * @return If an error occurs the error message contains the reason. */ - public OneResponse savedisk(int diskId, String imageName, boolean hot = false) + public OneResponse savedisk(int diskId, String imageName) + { + return savedisk(diskId, imageName, "", false); + } + + /** + * Sets the specified vm's disk to be saved in a new image. + * + * @param diskId ID of the disk to be saved. + * @param imageName Name of the new Image that will be created. + * @param hot True to save the disk immediately, false will perform + * the operation when the VM shuts down + * @return If an error occurs the error message contains the reason. + */ + public OneResponse savedisk(int diskId, String imageName, boolean hot) { return savedisk(diskId, imageName, "", hot); } /** - * Sets the specified vm's disk to be saved in a new image when the - * VirtualMachine shutdowns. + * Sets the specified vm's disk to be saved in a new image. * * @param diskId ID of the disk to be saved. * @param imageName Name of the new Image that will be created. * @param imageType Type of the new image. Set to empty string to use * the default type - * @param hot do not defer saveas operation + * @param hot True to save the disk immediately, false will perform + * the operation when the VM shuts down * @return If an error occurs the error message contains the reason. */ public OneResponse savedisk(int diskId, String imageName, String imageType, diff --git a/src/oca/ruby/opennebula/virtual_machine.rb b/src/oca/ruby/opennebula/virtual_machine.rb index 2c10a9b0b2..5322fd6416 100644 --- a/src/oca/ruby/opennebula/virtual_machine.rb +++ b/src/oca/ruby/opennebula/virtual_machine.rb @@ -351,6 +351,8 @@ module OpenNebula # disk will be saved # @param image_type [String] Type of the new image. Set to empty string # to use the default type + # @param hot [true|false] True to save the disk immediately, false will + # perform the operation when the VM shuts down # # @return [Integer, OpenNebula::Error] the new Image ID in case of # success, error otherwise