Pick up and move to another computer easily: virtualize your current PC (individual partitions or whole disks)

Virtualization, or virtual machines, are very cool. For those that don’t know what I mean, here is a quick run down: Virtualization technology allows a user to “run an OS in an OS”; in other words, for example, you can have Windows XP 32-bit installed on your computer and run a virtualized version of Windows Vista 64-bit on top of that. The virtualized Windows Vista acts just like if it was installed on your physical machine. However you really didn’t install Windows Vista; you virtualized it and are running it in Windows XP just like you run any other program. Admittedly virtualization does require a fairly powerful PC (to give you a general idea, think of it as running two OSes on your computer at once) or else you will experience huge amounts of lag, but virtualization technology is one of those things that are just awesome.

Now to create a virtual machine, you need virtualization software. The three most popular ones out there VMware, VirtualBox, and Microsoft Virtual PC. VMware is more of a commercial product (although there are some server editions you can get for free), while VirtualBox and Microsoft Virtual PC are completely free. My favorite one has always been VirtualBox because it is open source, so available to all users, and is cross platform (works on Windows, Mac, and Linux).

That being said, being able to install a new OS on top of your current OS is nice and all, but the purpose of this post is not to go into the details of virtualization. Rather I would like to inform dotTechies of an awesome, and potentially very useful, trick: turn your current OS (with all your files and program) into a virtual machine so you can easily run it (with all your files and folders) on another PC. The best part is your current OS is left untouched; rather you just create a “virtual copy” of it. Think of it as creating a backup image of your computer but instead of restoring the image, you “run” the image with your favorite virtualization software such as VirtualBox.

You can turn your current OS into a virtual machine using two different programs: VMware vCenter Converter and Disk2vhd. After you virtualize your OS, you can run it using VMware, VirtualBox, or Microsoft Virtual PC.. For the purposes of this post, I will focus on a Disk2vhd + VirtualBox combination.

Disk2vhd…

2009-10-08_2219492

…allows you to easily virtualize your whole hard disk or select partitions. It is lightweight (707 KB download), portable, and [comparatively] fast (took me just under 40 minutes to virtualize the C:\ partition you see in the above screenshot) . You simply download Disk2vhd, unzip it (no installation required), run it, select the partitions you want to virtualize, click “Create”, and wait for it to finish. If you have multiple hard disks, Disk2vhd will create one VHD file for each hard disk.

The major advantage Disk2vhd has over rival create-virtual-images software is Disk2vhd takes advantage of Windows’ “Volume Snapshot” feature allowing you to virtualize the OS you are currently running whereas some other software will lock you out telling you they cannot create a virtual image of any online system.

After you have created a VHD for your OS, you can run the virtual machine on any computer you want via VirtualBox (of course make sure you copy the VHD file to the computer you want to run it on). Just download and install VirtualBox, create a new virtual machine on VirtualBox like you would normally, but make sure to select the VHD for the virtual hard drive instead of creating a new virtual hard drive:

2009-10-08_231456

2009-10-08_222408

2009-10-08_222423

2009-10-08_222429

2009-10-08_222515

2009-10-08_222525

2009-10-08_222541

2009-10-08_222606

After you create the virtual machine, simply run it, and let Windows install as many drivers as it can find. After that it is up to you to find the drivers yourself.

Of course since Disk2vhd creates a VHD, you can also use Microsoft Virtual PC to run the virtual machine instead of VirtualBox (do note, though, Virtual PC has a 127 GB virtual disk size limit). The only problem is Microsoft Virtual PC is only available to people who have Windows XP Pro, Windows Server 2003, Windows Vista Business or higher, Windows Server 2008, and Windows 7 Professional or higher.

Furthermore, if you have Windows XP, Windows Vista SP1, Windows Server 2008, or Windows 7 (regardless of which edition), you can “attach” your VHD and make Windows think it is a real physical partition on your hard drive so you can boot directly from it and not have to virtualize it with VirtualBox or Virtual PC. For XP/Vista you need to download the VHD mount from Virtual Server R2 while you can do it natively in Server 08/Win7.

All in all, this “turn-your-PC-into-a-virtual-machine” is very cool and can be potentially very useful. To get started yourself, download the appropriate software from the links below:

VMware Homepage

VirtualBox Homepage

Microsoft Virtual PC | Windows Virtual PC (Win 7 only)

Disk2vhd

VMware vCenter Converter

Share this post

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

37 comments

  1. SURESH

    Samuel,
    Thanks
    the programme that I am interested is Scrivener, a very specific one normally used by writers, and the purpose is that I want to write some long /articles’booklets: if you know of the same functionality anf the programme is for XP it would be great

  2. Samuel

    @SURESH: First things first: Running Mac OS on ANY machine that is not made by Apple is considered Illegal according to Apple and the courts have for the most part backed them up. As such while I know it can be done, I will not say how to do it.

    As far as the problem of running a Mac only program, what program is it? I’m sure there is another program out there that can do the same stuff but will run on Windows.

    Being as an ISO is an image of a Optical Disk (CD/DVD/Blue-Ray) I’m going to guess you mean you want to clone the hard drive like Disk2Vhd can. Your best method would be to try to use a Backup program that creates images for you. Don’t know of any that are meant for Macs though.

  3. SURESH

    Thanks samuel,
     
    How about the otherway round; putting MaC OS in VM and running on Win XP: I cam acroos some you tube viedois but couldn’t get the hang about putting the Mac OS in a VM .
    Could you give me some guidance, I need to run an application which is available only for MAC: and how to create an iso of MAC OS running on mac-laptop .

  4. Samuel

    @SURESH: Thats very far from unusual because not only can you but a lot of people with Macs run Windows in a VM. I don’t know if VirtualBox runs on Mac but I do know that for Mac one can use either Parallels Desktop from Parallels or you can use VMWare’s Mac VM (don’t know what it’s called).

  5. SURESH

    I was searching as to how to craete a virtual machine and this gives me an insght aboutthe actual details,
    I have one question, ashraf, and it is unusual, can I create a virtual on of a Mac and than run it on XP pro, is it possible ?

  6. Daniel

    RE: Booting into the virtual drive.

    Are there any instructions around regarding what would have to be added to the BOOT.INI in order for Virtualization software to mount the virtual drive and boot from it?

    I’m planning on trying this with the vhdmount component of the Virtual Server 2005 R2 (ala http://www.tech-recipes.com/rx/3595/windows-xpvista-how-to-attach-a-vhd-file/), but am uncertain how to proceed.

    Or, is this idea of booting from a virtual drive something that someone’s heard about, but nobody has successfully accomplished?

    BTW, Ashraf, thanks for the excellent help, and the thorough analysis you often give for the GiveAwayOfTheDay offerings. I may not download the offerings, but I always check what you have to say, if for no reason other than to see what freeware options are out there that are comparable.

  7. Bill Gates II

    @KillNoise: Sorry for the imcomplete info last time, my mind was else where at the time. To get you more details about the Graphics card I used DirectX Diagnosics, and got this:

    Card name: Virtual PC Integration Components S3 Trio32/64
    Manufacturer: Microsoft
    Chip type: S3 732
    DAC type: S3

    As to the chip set, its a 440BX (based on “Intel 82443BX Pentium(R) II Processor to PCI Bridge” from the DirectX Diagnostics)

    Hope this helps!

  8. KillNoise

    @Bill Gates II:

    Which chipset does it show ? (AIDA32 or Everest system diagnosis will provide detailed information)

    I know some VM commonly use i440BX (old Pentium II) or i810 (Pentium III) platform.

    There may be large differences regarding DirectX (3D) & OpenGL support:
    Many Windows XP supplied drivers are stripped down to provide only basic support, so DirectX & OpenGL are supported only via slow SW emulation (e.g. “Microsoft OpenGL 1.1″) until you install the full featured video drivers with HW accelleration provided by manufacturer.

    There are two ways to achieve HW accelleration:
    a) Find HW accellerated drivers to install for the emulated HW model
    (here S3 Trio32/64 – with very limited accelleration features)
    b) VM-system may provide VM-Tools including its own matched video driver, which should emulate DirectX/OpenGL calls by passing them to accellerated Host system drivers if available.

    I know the latter method is used by Paralles VM-Tools for PC on Mac virtualization (commercial), by installing its proprietary emulation drivers inside the Windows XP VM to provide some DirectX accelleration support (using Mac GPU functions).

    Similiarly, MS Virtual PC might easily provide DirectX acceleration functions inside VM as available on the Host system, which is allways Windows/DirectX based.

    More difficult for Virtual Box, designed to run on any (including non Windows) host system. Maybe abstract pass-through is possible at least for OpenGL, available on most platforms (rather than for DirectX).

    @ Ashraf: What do you know about implementation in Virtual Box ?

  9. Bill Gates II

    @KillNoise: The HW is different from platform to platform though not radically so. I can give you the specs for Windows Virtual PC right now; I don’t have the others on this machine.

    Windows Virtual PC (via Windows XP Mode Machine)
    System Manufacturer: Microsoft Corporation
    System Model: Virtual Machine
    System Type: X86-based PC
    Processor: x86 Family 6 Model 15 Stepping 6 GenuineIntel ~2154 Mhz
    BIOS Version/Date: American Megatrends Inc. 080002, 8/14/2009
    SMBIOS Version: 2.3
    Sound Device: Sound Blaster 16 or AWE32 or compatible (WDM)
    Display: Virtual PC Integration Components S3 Trio32/64

    As to which has better driver support, none is really better than any other since all their hardware emulations use drives that come with OSes.

  10. KillNoise

    So what is the HW (chipset, video, audio etc) you actually see (e.g. when using WinAudit or Everest) from within virtual machine ?
    HW equipment like VGA, 3D accellerator, OpenGL & DirectX support might be quite different depending on VM platform used (MS Virtual PC, VirtualBox, VM-Ware or Parallels VM)!
    Which one provides best driver support & compatibility ?
    Could anyone share WinAudit report summary from a running VM-System to make things clear & for feature comparison, please ?

  11. Bill Gates II

    I’m going to try and answer some of the questions here:

    @bob: First off the hardware that a VM sees is not the same as your real machines hardware, for the most part. HDD, Graphics, Sound, Keyboard, Mouse, Network, and more our emulators, so they only need very basic drivers that come with windows (that is why Aero in VMs don’t work be default). And two answer your second question, a VM can print, if the real machine could (ie, it is either plugged in to the real machine via USB or the printer is networked) and it gets whatever networking abilities the real machine has.

    @Rob: Virtualizing XP on Linux can be done, but you would need a Virtualized that works on Linux (don’t know of one, all my Linux machines are virtual). The OS drive is still C by default. As to problems, most are related to the emulation I talked about before, like no Aero on Vista or 7 VMs, Games also can have some problems as the graphics card the is emulated cannot do too much fancy stuff, so any game that was made pre XP will work, for XP maybe, after XP start praying. transferring from and to the VM depends on the Virtual Software, but in general they have the ability to attach drives and/or folders as network attached drives as well as sharing the clipboard so you can just copy and past files between them. A VM acts just like a real machine, so yes it saves all you settings and activities including recent programs and files.

    Randy Lawrence: It can be pretty big, and depending on the setting you gave it can even be as big as the drive you just copied. You could split the file and burn it to many many….many CDs but a better way would be to get an external Hard drive and use that.

    KillNoise: You understand the problem but not the cause. Yes VMs don’t work well with DirectX and such, but that is because the VM has an emulator for its graphics card. It does not get you machines real one. See my replies above for more.

    bladerunner: Yes what you are describing is a perfect scenario for a VM. All you would have to do is set up a VM that can access all those types of stuff (so like no blocking Flash). Then just have him do is homework on the VM, you can even make it full screen so it is like working on the real machine. Then when he’s done, just close the VM, and anything that is on the VM stays on the VM with no effect on your machine.

    Ok, thats everyone since Ashraf last replied.

  12. bob

    quick question:

    Ashraf wrote:
    fter you create the virtual machine, simply run it, and let Windows install as many drivers as it can find. After that it is up to you to find the drivers yourself.

    Do you really need to look for aditional drivers since you will be using the drivers from an already working os?
    FOr example, lets say I am using sofware on xp that only works on xp and not vista.
    I buy a new computer that has vista 64 bit.
    Now, if i create a virtual image of my xp computer, can’t I just launch that image on vista using virtual box or d I have to look for drivers?
    cuz, right now, it is impossible to find drivers for XP on computers which have Vista.
    Also, in the above scenario, will I be ableto print and have access to wireless from within the virtual environment?
    THanks!

  13. Rob

    Hi Ashraf,
    I didn’t download the recent Paragon offering for a couple of reasons –
    a) I feel they may be in the early stages of getting it right (?)
    b) Some posters on the GOTD site, say it is not for the faint(Lite) hearted.

    I have loaded your other two articles into Tabs, which I will study in full a bit later.
    However your answer to these questions may save me from researching further –
    1) My PC’s are 5 years old, and only have 1GB of ram.
    I am pretty sure XP within XP will be asking too much.
    Can one load a version of linux (that has low resource demands) into a partition.
    And then use that as a host for the VM stuff (an XP Virtualized OS) ?
    That way I avoid the demands of two XP’s running (one within the other)
    2) When within a VO (Virtualized OS), is the main drive still called “C” ?
    3) Are there any problems when running the virtualized OS ?
    EG Somethings don’t work, or don’t work as we would expect ?
    4) Can you easily transfer files in/out of the VO ?
    5) When exiting the VO, can you save all the recent activity (Pgms installed, etc) ?
    Does that become another VO, or update the one you loaded in ?

    I apologize for my laziness, but I feel I would have to do a lot of research to work out those answers myself.

    Thanks,
    Rob

  14. Randy Lawrence

    Something I’m not getting. How do you get the virtual hard drive on to another computer system? i imagine the virtualized hard drive file must be a pretty big file.

    where i am going with this is that I am getting a new computer in a few months and if I virtualize my current system how do I get it to my new system once I have Microsoft Virtual PC installed?– as you can tell I am a complete novice at this.

  15. KillNoise

    Sounds good.
    However, i also heard of issues regarding compatibility of DirectX, video grafic adapter and other HW devices from within virtual machines (e.g. guest OS might see only simple VGA, unable to access any 3D acceleration features).
    So games, multimedia etc. might not be supposed to work properly within virtual copy ?
    Different support for Virtual Box / MS Virtual PC / VMWare ?
    Any experiences ?

  16. Ozzie

    Thanks so much for this posting, Ashraf. I have long wanted to try out virtualisation but have been too afraid to try it out lest disaster reign down (wouldn’t be the first time – my staff are reluctant to let me near their comps!). But I feel confident that I can tackle it now. So thanks again! You’re a wonder, you know!

  17. Robert

    Ashraf…

    Wow, what a coincidence that you wrote this post, and then Paragon brings their virtualization offering out to GAOTD right afterwards. Can we spell “synchronicity”, lol??

    I was excited to see who the developer of Disk2vhd was. Although it would be stretching the truth more than just a little to consider myself a real “techie”, somehow I’ve managed to become a little familiar with a (small) bit of Mark Russinovich’s work. If there was anyone in the IT field that I might think of as a “personal hero”, I think it would be him. If awards were given out for the person who has created the most useful utilities, his name would definitely be right up there at the top. I always have his task manager replacement “Process Explorer” running (in ADDITION to AnVir Task Manager, if you can believe that redundancy – just because there’s a couple things that Process Explorer lets me do that the “free” GAOTD version of Anvir doesn’t), and there are so many other tools that he has created that are just so helpful in understanding what is going on “under the hood” of these beasts. The videos he’s made available explaining usage of his tools are neat also, and show him not to be the egomaniac that someone with his skills could easily become, which is way cool too, in my book.

    Finding his Disk2vhd (and Paragon’s offering as well)is giving me a very warm fuzzy feeling about recovering from possible collapse of my increasingly ancient PC. How cool, to know that I can just “bottle up my system” with the knowledge that if a hardware disaster completely clobbers my system, I can just trot over to another functioning PC with my copy of my virtualized system and continue on where I left off. Awesome….

    Thanks for bringing this program to our attention. Two thumbs wayyyy up…

  18. bladerunner

    G’day Ashraf,

    WOW — so many THANKS are due you for the many helpful evaluations
    of GAOTD daily and myriad other FREEWARE !!

    Can I ask for some hints ?? If so, I have a good friend who needs
    to do college HOMEWORK on my Vista SP1 PC. Of course, this requires
    being OPEN to multiple first & third party cookies and scripts and redirects — and using FLASH !! There is NOTHING Adobe allowed on my PC anymore. I use HIPS, script blockers, adblockers, etc.

    So, I use Returnil and load all that stuff for her — it is intensive
    preparation for the first 1/2-hour.

    Is there a way to save that system state — Adobe reader and FLASH
    installed and OPEN to ALL cookies and scripts — and run it as a
    virtual machine, so it is easy for her to use my computer ??

    You cannot save things permanently while Returnil protection is on.
    I thought of installing it as a separate OS, but that would still allow all the changes to my real system hard drive.

    Is there a way other than having a separate PC for that crap ??
    THANKS for your trouble here — I need your knowledge …

  19. Tortuga

    Hey there Ash :D

    I got something in the mail, regarding the XP «to» 7 transfer, w a Promo offer.
    Dunno if its good, if it does what its suppose to.
    But since we are talking about the headache that’s coming … might as well see if dotTechies can use it too.

    Going to send it to you via eMail – that’s ok, right?
    Maybe you could look into it & see if its useful.

    Peace

  20. Ashraf
    Author/Mr. Boss

    @Mihail Garchev: Well Disk2vhd technically only “supports” Microsoft Virtual PC because it only creates VHD VMs (VHD is a Virtual PC format). However VirtualBox can run VHDs which is why I use it. So the question is, rather, does Parallels VM have the ability to run VHD? If yes, then yes this supports Parallels VM.

    @Leeroy Johnson: How do you use up so much space? LOL!

    @Tortuga: Don’t look outside your window(s). No pun intended :P.

    Good idea on the post about WinXP and Win7. I will chalk it up on the calendar.

    Also, sorry about the moderation of your other comment. If people include too many links I need to verify it is not spam. I let it through now =).

    @David Roper: Hehe; take a deep breath then go play with look technology.

    @Bill Gates II: You are correct “native” support is not there in Vista. However you can do it if you download the mount software from Virtual Server: http://technet.microsoft.com/en-us/bb738033.aspx. In fact you can do it on XP too.

    @Jeanjean: Well you would need access to the other person’s computer but yes technically you can do that.

    What do you mean “burn” the VHD?

  21. Jeanjean

    Terrible article again!

    If I understand correctly, it is possible through this process to use the PC of someone else and thus to use (temporarily of course !) applications registered by others (this is not legal … i know)?

    Can one of those apps directly burn the vhd file ?

    In any case thank you for this valuable information.

  22. David Roper

    Just when I am thinking I am smart and all that, you go make a report like this.

    (head still spinning…)

    Whew! At first i thought I was going to install this on my old XP laptop, create a virtual copy of it and enjoy using it a few days.

    Then I wanted to take a new WIN 7 laptop out of the box, install someting, copy this “BUBBLE” of my old XP over to it (using a file copy program like XXCopy, etc)

    Then I would have my XP running on a new laptop (with WIN7 installed) and one day I could feel brave and drop my XP “BUBBLE” altogether.

    (head explodes and gives up)

    I love computers…I love computers…I love computers…I love computers…I love computers…I love computers…I love computers…

  23. Tortuga

    Hello Ash :D

    Hey you, are you spying on me or what??? 8)
    Starting to get worried … :twisted:
    This is what I’ve been looking into the past few days!

    Been trying to figure out if we should upgrade XP to 7, install 7 on a new HD, buy a new PC w 7 pre-installed, etc, etc, …
    It’ll be difficult to upgrade as MS gives ««NO SUPPORT»» for XP to 7 upgrades (which I think is the majority, seeing the low adoption rate Vista had!!!) Just guessing A LOT of ppl are going to have muchos problémas & lose a lot of data (!)
    MS is allowing ‘XPMode’ for 7Pro & Ultimate *ONLY*
    Maybe you could write something about all this prior to October 22, b4 ppl start going crazy w their upgrades … If you have time, of course ;)
    As always, instead of facilitating the upgrade, they are making it confusing & complicated!!! *sigh*

    So anyhoo, this article of yours is just fan*tas*tik!!!
    I was thinking of Virtualization as a possibility, but had no idea how/what & was a bit apprehensive embarking on such an adventure!
    Think I’m feeling a little bit less afraid :D

    Big Thanks
    Peace

    PS: My other posts are still blocked!! *sniffff*

  24. Ashraf
    Author/Mr. Boss

    @k1: No Virtual PC cannot. You are looking at the service pack for it. Look at the download page:

    Supported Operating Systems: Windows Server 2003, Standard Edition (32-bit x86); Windows Server 2003, Standard x64 Edition; Windows Vista Business; Windows Vista Business 64-bit edition; Windows Vista Enterprise; Windows Vista Enterprise 64-bit edition; Windows Vista Ultimate; Windows Vista Ultimate 64-bit edition; Windows XP Professional Edition ; Windows XP Professional x64 Edition ; Windows XP Tablet PC Edition