From 6d40c078f94184f92ac4a3018d8512e64b0a3808 Mon Sep 17 00:00:00 2001 From: Kelven Yang Date: Tue, 17 Jan 2012 16:01:09 -0800 Subject: [PATCH] bug 11428: remove the constraint based on customer's feedback, we will allow creating volume from a snapshot that was originally taken from root volume. Customers should be aware that when the volume is attached as a data volume, some partitions that were originally created as a root volume may not be recognized by the guest OS --- server/src/com/cloud/storage/StorageManagerImpl.java | 2 ++ server/src/com/cloud/vm/UserVmManagerImpl.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index ab39f13be15..a0dac2e7d7b 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -1718,11 +1718,13 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag } } +/* // bug #11428. Operation not supported if vmware and snapshots parent volume = ROOT if(snapshotCheck.getHypervisorType() == HypervisorType.VMware && _volumeDao.findByIdIncludingRemoved(snapshotCheck.getVolumeId()).getVolumeType() == Type.ROOT){ throw new UnsupportedServiceException("operation not supported, snapshot with id " + snapshotId + " is created from ROOT volume"); } +*/ } // Verify that zone exists diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index fa98d1dccb1..593ed7c3c0d 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -1405,12 +1405,13 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager if (snapshot.getStatus() != Snapshot.Status.BackedUp) { throw new InvalidParameterValueException("Snapshot id=" + snapshotId + " is not in " + Snapshot.Status.BackedUp + " state yet and can't be used for template creation"); } - + +/* // bug #11428. Operation not supported if vmware and snapshots parent volume = ROOT if(snapshot.getHypervisorType() == HypervisorType.VMware && snapshotVolume.getVolumeType() == Type.DATADISK){ throw new UnsupportedServiceException("operation not supported, snapshot with id " + snapshotId + " is created from Data Disk"); } - +*/ domainId = snapshot.getDomainId(); accountId = snapshot.getAccountId(); hyperType = snapshot.getHypervisorType();