Hi All,
Newbie VB user here (one week). I have been able to create a virtual WinXP using a virtual drive and booting from a WinXP CD, works like a charm. Running Win7 on a brand new HP core i7 desktop, VB 4.0.0 PUEL.
Now I want to move a working WinXP physical drive from my old desktop (a *copy* of the WinXP C: drive, not the original) into my Win7 box (i.e., a second physical drive inthe Win7 box, separate from the host Win7 drive) and use it as a rawdisk to a virtual machine.
My first question is: How to specify the second physical drive to VBoxManage (i.e., the correct syntax). To test if I got the syntax correct, I tried to list the partitions on the second drive in a Win7 command shell like this:
C:\Users\<MyUserName>\VirtualBox VMs\WinXP Home on HDD>VBoxManage internalcommands listpartitions -rawdisk \\.\PhysicalDrive1
VBoxManage.exe: error: Cannot open the raw disk: VERR_ACCESS_DENIED
Is that syntax (\\.\PhysicalDrive1) correct? If that is correct, why am I getting the "access denied" error?
TIA for any help or advice you can give me. I did try searching the forums for references to "rawdisk", but all of the ones I saw seem to be for Linux hosts, and I have a Win7 host.
Peter
Need HowTo for WinXP guest on rawdisk under Win7 host
-
zlock
- Posts: 1
- Joined: 22. Feb 2011, 17:56
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Ubuntu Gentoo
Re: Need HowTo for WinXP guest on rawdisk under Win7 host
Have a similar problem. Running 4.0.4 on Windows 7 64 bit.
Would very much like to get access to my old Gentoo 64bit SATA drive this way and all the "internalcommands" gives me is VERR_ACCESS_DENIED.
I read somewhere that using DISKPART and setting the drive offline, removing the "READ-Only" attribute on the disk would solve it. But that did not help.
Did you solve this ?
Is there anyone that sucessfully has crerated a vmdk on a Windows 7 64 bit host on a raw disk with an already functional OS ?
Would very much like to get access to my old Gentoo 64bit SATA drive this way and all the "internalcommands" gives me is VERR_ACCESS_DENIED.
I read somewhere that using DISKPART and setting the drive offline, removing the "READ-Only" attribute on the disk would solve it. But that did not help.
Did you solve this ?
Is there anyone that sucessfully has crerated a vmdk on a Windows 7 64 bit host on a raw disk with an already functional OS ?
-
dotku
- Posts: 4
- Joined: 24. Mar 2011, 10:16
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows 7
Re: Need HowTo for WinXP guest on rawdisk under Win7 host
You must use "Run As Administrator" to get the access permit
-
mpack
- Site Moderator
- Posts: 39134
- Joined: 4. Sep 2008, 17:09
- Primary OS: MS Windows 10
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Mostly XP
Re: Need HowTo for WinXP guest on rawdisk under Win7 host
Raw disk access is an expert level feature - if you need to ask how to use it then you really shouldn't be using it, especially since there are few genuine reasons to need it.
I would suggest an alternative strategy: use Disk2VHD to create a virtual disk copy of your old hard disk, temporarily writing the copy to an external USB drive - formatted with NTFS so it has no 4GB file size limit. Then as you planned, install a 2nd hard drive in your new Win7 host, and copy the .VHD file onto that (*). If you wish, that 2nd drive can be the one taken out of your old PC - however you may find that a 1TB SATA drive is a better long term investment.
Now you should have no permissions problems, nor any danger of corrupting a physical drive.
(*) As an optional step you could use CloneVDI to convert VHD to VDI, as in my opinion VDI is a better fit for VirtualBox users. In this case just get CloneVDI to do the external to internal drive copy for you: that way you get the VDI conversion for free...
I would suggest an alternative strategy: use Disk2VHD to create a virtual disk copy of your old hard disk, temporarily writing the copy to an external USB drive - formatted with NTFS so it has no 4GB file size limit. Then as you planned, install a 2nd hard drive in your new Win7 host, and copy the .VHD file onto that (*). If you wish, that 2nd drive can be the one taken out of your old PC - however you may find that a 1TB SATA drive is a better long term investment.
Now you should have no permissions problems, nor any danger of corrupting a physical drive.
(*) As an optional step you could use CloneVDI to convert VHD to VDI, as in my opinion VDI is a better fit for VirtualBox users. In this case just get CloneVDI to do the external to internal drive copy for you: that way you get the VDI conversion for free...
-
hhspiny
- Posts: 1
- Joined: 27. Mar 2011, 19:53
- Primary OS: MS Windows 7
- VBox Version: OSE other
- Guest OSses: Other
Re: Need HowTo for WinXP guest on rawdisk under Win7 host
first find out which disk you are allowing vb to have raw disk access to. it can be found in win7 host's storage manager. find out the disk number as indicated there such as "disk 0", "disk 1". note that depends on how you connect disk to sata/ide ports, the number could change if connection changes.
the in win7 host, open an administrator right command line. let's assume the disk you identified above is disk 0
>diskpart
>select disk 0
>attributes disk clear readonly
>exit
then use command
c:\program file\oracle\vboxmanager internalcommands createrawvmdk -filename c:\disk0.vmdk -rawdisk \\.\PhysicalDrive0
now you can use disk0.vmdk as the virutal disk to mount in virtual machine
the in win7 host, open an administrator right command line. let's assume the disk you identified above is disk 0
>diskpart
>select disk 0
>attributes disk clear readonly
>exit
then use command
c:\program file\oracle\vboxmanager internalcommands createrawvmdk -filename c:\disk0.vmdk -rawdisk \\.\PhysicalDrive0
now you can use disk0.vmdk as the virutal disk to mount in virtual machine
Re: Need HowTo for WinXP guest on rawdisk under Win7 host
I ran command prompd using administrator and run the command as suggest, but it failed.
DISKPART> attributes disk clear readonly
DiskPart failed to clear disk attributes.
DISKPART>
DISKPART> attributes disk clear readonly
DiskPart failed to clear disk attributes.
DISKPART>