Turn a Physical Linux or Windows Machine Into A Virtual Machine for Fr…
We will be focusing on creating this masterpiece in the Windows ecosystem, but don’t worry the same principles can be used in any operating system that can run Virtual Box.
List of Software and Hardware needed:
-Virtual Box and Extension Pack
-Windows 7 or higher PC or most any Linux Distro
-Redo Backup and Recovery ISO
-USB flash excursion
-USB hard excursion
The overall benefits of performing this procedure is three fold. One, cost savings on strength, climate control and space required will be seen immediately. Two, manageability and scalability dramatically increases due to working with virtual disks and virtual networks that can scaled up or down with finer grained control. Three, redundancy and faster disaster recovery that is provided by cloud sets. Especially when tied into your already existing network infrastructure for a seamless change when disaster strikes.
While this course of action can be completed in numerous ways with different software, this is the way that I am familiar with and all the tools needed are free.
Sounds daunting? No sweat, but where do we start first?
Well, we need to get an image of the physical machine onto removable media (USB hard excursion). I recommend a USB hard excursion vs. just a USB flash excursion due to the space the image will take up. We will also need a USB flash excursion at the minimum 2 GB in size to use as a bootable media for Redo Backup and Recovery.
Plug the USB hard excursion into your USB port and open up the folder structure. Create a folder in a location that you can remember I.e D:”Your Computer’s Name”. This is the location where we will install the files from our initial physical image copy to. After this is complete, eject your USB hard excursion by right clicking on the “Safely Remove Hardware” icon in your taskbar and click on Eject “at any rate your USB hard excursion is named”, unplug the USB HDD.
Next, we need to create a bootable USB to load Redo Backup and Recovery on. Download a small program called “YUMI”. YUMI will create a bootable USB flash excursion for Redo Backup and Recovery on it. Also grab a copy of Redo Backup and Recovery, save both files to your desktop or location of choice.
Now, run YUMI and choose your USB flash excursion from the list (Remember to choose your USB excursion and not your USB HDD that should be unplugged anyway!). Choose “Redo Backup and Recovery” from the software list that you can create an installer for. Click the “Browse” button to look for the Redo Backup and Recovery.iso to include on the install. Finally click on “create” to start the bootable Redo Backup and Recovery bootable USB creation course of action. When this is done, YUMI will ask you if you want to add any more distros, just say “no”. Eject your USB out of the computer using the “Safely Remove Hardware” icon in your taskbar and click on Eject “at any rate your USB flash excursion is named” and unplug the USB flash excursion. Please keep Redo Backup and Recovery.iso we will need it later.
Make sure that the physical computer that you would like to virtualize is in a powered down state, if not please strength down the computer. Insert only the USB flash excursion into the computer. strength up the computer and press the correct meaningful to access to boot menu or make sure that the USB excursion is set to boot before the computers internal hard excursion. Choose the USB entry to boot from, YUMI should now load. Choose the entry for “Tools” then “Redo Backup and Recovery”. Press go into on the Redo menu to start the mini recovery O/S. When Redo Backup and Recovery is loaded, insert your USB HDD and give it about 20 seconds.
Open Redo Backup and Recovery Software:
1. Choose “Backup”
2. Choose your disk to backup (your physical computer’s disk)
3. Choose your partitions to backup (typically it would be all partitions and MBR)
4. On the “Destination excursion” screen choose “Connected directly to my computer” and click browse.
5. Locate the file folder we made earlier I.e D:”Your Computer’s Name” click OK.
6. Choose a name for the disk image. I will usually choose the date, click next. The backup course of action will take anywhere from 1 hr to 3 hrs depending on hard excursion capacity and computer speed.
Congratulations, at this point you have made a complete backup of your physical machine. Please click “Close” on the Redo and Recovery Backup program and choose the strength button in the bottom right corner of your screen. Select “Shutdown” and let the computer shutdown. Remove both USB flash excursion and USB HDD and boot up any computer that has Windows 7 or higher installed on it.
Now, lets turn that physical machine into a virtual machine!
Open up Virtual Box and choose “New”. Give your Virtual Machine a name and choose the kind of virtual machine it will be in addition as the version. Choose your memory size, I usually a lot 2 GB=2048 MB if I plan on running it on a machine that has 4 GB of ram physically installed. Create a new hard excursion, choose VHD as the hard excursion file kind, click next. Choose “Dynamically allocated” for the storage, click next. Give your VHD hard excursion a name, I will usually name it by whats running on it, hence name it what you named your computer. Make the VHD hard excursion large enough to store your operating system, I will usually choose 200GB to be on the safe side. Again this depends on how big your physical machine’s data was. You are now returned to the Virtual Box Manager screen with your new VM present. Make sure your Virtual Box extension has been installed. acquire the extension for your software version and install it like so:
In Virtual Box, click File–>Preferences–>Extensions–>Add Package–>Locate extension file and select it. It will be automatically installed.
Prepare the conversion! Use only Option A or Option B:
Option A: If you can get USB sustain working in Virtual Box:
Make sure that you have installed the extension pack and setup USB access properly, if you are having some troubles, refer to the Virtual Box document here:
In Virtual Box, click on your VM name and choose “Settings” at the top, choose “Storage”. Click on the empty CD/DVD icon and then the CD/DVD icon on the right under “Attributes” and select your Redo Backup and Recovery ISO and click “OK”. At this point you have the Redo Backup and Recovery.iso at the ready and a blank VHD to install to. All you need to do now is insert your USB hard excursion and skip over Option B because you do not need to perform it.
Option B: If you cannot get USB sustain to work in Virtual Box. No problem, its what happened to me so I found a way around it.
In Virtual Box, click on your VM name and choose “Settings” at the top, choose “Storage”, choose “Add hard disk” next to Controller:Sata or Controller:IDE at any rate you have. Choose “Create new disk”, choose VHD and again make it 200GB Dynamically allocated and name it “Installer”. Underneath “Storage Tree” click on the empty CD/DVD icon and then the CD/DVD icon on the right under “Attributes” and select your Redo Backup and Recovery ISO and click “OK”. At this point you have the Redo Backup and Recovery.iso at the ready and a blank VHD which is named after your computer and another black VHD named Installer. Now close Virtual Box and right click on “Computer” and choose “Manage”. Left click on “Disk Management” then right click on “Disk Management” again and choose “Attach VHD”. Browse for the location of your Installer VHD that you produced in Virtual Box, usually in the “My Documents” folder and click okay. Now you can copy the physical computer backup image that we took earlier from D:”Your Computer’s Name” to Installer VHD. After the contents have been copied, right click on computer management again and click on “Detach VHD”. Open up Virtual Box and proceed to the next step.
Lets transform This Thing!
Once you have either USB sustain or the Installer VHD setup and the Redo Backup and Recovery ISO mounted. Press “Start” on your VM name in Virtual Box. You will be met the familiar Redo Backup and Recovery boot menu, press go into to proceed. set afloat the Backup and Recovery program if it did not start automatically. Choose “Restore”. In a nutshell, you will choose where your Image backup is “The Source excursion” (your USB HDD or Installer VHD if applicable) and where to install the image (blank VHD named after your computer). After you have chosen to install into the blank VHD, confirm the prompt to overite any data and let the recovery course of action begin. After this is finished, click close and shutdown Backup and Recovery as you did before. The VM should stop running. Click on “Settings” from the Virtual Box Manager and unmount the Backup and Recovery ISO and the Installer VHD if applicable. Leave your VHD with the name of your computer or at any rate you named it and click on “OK” to go back to the Virtual Box Manager. Click on “Start”, you should now be looking at a fully virtualized version of your physical computer!
Celebrate the many uses of this strength little VHD!
You can transport this VHD and include it in any Virtual Box VM example or already VMware if you are so inclined. You can run it on your local premises or deploy it in the cloud. A cloud example of this VM would either require running Virtual Box on your cloud computing example, or running it natively in your cloud computing space if the hosting provider supports it.
shared Gotchas and Troubleshooting:
Q: When trying to run my Linux based virtual machine, I get ” not syncing: VFS: Unable to mount root fs on unknown-block(0,0) “?
A: This is because in the backup and recovery course of action all the entries for hda##, hdb## and so forth have been converted to sda## extc. First, copy your precious VHD so you won’t lose your work if something goes wrong. Then all you will have to do is mount Backup and Recovery ISO, start your VM again and bring up a terminal session. Mount the Root partition and edit the entries in GRUB or Lilo to the proper boot device. For example: in GRUB, the entries are included in menu.Ist and fstab. In Lilo they are included in /etc/lilo.config and then /sbin/lilo -v to write the changes.
Q: When trying to run my Windows based virtual machine I get a boot error?
A: acquire a copy or a Windows disc and mount it inside of Virtual Box making sure it is set to boot first. Choose the “Repair” option. Choose “Start Up Repair” and let it run. If this does not do the trick, go back into the “Repair” option and choose “Command Prompt”. Try these commands one at a time, shutting down and unmounting the Windows disc each time to check if the problem has been corrected:
bootrec.exe /FixMbr. Then restart to see if resolved. If no consequence, try:
bootrec.exe /FixBoot. Then restart to see if resolved. If no consequence, try:
bootrec.exe /RebuildBcd. Then restart to see if resolved. If no consequence, try:
You may have to remove your BCD folder by running these commands one line at a time without quotes:
“bcdedit /export C:BCD_Backup
c: <—- Only if your Windows installation is installed on C:
attrib bcd -s -h -r
ren c:bootbcd bcd.old