VMware Communities
tlrgsxr
Contributor
Contributor

How do I copy files from my Desktop to a DOS virtual machine c: drive?

With other's help I've created a DOS vm to run some ancient DOS apps, but now I need to copy them from my desktop to the C: drive in the virtual machine. Can someone give me a step by step?

Thanks, Chris

Reply
0 Kudos
22 Replies
continuum
Immortal
Immortal

copy files into an ISO and point the DOS-VM to use this ISO as CD


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
tlrgsxr
Contributor
Contributor

I've tried that, as well as making it a floppy image, but neither seem to work. They're supposed to show up as a A:, 😧 or E: drive, correct?

Thanks, Chris

Reply
0 Kudos
continuum
Immortal
Immortal

Maybe you haven't closed the VM while editing the vmx-file ?


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
tlrgsxr
Contributor
Contributor

I'm new to this and I don't know what that means. What's the vmx-file?

Thanks, Chris

Reply
0 Kudos
rcardona2k
Immortal
Immortal

You can copy files to a virtual floppy on the Mac (.img), then rename to .flp and use the same method you used to install DOS to insert that virtual floppy to the virtual machine. If you create a new .flp you may have to format it, with format a: before it's usable. If OS X creates the .img, it will be formatted but the disk should be exactly 1.44MB. I have instructions on these forums.

Another choice is to download a pre-built power CD like Bart's Boot CD or Ultimate Boot CD with DOS ATAPI support so you can create an ISO on the Mac, boot into a Boot CD and copy files from the ISO you burned to C:

These same Boot CDs have LanMan support which will allow you mount a Windows share from your OS X box if the share is 8.3 name compatible. You have to know your "net use" command syntax but it definitely works.

Sorry DOS is so ancient and pretty hard to deal with, it amazes it once ruled the desktop.

Reply
0 Kudos
tlrgsxr
Contributor
Contributor

Maybe the problem I had was they weren't exactly 1.44mb.

I've created a virtual floppy, but how do I copy files to it?

I used the following... dd if=/dev/zero bs=512 count=2880 of=floppy.img

Instead of the "/dev/zero" part, is it possible to use a folder with the items I want to copy to the DOS virtual machine?

Thanks, Chris

Reply
0 Kudos
tlrgsxr
Contributor
Contributor

Ok, I have a plan. I'll go buy a blank floppy, copy the files I want to it, and make the image from that as instructed in my other thread! I'm off to the store!

Reply
0 Kudos
tlrgsxr
Contributor
Contributor

Thanks for all the replies. I found the easy way was to just buy some floppies, copy the data to it, and follow the instructions in this thread...

http://communities.vmware.com/thread/107019

Thanks again, Chris

Reply
0 Kudos
Yaztromo
Enthusiast
Enthusiast

Contrary to what has told you, you don't need to rename floppy images to end in ".flp" for them to work in Fusion. ".img" works just fine.

Part of what you were missing is that once you create the diskette image, you still need to format it. Creating the image from /dev/zero only creates a ~1.44MB file full of zeros. It doesn't add in any of the filesystem structures needed to track filenames, or which sectors of the disk belong to which files. Formatting accomplishes this for you, so once you have the image mounted in your DOS VM, you need to run the following:

        format a:

Which should result in something like the following:

Insert new diskette for drive A:
 and press ENTER when ready...

 Format complete.          

     1,457,664 bytes total disk space
     1,457,664 bytes available on disk

           512 bytes in each allocation unit.
         2,847 allocation units available on disk.

 Volume Serial Number is 3214-19F7

With that step out of the way, you can mount the .img file from both within OS X and within any VM that can read FAT-12 formatted diskettes (which is virtually all of them -- DOS, OS/2, Linux, Windows, BeOS, Solaris, etc.). And as OS X can mount the image, you can drag and drop whatever you want on the diskette to the image.

Note that 1.44MB floppies, while the most common floppy size before they died out, isn't the biggest standard floppy size. There is an official standard for a 2.88MB floppy, which DOS supports. Just change your count= statement from 2880 to 5760, change the VM's BIOS settings for "Legacy Drive A:" to a 2.88MB 3.5" floppy (press F2 at boot time to get intot he VM's BIOS settings), and enjoy twice the capacity. I'm attaching a pre-formatted, empty 2.88MB floppy image here for you to use (just note that a VM probably won't be able to mount it until you change the VMs BIOS default from an emulated 1.44MB floppy drive to an emulated 2.88MB floppy drive. Note you only ever have to do this once for any given VM. OS X will mount it just fine without any changes).

As for the image you created not being exactly 1.44MB, floppies of this size never were exactly 1.44MB in size (at least not for a 1024 * 1024 byte MB). This comes from a mixing of two different common uses of the size prefix "M", the one used by computer science (1024), and the SI prefix meaning "1000". For a good rundown on this, see the Wikipedia article on Floppy diskettes:

Reported 3.5\" DSHD FDD storage capacity

Suffice to say, the numbers I gave you previous match the exact physical characteristics of a real double sided, high density floppy diskette (2880 sectors, each 512 bytes in size).

HTH!

Yaz.

Message was edited by: Yaztromo to fix a typo.

Reply
0 Kudos
victory
Contributor
Contributor

While there's no official 'VMware Tools' for DOS, I've found this utility helpful for accessing Shared Folders from within MS-DOS. Obviously, this is a 3rd party app (not supported by VMware) and YMMV. However, I've been using it with DOS 6.22 under Fusion for a while now with no problems.

Reply
0 Kudos
rcardona2k
Immortal
Immortal

Yes, .img does work now (thanks!) it didn't earlier on. For maximum portability on other platforms, I still recommend using .flp. Workstation users may not know what an .img is for instance. If you searched the archives you would have found one easy command for creating a virtual FDD in OS X:

For reference the command is:

How to create a formatted floppy, named floppy.dmg in one shot:

hdiutil create -volname virtual -size 1440k -fs MS-DOS floppy

FWIW, I would NOT try to create a floppy larger than 1.44MB even though it is possible because of portability and BIOS configuration. If you need larger virtual storage, you're a lot better off finding a bootable CD with ATAPI cdrom support and using an ISO. Yes an ISO is not read-write but it will hold so much more data than 1.44MB floppy.

Reply
0 Kudos
dp_fusion
Enthusiast
Enthusiast

Conversely, how does one get FreeDOS files to Window/Mac filespace?

Reply
0 Kudos
Yaztromo
Enthusiast
Enthusiast

Well, with some extreme effort you might be able to get some networking working under DOS for file transfer, but it will be difficult.

If the files are sufficiently small, a diskette image will work -- the 2.88MB image I provided above can be mounted in both VMware VM's (including DOS and Windows), and in Mac OS X. I don't suggest you mount a diskette image between two or more such systems simultaneously, but if the data is relatively small, this will work.

For larger files, if you have a suitable CD-ROM driver in FreeDOS you can create a CD image in OS X containing the files you want to send to your VDM (Virtual DOS Machine) However, you can't really use this mechanism to get files back out of the VDM and into OS X (as the CD image will be non-writable).

Of course, you could always run your DOS based applications inside another DOS-compatible, network aware OS under VMware. An old version of Windows (like Windows 98) would run your DOS apps with less resources than something like XP or Vista. If you really want to pare things down, you could create an OS/2 virtual machine, strip it down to run purely in text mode (there was a text-mode only OS/2 program switcher out there back in the day), and then run an OS/2 VDM inside the OS/2 VMware VM, but with full networking capabilities enabled. Finding all this old software and configuring it is going to be a hassle, mind you, and I'm just throwing it out there for interested users to consider.

HTH!

Yaz.

Reply
0 Kudos
rcardona2k
Immortal
Immortal

If you have a Windows VM, you can attach the FreeDOS VMDK as a secondary drive to an existing VM and it will show up as the D:\ drive and you can copy the files using drag-n-drop or Shared Folders from an OS that supports these features.

Reply
0 Kudos
dp_fusion
Enthusiast
Enthusiast

That was the first thing I tried and the first that failed. Fusion didn't recognize the vmdk extension as a drive so I need to do more research. Thanks for the tip though - it's probably something easy that I haven't found yet.

Reply
0 Kudos
admin
Immortal
Immortal

That was the first thing I tried and the first that failed. Fusion didn't recognize the vmdk extension as a drive so I need to do more research.

What were your exact steps? There's no GUI for adding an existing virtual disk to an existing VM, so you have to do it by hand.

Reply
0 Kudos
dp_fusion
Enthusiast
Enthusiast

I tried using the VMWare-Mount tool for Windows in a vm but it failed to mount the vmdk file. I'm using the FreeDOS appliance that includes Turbo Pascal that I found in the VMWare appliance library.

Reply
0 Kudos
admin
Immortal
Immortal

I tried using the VMWare-Mount tool for Windows in a vm but it failed to mount the vmdk file. I'm using the FreeDOS appliance that includes Turbo Pascal that I found in the VMWare appliance library.

I think Richard was suggesting attaching the vmdk to the VM as a second disk, not opening the vmdk in the VM.

Reply
0 Kudos
dp_fusion
Enthusiast
Enthusiast

I think so, too and will try that next as soon as I figure out how. I'm a Unix guy and struggle often with Windows, so when I saw the VMWare-Mount tool I thought it might be a good shortcut to getting the job done. The documentation for this process has been difficult to pin down.

Reply
0 Kudos