diff --git a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb index 02ea019cbc..3f85751acc 100644 --- a/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb +++ b/src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb @@ -2418,7 +2418,7 @@ end # Adding a new disk in newer vSphere versions # automatically cleans all system snapshots # https://github.com/OpenNebula/one/issues/5409 - if snapshots? or one_snapshots? + if snapshots? || one_snapshots? error_message = 'Existing sytem snapshots, cannot change disks. ' error_message << 'Please remove all snapshots and try again.' raise error_message @@ -2605,10 +2605,10 @@ end def detach_disk(disk) return unless disk.exists? - if snapshots? or one_snapshots? - error_message = 'Existing sytem snapshots, cannot change disks. ' - error_message << 'Please remove all snapshots and try again.' - raise error_message + if snapshots? || one_snapshots? + error_message = 'Existing sytem snapshots, cannot change disks' + error_message << '. Please remove all snapshots and try again.' + raise error_message end spec_hash = {}