Difference between revisions of "Transfer files from the host OS to the virtual drive"

From ReactOS Wiki
Jump to: navigation, search
Line 1: Line 1:
__TOC__
+
=Intro=
==Intro==
 
 
Many users prefer to test ReactOS under emulators and virtualizers like QEMU or VMware. But for testing their software they will need to copy their files into the .iso images and add them into proper directories which can become a difficult job. A way around this is to mount the virtual hard drives as disk drives attached to the system itself. Which can be easily done using [http://chitchat.at.infoseek.co.jp/vmware/vdk.html VDK] or [http://www.vmware.com VMware Mount]
 
Many users prefer to test ReactOS under emulators and virtualizers like QEMU or VMware. But for testing their software they will need to copy their files into the .iso images and add them into proper directories which can become a difficult job. A way around this is to mount the virtual hard drives as disk drives attached to the system itself. Which can be easily done using [http://chitchat.at.infoseek.co.jp/vmware/vdk.html VDK] or [http://www.vmware.com VMware Mount]
  
----
+
=VDK=
==VDK : Supports QEMU too.==
 
 
*VDK (Virtual Disk Driver) can mount vmdk and raw format virtual drives which are supported by QEMU and VMware.
 
*VDK (Virtual Disk Driver) can mount vmdk and raw format virtual drives which are supported by QEMU and VMware.
  
*'''Getting the driver (VDK).'''
+
==Getting the driver (VDK)==
 
You can download VDK from [http://chitchat.at.infoseek.co.jp/vmware/vdk.html here]. At the time of writing of this HOWTO the latest version is version 3.2 .
 
You can download VDK from [http://chitchat.at.infoseek.co.jp/vmware/vdk.html here]. At the time of writing of this HOWTO the latest version is version 3.2 .
Download the .zip file and extract it to your desired folder using your favourite archiver. Suppose it is C:\VDK
+
Download the .zip file and extract it to your desired folder using your favourite archiver.
( '''NOTE:''' All suppositions are meant for the tutorial only. You can use the desired locations.)
 
  
'''Setting up the driver.'''
+
==Setup the driver==
**Open the command prompt and move to the folder where you have extracted VDK using cd command. eg. C:\VDK
+
*Open the command prompt and move to the folder where you have extracted VDK using cd command. eg. C:\VDK
**To install the driver itself ( vdk.sys ).
+
*Issue the following command with the command prompt in the same directory,
Issue the following command with the command prompt in the same directory,
+
  vdk install /auto
  vdk install
+
 
What it does,
+
/AUTO Configures the driver to start at the system startup. (Note: this option does not start the driver after installation is completed.) By default the driver has to be started manually.
vdk    - Starts the application.
 
install - Asks vdk to install the driver.
 
  
 +
The Virtual Disk kernel-mode Driver(vdk.sys) is copied to %SYSTEMROOT%\system32, you may need administrator provilages to install the driver.
  
'''To start the driver.'''
+
==Start the Driver==
Even though the driver is installed , it is'nt running.To start it issue the following command,
+
Even though the driver is installed, it may not be actually running. To start it issue the following command,
 
  vdk start
 
  vdk start
What it does,
 
vdk    - Starts the application.
 
start  - Starts the driver (vdk.sys) itself.
 
  
 +
If the driver is not already installed, this command attempts to install it with the default options. It is recommended that you use "vdk install /auto" so that you dont have to manually start the driver every time.
 +
 +
==Mounting the virtual drive==
 +
 +
SYNTAX:
 +
  VDK.EXE OPEN disk# image [/RW | /WB | /UNDO] [/P:part#] [/L:drive]
 +
 +
OPTIONS:
 +
  disk#    Specifies the virtual disk number.
 +
            This must be the first parameter.
 +
            '*' means the first available disk, and if all existing disk is
 +
            busy a new virtual disk is created.
 +
 +
  image    Specifies the path to the disk image file.
 +
            This must be the second parameter.
 +
 +
  /RW      Open the image in Read-Write mode.
 +
 +
  /WB      Open the image in Write-Block mode.
  
'''Mounting the virtual drive.'''
+
  /UNDO    Creates a REDO log for the image and open in Read-Write mode.
Again, suppose you have the virtual drive in C:\ReactOS\ReactOS.vmdk or ReactOS.img (raw) .
 
In the vdk directory issue the following command,
 
vdk open * C:\ReactOS\ReactOS.vmdk /rw
 
  
What it is doing,
+
  /P:part# Specifies a partition number to set a drive letter.
vdk  - Starts the application.
+
            Drive letters can be set/removed later with LINK/ULINK commands.
open - Initiates the command to mount the virtual drive.
+
            By default, drive letters are assigned to all mountable partitions.
  *    - Mounts the virtual drive to the first available drive letter.
 
.... - It is followed by the path to the virtual drive. ( ReactOS.vmdk or ReactOS.img)
 
/rw  - This option mounts the drive with read as well as write support.
 
  
*Then the drive is properly mounted. And you can copy the required files as usual.
+
  /L:drive  Specifies drive letters to assign to partitions.
 +
            By default, the first available drive letter is used.
  
'''Unmounting the virtual drive.'''
+
Only one of /RW, /WB and /UNDO can be used at a time.
Once done the virtual drive needs to be unmounted. It will save the files to the virtual hard disk eg.ReactOS.vmdk or ReactOS.img . This is done by issuing the following command in the vdk directory,
+
When none of these is specified, the image is opened in Read-Only mode.
vdk close *
 
  
What it does,
+
*Example of Vdk usage
vdk   - Starts the application itself.
+
In the vdk directory issue the following command,
close - Initiates unmount.
+
  vdk open * C:\ReactOS\ReactOS.vmdk /rw
  *     - Unmounts all mounted virtual drives.
 
  
* Once this is done the files will be available in the virtual hard drive.
+
==Unmounting the virtual drive==
 +
Once you are done using the virtual drive it needs to be unmounted. This is done by issuing the following command,
 +
vdk close *
  
 +
Failure to do this will result in the drive being locked and usuable to vmware or qemu.
  
*'''Stoping the driver.'''
+
==Stoping the driver==
 
If you want you can stop the driver using,
 
If you want you can stop the driver using,
 
  vdk stop
 
  vdk stop
  
 
More details and options are available in the '''Readme.txt''' in the previously downloaded .zip file.
 
More details and options are available in the '''Readme.txt''' in the previously downloaded .zip file.
----
 
  
==VMware Disk Mount==
 
  
*VMware Disk Mount Utility is '''much more easier''' to use but will work only with .vmdk files.(Official VMware virtual disk file format.)
+
=VMware Disk Mount=
 +
 
 +
*VMware Disk Mount Utility is easier to use but will work only with .vmdk files.(Official VMware virtual disk file format.)
 
*Download and install the tool which is available at the [http://www.vmware.com VMware website].
 
*Download and install the tool which is available at the [http://www.vmware.com VMware website].
 
*Start Command Prompt.
 
*Start Command Prompt.
Line 79: Line 87:
 
  '''NOTE:'''  - The path above is an example. Use the path where you have saved your .vmdk file.
 
  '''NOTE:'''  - The path above is an example. Use the path where you have saved your .vmdk file.
  
*'''Unmounting the virtual drive.'''
+
==Unmounting the virtual drive==
 
To unmount the virtual drive issue the following command,
 
To unmount the virtual drive issue the following command,
 
  vmware-mount z: /d
 
  vmware-mount z: /d

Revision as of 09:24, 16 August 2006

Intro

Many users prefer to test ReactOS under emulators and virtualizers like QEMU or VMware. But for testing their software they will need to copy their files into the .iso images and add them into proper directories which can become a difficult job. A way around this is to mount the virtual hard drives as disk drives attached to the system itself. Which can be easily done using VDK or VMware Mount

VDK

  • VDK (Virtual Disk Driver) can mount vmdk and raw format virtual drives which are supported by QEMU and VMware.

Getting the driver (VDK)

You can download VDK from here. At the time of writing of this HOWTO the latest version is version 3.2 . Download the .zip file and extract it to your desired folder using your favourite archiver.

Setup the driver

  • Open the command prompt and move to the folder where you have extracted VDK using cd command. eg. C:\VDK
  • Issue the following command with the command prompt in the same directory,
vdk install /auto

/AUTO Configures the driver to start at the system startup. (Note: this option does not start the driver after installation is completed.) By default the driver has to be started manually.

The Virtual Disk kernel-mode Driver(vdk.sys) is copied to %SYSTEMROOT%\system32, you may need administrator provilages to install the driver.

Start the Driver

Even though the driver is installed, it may not be actually running. To start it issue the following command,

vdk start

If the driver is not already installed, this command attempts to install it with the default options. It is recommended that you use "vdk install /auto" so that you dont have to manually start the driver every time.

Mounting the virtual drive

SYNTAX:

 VDK.EXE OPEN disk# image [/RW | /WB | /UNDO] [/P:part#] [/L:drive]

OPTIONS:

 disk#     Specifies the virtual disk number.
           This must be the first parameter.
           '*' means the first available disk, and if all existing disk is
           busy a new virtual disk is created.
 image     Specifies the path to the disk image file.
           This must be the second parameter.
 /RW       Open the image in Read-Write mode.
 /WB       Open the image in Write-Block mode.
 /UNDO     Creates a REDO log for the image and open in Read-Write mode.
 /P:part#  Specifies a partition number to set a drive letter.
           Drive letters can be set/removed later with LINK/ULINK commands.
           By default, drive letters are assigned to all mountable partitions.
 /L:drive  Specifies drive letters to assign to partitions.
           By default, the first available drive letter is used.

Only one of /RW, /WB and /UNDO can be used at a time. When none of these is specified, the image is opened in Read-Only mode.

  • Example of Vdk usage

In the vdk directory issue the following command,

vdk open * C:\ReactOS\ReactOS.vmdk /rw

Unmounting the virtual drive

Once you are done using the virtual drive it needs to be unmounted. This is done by issuing the following command,

vdk close * 

Failure to do this will result in the drive being locked and usuable to vmware or qemu.

Stoping the driver

If you want you can stop the driver using,

vdk stop

More details and options are available in the Readme.txt in the previously downloaded .zip file.


VMware Disk Mount

  • VMware Disk Mount Utility is easier to use but will work only with .vmdk files.(Official VMware virtual disk file format.)
  • Download and install the tool which is available at the VMware website.
  • Start Command Prompt.
  • Move to the installation directory. eg. C:\Program Files\VMware\VMware DiskMount Utility\
  • Mounting the virtual drive.

Issue the following command,

vmware-mount z: C:\ReactOS\ReactOS.vmdk

What it does,

vmware-mount - Starts the mount application.
z:           - Drive letter for the mounted drive. (You can use any free drive letter.)
...(Path)    - Path to the virtual disk drive. 
NOTE:  - The path above is an example. Use the path where you have saved your .vmdk file.

Unmounting the virtual drive

To unmount the virtual drive issue the following command,

vmware-mount z: /d

What it does,

vmware-mount - Starts the mount application.
z:           - Drive letter for the virtual drive to be unmounted.
/d           - Unmounts the drive.
  • More information on other options can be found in the VMware mount documentation.