Pages

iDrive

IDrive Remote Backup

Monday, 7 May 2012

How to manually merge Hyper-V snapshots into a single VHD


Okay, so you have to recreate your VM configuration and you absolutely know that your VM had a snapshot at some time. 

You also realize that if you just link to the base VHD that you will lose the current state of your VM - what do you do? 


You manually merge your snapshots into your base VHD before you boot your VM. (I am assuming that you know how to connect to an existing VHD using the new VM wizard). 
Merging of snapshots can be performed manually. This is achieved by: 
  1. On your Hyper-V host.Power off the Virtual Machine. 
  2. Make a copy of the VHD and its corresponding AVHD files. 
  3. Rename the AVHD extension to VHD. 
  4. Write down the order of the disks from youngest to oldest (the oldest should be the root VHD). You can do this by looking at the last modified time stamp on the origional AVHD files, find the one that last changed. And find the last one that changed before it. 
  5. In the Hyper-V manager, open the Edit Disk wizardBrowse to the youngest VHD in the chain, then choose 'reconnect' to point to the next youngest (the one that came before). 
  6. Open the Edit Disk wizard a second time and merge. 
  7. Then repeat the process until you have only a single VHD. 
In a disaster case, you need to recover a copy of the root VHD prior to attaching it to a new VM and booting it (the act of booting it, modifies it) 
Usually the most difficult part of this process is finding the last AVHD (differencing disk) in the chain. 
The easiest way to do this is to find the configuration file for the VM. 



Then open up that configuration file and locate the information for the virtual hard disk. In the screen shot below is the location of the current running state of the VM. The snapshot is a point in time to return to, the current running state is the "Now" and is contained in a differencing disk (AVHD) after a snapshot has been taken. 

Now, find that AVHD file within the file system and rename it to VHD. 
Now, go back tot he Hyper-V manager and open the "Edit Disk" wizard - Select the disk that you renamed above, and merge this disk into the one before it. 

This process can be continued until all of the snapshots are merged back into a single VHD (the base VHD). 


Activesync Working But Only For Some Users On Exchange 2007 / 2010


There are some issues with ActiveSync for both Exchange 2007 and Exchange 2010 users whereby some users can connect their Mobile Devices (Windows Mobile Phones / iPhones / Motorola Droid etc) quite happily and ActiveSync pushes mail to the devices, but other users cannot connect and cannot sync anything at all. 

There appear to be plenty of potential solutions for this problem around if you search the web, but the solution to the majority of these problems can be solved quite simply. 

If you open up Active Directory Users and Computers and locate one of your users that is not working, Double-Click into the account and click on the Security Tab (if this is not visible, Click on View> Advanced Features from the Menu at the top of the screen then navigate back to your user). Once on the security tab, click on the Advanced Button and make sure that the ‘Include Inheritable Permissions From This Object’s Parent’ is ticked. Click OK twice to close the user account. 

Once the box is ticked, you should then be able to connect up your Mobile Device to your Exchange Server and receive your mail like the rest of your users. 

This particular problem seems to only affect migrated users and not users that were setup on the server post migration. 

You may also find that if you use an account that has Admin privileges, and you Check the ‘Include Inheritable Permissions From This Object’s Parent’ check box, that it works for a while, and then stops working again about an hour or so later. 

The reason this happens is because Active Directory uses something called the AdminSDHolder to define what permissions the default protected security groups receive. Whilst you can change the inherited permissions, a process called SDPROP will run, by default every 60 minutes on the domain controller that holds the PDCe role. It will check the ACL of the protected groups and reset their inherited permissions and the users within the groups, with what has been defined by the AdminSDHolder object. 

Microsoft’s recommendation and best practice is that if you are a domain administrator that you have 2 accounts. One for your everyday user which is restricted in the same way that every other user is and a second for your administration role. 

The built in groups that are affected with Windows 2008 are: 
Account Operators 
Administrators 
Backup Operators 
Domain Admins 
Domain Controllers 
Enterprise Admins 
Print Operators 
Read-only Domain Controllers 
Replicator 
Schema Admins 
Server Operators 

The built in users that are affected with Windows 2008 are: 
Administrator 
Krbtgt