Shared storage after a CD boot.

Discussions about using Windows guests in VirtualBox.

Shared storage after a CD boot.

Postby mpack » 16. Nov 2009, 13:52

This is a problem that has been bugging me for a while. I do have a workaround but it is very long winded.

Say I am doing a P2V (Physical to Virtual) migration, so I have this humungous drive image on a host drive that I want to "restore" onto a new VM containing a new and unformatted VDI. Lets say I boot from a BartPE ISO including the Acronis BartPE plugin. Having booted from a CD, what is the easiest way to get access to that big drive image?

Possibilities are:

1. Store the drive image on a USB drive. This would be the best, in fact it's what I use when doing a P2P, but I've had no luck at all getting a VBox VM which has booted from a CD to recognize a USB drive. Does USB require the GAs? If so, can the GAs be merged into a BartPE or other CD-boot solution?
[edit: much later I discovered that USB is done with virtual hardware, not a driver - meaning that GAs are not needed for USB to work. However VBox v4 and later does require you to install the extension pack on the host as this implements USB 2.0/3.0 support for all VMs. Remember that USB 3.0 will not work unless the recovery CD kernel supports it. ]

2. Store the drive image in a shared folder. Again we have the problem of no GAs. A proper network share would seem to be an obvious solution, except that when I tell BartPE that I do indeed want to enable network access, it immediately fails (can't access NIC). This needs more research from me, it's possible that I didn't use the right options when creating the BartPE disk.

3. My solution at the moment is to create a temp VDI, mount that in some other VM, boot that VM and copy the disk image from a shared folder onto the VDI. Move VDI over to new VM, boot the BartPE disk. Now it sees the second drive with the disk image. This works, but it's quite tedious and needs a lot more disk space and time.

4. Something else?

Any comments, better solutions? BartPE is not a requirement btw, that's just what I do at present - I'm willing to consider alternatives... except that I do want to use the Acronis BartPE plugin!
Last edited by mpack on 4. Aug 2010, 10:41, edited 3 times in total.
mpack
Site Moderator
 
Posts: 32252
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared storage after a CD boot.

Postby vbox4me2 » 16. Nov 2009, 18:17

Using network access works best, the pcnet lan nic works fine with bartpe, you might have to set it fixed to 100mb though and use Bridge mode.
vbox4me2
Volunteer
 
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: Shared storage after a CD boot.

Postby mpack » 16. Nov 2009, 19:04

vbox4me2 wrote:Using network access works best, the pcnet lan nic works fine with bartpe

Thanks for that encouraging news. I'll give that a bash this evening, and I'll take a look at my BartPE options too, to see if I left out anything relevant from the ISO build. It would be fine if I needed to attach the VDI to a specialised VM optimized for BartPE - that still means a lot less disk space and copying time than my current method.

vbox4me2 wrote:you might have to set it fixed to 100mb though

I have no idea what that means! Are you referring to the Ethernet hardware variant? I didn't realize that was relevant to a virtual ethernet connection.
mpack
Site Moderator
 
Posts: 32252
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared storage after a CD boot.

Postby vbox4me2 » 16. Nov 2009, 20:26

When the BartPE network dialog comes up you can set the speed fixed.
vbox4me2
Volunteer
 
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: Shared storage after a CD boot.

Postby Martin » 16. Nov 2009, 21:41

The speed setting of the virtual network card doesn't change anything :wink:
The useable speed is only related to the physical connection.
Martin
Volunteer
 
Posts: 2384
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Linux, OS/2

Re: Shared storage after a CD boot.

Postby vbox4me2 » 16. Nov 2009, 22:32

For bartPE it does :wink:
vbox4me2
Volunteer
 
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam

Re: Shared storage after a CD boot.

Postby MarkCranness » 17. Nov 2009, 02:46

I had a similar problem myself recently. The solution was painful. My experience might not help you, but I feel like a vent!

No USB drives visible in the VM without GA.
File and Printer Sharing not enabled on my host and I didn't want to enable it.
File and Printering Sharing enabled on another PC on my lan, but no amount of 'net use' was going to let me connect.
I ended up starting the FTP server I have on the other PC and using that (Internet Explorer on UBCD4WIN can connect to FTP).
The FTP software I use (a pain to configure): War FTP Daemon - The original free FTP server for Windows

Based on your option 2, you could use IE to FTP the image file to a temp VDI then proceed from there.
MarkCranness
Volunteer
 
Posts: 875
Joined: 10. Oct 2009, 06:27
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows Server 2008 R2; Ubuntu 11.04; Windows 2000 Server; Windows XP

Re: Shared storage after a CD boot.

Postby mpack » 17. Nov 2009, 11:37

MarkCranness wrote:Based on your option 2, you could use IE to FTP the image file to a temp VDI then proceed from there.

Um, you seem to be suggesting doing what I already do - which is copy the drive image from the host to a temp VDI file, except that FTP would be even slower. I'm looking for a technique that allows me to "restore" a drive image stored on a host drive directly onto the target VDI without intermediate copying, and with the additional complication that only partial OS functionality is available because it's a BartPE (or a similar rescue CD) type boot.
mpack
Site Moderator
 
Posts: 32252
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared storage after a CD boot.

Postby mpack » 17. Nov 2009, 12:36

Well, I had partial success. After booting BartPE I was able to enable the network connection after which I could see my host PC and its shared folders. However, while I could see the files inside one shared folder, I couldn't see the files in the important folder, i.e. the one with the big drive image files. Very odd, this is not a problem I've seen before (though this is the first time I've tried it with the 3.1.0 beta).

Maybe I should try this with a working (not BartPE) VM, for comparison.

(Edit, sometime later).

The other VM (a fully functional XP, not a BartPE boot) said "Access denied" to the new shared folder I had designated. The same VM was able to access two other shared folders just fine, so this seems to be a host permissions issue, not a problem with BartPE. Some background: my host PC has two internal hard drives, and it so happens that I already had one shared folder on each drive. Those are the folders I can access ok. I added a third shared folder on the second host HDD, this folder containing some Acronis .tib files. This third shared folder is the one I can't access, even though the permissions appear to be identical to those of the working folders - I don't know what's going wrong here. The two working share names were "Shared" and "Downloads", and the third non working share was called "SysBackup".

If instead of a third shared folder I put the .tib files in a subfolder of my working, second shared folder, then I can access it fine - and I can also access it from the BartPE VM.

(Edit2).
Right as I was posting that last edit, I realized that the only unusual feature of that third folder was the mixing of case in the share name. So, I renamed the folder to "Sysbackup" - and then it worked! This is excellent, because I know from previous experiments that I can create a shared folder on a removable drive, meaning I can use Acronis to image a PC into that folder on a USB drive, move it to another PC running VBox, and restore the Acronis image into a VM, all without ever copying files. Perfect!

Incidentally, I discovered that "Host Only Networking" works fine for this, I don't need to use bridged. "Host Only" is simpler because I can designate the shared folder using a fixed IP address.
mpack
Site Moderator
 
Posts: 32252
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared storage after a CD boot.

Postby mpack » 17. Nov 2009, 14:11

Ok then, to recap the easiest way to do a P2V with the Acronis plugin on a BartPE CD...

As always, you first need to prepare the source PC as described here. You may also want to do other things such as install recovery console, or "Sysprep" it so that you'll run through a mini-setup when the VM version first boots.

1. Boot up the BartPE+Acronis CD on the PC you want to clone. Connect a removable USB drive to that PC, and use Acronis to do a full disk image, storing the .tib file into a folder on the USB drive. The USB folder should be given a simple name with letters only (no spaces or other strange characters).

2. Go to the PC which will host your new VM. Connect the USB drive, designate the appropriate folder on that drive as a shared folder. Remember to check the permissions and ensure that everyone has read access.

3. Create a new VM on the host PC, with a new virtual HD large enough to receive the uncompressed Acronis image. Select "Host Only Networking" for now (you can change that once you complete the P2V), "PCnet-FAST III" network adapter.

4. Boot up the new VM from an ISO image of the same BartPE CD used earlier. When BartPE asks if you want to enable network connections, say yes, then accept defaults in the next couple of dialogs (autodetect was ok: I found that manually selecting 100Mbps ethernet was not required).

5. Use BartPEs "A43 File Management Utility" - which is quite similar to Windows Explorer - and use it to map the shared folder to a drive letter. Then run Acronis and browse to that drive letter: the Acronis image should be right there, waiting to be "restored" onto the new VMs virtual HD.
mpack
Site Moderator
 
Posts: 32252
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Shared storage after a CD boot.

Postby mpack » 18. Nov 2009, 19:02

Further to this: I finally worked out how to get BartPE to recognize a USB drive (hooray!).

Checking around on the web, the basic problem seems to be that BartPE doesn't (always) recognize a USB drive if you plug it in after the BartPE CD has finished booting up. On the other hand, it's an unfortunate fact that with the way VBox USB support works, the guest will not capture the USB device if it was plugged in before the VM was started.

So, the trick is to plug the USB device in during that short window of time after the BartPE CD starts, but before it finishes booting. In other words, plug in the USB drive as soon as you see the "Starting BartPE" message (and not before, i.e. don't plug the device in while the Oracle logo is still showing). When BartPE finishes the boot, run the "A43 File Management" utility, and there is your USB drive! No need to enable network support with this one.

Naturally, for this to work you must previously have enabled USB support in the VM settings, and added an appropriate filter for your USB device.
mpack
Site Moderator
 
Posts: 32252
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP


Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 19 guests