This article describes the installation and configuration of Active Directory which is not necessarily required for deploying SharePoint Server 2010 and is a part of a series describing the complete installation of SharePoint Server 2010 on Windows Server 2008 R2 and SQL Server 2008 R2. Usually your employeer or your customer has it's separate Active Directory for development or testing.
But I suggest that you read this article anyway. First of all because you need one and if your employeer has no Active Directory you can use for development you have the choice to use local accounts or domain accounts with your custom Active Directory. Second you have your own directory where you can manage everything by yourself. You don't have to ask for new users to be added or password resets and so on... it can be done immediately by you.
Ok but what about the articles which are describing how to install SharePoint with local accounts? I definitely would use an Active Directory... either on a single machine or 2 server. All customers use domain accounts or install SharePoint with least privileges so you should do the same. If you don't use an Active Directory and get errors you will have more problems to find the reason and a solution since your configuration might be the problem.
If you use an Active Directory this reason will be eliminated and your development process will be much easier because if an error occurs there are less possibilities for the reason. Actually a DEV machine with an AD is more like the production environment of your customer and if you have different configurations you might get an error during deployment to production.
You should consider to use your own Active Directory. Of course there is additional work if you set up your development but later on there is actually no work since it just runs without your help. By the way... if you don't have special requirements why not use a Windows Server 2003 Active Directory? Windows Server 2008 R2 requires about 7 or 8GB inside a virtual image while Windows Server 2003 only requires about 3Gb of hard disk space.
Like it's written in the other posts please check back the comment section below. There are agian useful additions. Your comments are appreciated...
Please have a look at
There you can find an overview of the complete series and of course the farm topology and the deployment scenario.
Active Directory installation
Don’t use the server manager to install the Active Directory role because you are prompted to use dcpromo.exe and you are left with an uncompleted installation.

Open the ”Run” dialog box and type dcpromo.

Click next checking ”Use advanced mode installation”.
Click next and after that check ”Create a new domain in a new forest”.

Type a new full qualified domain name like “aglaser.net”.
Type a NetBIOS name like “AGLASER”

Select a forest functional level and select a domain functional level.
Note: Please be aware that your choice affects other things. Here is a comment from Wes Preston which you should consider if you are installing a all-in-one demo machine:
- If selecting AD-2003 mode, the SPAdmin account needs to be added to the Domain Admins group in AD
- If selecting AD-2008 R2 mode, the SPAdmin account can be added to the Local Admins group
Please test it by yourself.

Make sure “DNS server” is checked.
After clicking next you may get a warning that one of your network adapters has a dynamically assigned IP address. Click “Yes” if you are sure you have one network adapter with a static IP address.

Click “Yes” because you don't have to care about a DNS server in a parent zone since this is a testing environment.
Click next again.

Type in a “Directory Services Restore Mode Administrator Password”.
Click next to start the installation wizard.

After installing the AD and the DNS server you have to restart your computer.

Active Directory configuration
So far I didn’t need to do any configuration since the out-of-the-box installation was enough. If you see the following screens you are fine.

Next steps