When we started our business we were very small and couldn't afford buying Server hardware. Now we have server hardware. Until now I was using usual PC as a server and I have configured Active Directory and other things. I am looking if I can somehow transfer the entire OS to new server machine without loosing my settings? Another question I have is, is it OK to have the Domain Controller in a VM?
1To address your second question: Yes, it's OK to have a virtual Domain Controller. To address your first question: I might suggest converting the physical machine to a virtual machine for the virtualization platform of your choice and hosting it on a hypervisor.– joeqwertySep 4, 2015 at 4:01
@joeqwerty Thanks for your response! Can you direct me on how to convert physical machine to VM?– DilshodSep 4, 2015 at 4:03
2@Dilshod please ask a new question for that issue. You'll need to give a lot of details about your virtualisation platform and what you've already tried before we'll be able to answer.– womble ♦Sep 4, 2015 at 4:06
If it's only Active Directory that you want to move then one possible solution can be is to install a secondary Domain Controller(DC) in your VM, transfer all FSMO Roles to the VM and then demote your older DC.
Check the following links for step-by-step process
Adding a 2012 Domain Controller to an existing Domain
Demoting a 2012 Domain Controller
Reading @sam_pan_mariusz's answer reminded of the Feature "Windows Server Backup" which also does a image based backup of your entire server with all files, configuration and everything.
This image can be restored to a bare-metal hardware(in your case a VM).
As highlighted by @sam_pan_mariusz you'll have to install the new hardware's drivers before the backup.
This Microsoft page on Windows Server Backup (along with the nested pages) has all the details you need to know.
Hope this helped.
It is specified that there are other services on the server. Sep 4, 2015 at 17:36
@arcesso - Hope the edit helps Sep 5, 2015 at 6:24
The answer by @23Stinger is the best option, but if you really need to move the existing OS to a new hardware it shouldn't be a big problem.
Since Windows Vista (and Windows Server 2008), moving installed Windows instances between different hardware became much easier. Previously, to run Windows XP, Windows Server 2003 and older on a different hardware, you basically needed to introduce registry entries related to your new disk drive controller driver plus copy corresponding driver files from install media. There were also issues when moving between AMD and Intel CPU, which often required removal of some files or registry entries related to intelppm driver. Failure to do the above steps led to BSOD during startup, due to inaccessible boot device or critical driver error. This article extends the legacy topic.
Currently, with Windows Vista and newer, all you need in most cases is to move your hard drive and boot. It will take much longer for the first time and you will definitely need to reboot once or more. Some of your new hardware may also require new drivers - it's smart to install them before you proceed, as your new NIC or USB controller may not be available without it. It is also possible that some old drivers will critically fail with new hardware (ending with BSOD), check this SuperUser topic how to find out which one you need to hide - renaming the corresponding driver file should change the error to non-critical. When your system finally boots, check Device Manager for missing drivers. Your IP configuration will also need to be adjusted (NICs will loose the settings), and I'm not sure how this change is gonna play with domain services (AD, DNS, Kerberos specifically), so it may need additional reading.
Of course, you don't need to use the same hard drive to boot new server, it's indeed safer to bit-copy the old system to new storage. USB disk adapter can come handy. Boot a live Linux system like ie. Knoppix and use
fdisk /dev/DEST_DISK (for MBR partition table) or
gdisk /dev/DEST_DISK (for GUID table) to recreate identically-sized partitions and
dd if=/dev/SRC_PARTx of=/dev/DEST_PARTx to copy data. Using
fdisk -l /dev/SRC_DISK /
gdisk -l /dev/SRC_DISK lists exact partition sizes. If the entire procedure sounds complicated, use a dedicated tool like Image for Linux (free, fully functional 30-day trial available), which also contains TBOSDTS tool that may help to solve critical errors triggered by hardware and driver incompatibilities.