Page 1 of 1
Automate img creation for every session?
Posted: 20. Sep 2011, 10:23
by lindsey
According to the
official manual, I have to create an img of my real hard disk. I am dual booting with Windows 7 and Ubuntu 11.04, handled by GRUB. This may complicate things I suspect.
- What is the best way to create a disk image?
- How do I do this everytime so it reflects the current state of my hard disk.
- Is there a way to automate the image creation so I don't need to create a new img everytime to reflect latest changes to my hard disk?
Please bear in mind, I'm a fairly new user and not at all a computing expert, so please try to keep the solution simple and accessible.
Edit: You know what, how can I skip the unnecessary img step. Can't I run Windows off the raw physical partition? Surely there must be an easier way than this.
Re: Automate img creation for every session?
Posted: 20. Sep 2011, 17:04
by mpack
It would be nice if you indicated the exact user manual section you are referring to, because at the moment I have no clear idea what you are talking about. While it is certainly possible for experts to do it, there is no requirement to image a host drive before you can use VirtualBox. Most VBox users simply install a new OS, and there is no question of synchronisation because the VM is treated as a separate PC.
If you insist on running the same XP image as both a VM (using raw access) and native, then the details can be found in the "Howtos and Tutorials" forum.
Re: Automate img creation for every session?
Posted: 21. Sep 2011, 12:33
by lindsey
mpack wrote:It would be nice if you indicated the exact user manual section you are referring to, because at the moment I have no clear idea what you are talking about. While it is certainly possible for experts to do it, there is no requirement to image a host drive before you can use VirtualBox. Most VBox users simply install a new OS, and there is no question of synchronisation because the VM is treated as a separate PC.
If you insist on running the same XP image as both a VM (using raw access) and native, then the details can be found in the "Howtos and Tutorials" forum.
The link to the section I was alluding to is
here. Yes, you are right, it isn't strictly necessary but as the guide says, "the most common way is to use a large image file on your "real" hard disk, whose contents VirtualBox presents to your VM as if it were a complete hard disk". And since it didn't elaborate on other ways, I was given the impression it wasn't readily possible to host an existing OS directly, bypassing the need to create an image. Of course, experts can do anything, you are right. I have googled around and found only very complicated hacks and procedures to directly host the alternate OS.
I'll try to find the relevant section on raw access. Any help is welcome; I'm not too proud to admit I could use guidance as this is far outside of my comfort zone.
Re: Automate img creation for every session?
Posted: 21. Sep 2011, 13:22
by mpack
Ah, I see. It seems that you read something unintended into the word "image". The "image file" is an image of the virtual drive, not of the host drive. The contents of the image are created by the VM, e.g. when you install an OS using a virtual CD image (an ISO). While it is obviously possible to create the image by cloning a physical drive that is not in any way required.
Forget the raw access route. As I mentioned before, I wasn't sure what you were talking about, and that could have been it, but raw access is a very dangerous feature (like: liable to trash your host PC), so that feature is best left until you've learned more about VMs.
Stop thinking about it: get yourself a Linux install ISO: easy to install and no OS activation/license concerns. Create a VM and follow your nose. As long as you avoid raw access you may have to start again a few times but you won't do any damage, and you'll learn fast.
Re: Automate img creation for every session?
Posted: 21. Sep 2011, 16:00
by lindsey
Thanks mpack. Your advice sounds very sensible.
I may not be able to avoid raw access for long though, as dangerous as that path sounds, it is basically the solution to a problem with my current dual OS set up: Win7 and Ubuntu 11.04. My preferred OS atm is Ubuntu but I can't avoid having to use Windows because of several Windows-only-based programs I am forced to regularly use. Wine does not support ChemDraw (well) for example, so using a virtual machine is the obvious and only solution. Since having these programs simultaneously open with Ubuntu programs, would greatly facilitate my work, then my ideal goal is to be able to run them inside Windows inside VB, inside Ubuntu.
I read for example this
how-to. And this is perhaps typical in that it involves taking risks, hacking about, knowledge, time, and patience. I wish there were a simpler, mainstream way to achieve what I want.
Even if I create a new Windows installation inside VB, there is the issue of activating Windows 7, and the fact that all my files and programs, configurations are on an existing partition. It would be prohibitively time-consuming to reconfigure a new Windows installation, given the power user that I am. And I still want to maintain access to Windows 7 should I choose to boot up with that.
Where does this leave me? I want to follow your advice, but I need a workable solution to my predicament...
Re: Automate img creation for every session?
Posted: 21. Sep 2011, 19:04
by mpack
Sorry, but I'm afraid that Win7 is not designed to be run from two host PCs (one real and one virtual), and having two operating systems trying to be in charge of the same disk is another cause for concern, so I don't see how doing both of these at once is ever going to be regarded as mainstream, easy or risk free. The latter link you posted seems to be the one you would need to follow if you want to go down that route.
The only alternative is to start with a fresh install of Win7 (XP 32bit would need less resources) and build it up over time - with no intention of keeping it perfectly integrated with your Win7 partition.
Re: Automate img creation for every session?
Posted: 22. Sep 2011, 11:35
by lindsey
The only alternative is to start with a fresh install of Win7 (XP 32bit would need less resources) and build it up over time - with no intention of keeping it perfectly integrated with your Win7 partition.
If I do this, can my virtual Windows, all its contents and settings, be retained and exported elsewhere for use? I want to know that my investment is not going to waste. Say I want to delete my Ubuntu OS or reformat my entire hard drive and all OSs on it, do I get to keep everything in my virtual Windows, all the changes, configurations, files? Can I save/copy the virtual hard disk somewhere before I format my paritition or drive, or export it to another computer to use?
My other big question is can I copy text and files inside the virtual guest machine and paste things out into the hosting machine? Can data be moved between virtual and hosting machine in this way? As if it were another window open?
Re: Automate img creation for every session?
Posted: 22. Sep 2011, 12:57
by mpack
A VirtualBox v4 VM which uses a simple VDI image file is easily portable to a different host, or to a different OS on the same host. In fact I move VMs between hosts all the time, though all my hosts run the same OS (Windows XP), and once the VMs exist on each host I thereafter only copy the VDI in order to synch up.
You can also use disk imaging tools such as Acronis, inside the VM, as an independant way of to backing up the virtual PC's hard drive. These backup images are then portable to physical PCs as well as to other VMs.
Re: Automate img creation for every session?
Posted: 23. Sep 2011, 10:17
by lindsey
Thanks mpack. Any idea about the second part of my question? Is there a way the clipboard can operate across the virtual/real barrier? I can copy content from inside my virtual box out into the real desktop? Simple text, files, maybe more complex objects? Is this flow of information possible?
Re: Automate img creation for every session?
Posted: 23. Sep 2011, 12:07
by mpack
Clipboard copying of text works if you install the GAs, but clipboard copying of files between host and VM is not currently possible in VirtualBox. You do have access to shared folders however.
Re: Automate img creation for every session?
Posted: 23. Sep 2011, 14:53
by lindsey
mpack wrote:Clipboard copying of text works if you install the GAs, but clipboard copying of files between host and VM is not currently possible in VirtualBox. You do have access to shared folders however.
The "GAs"? What are these?
Re: Automate img creation for every session?
Posted: 23. Sep 2011, 15:10
by mpack
Guest Additions. Please read the user manual for basic information. Chapter 4 discusses the GAs.