Q: How do I attach a floppy disk to a virtual machine (VM) with Windows Virtual PC?

A: The graphical interface to configure virtual machines (VMs) doesn't have an option to attach floppy drives. However, it's still possible through a script.

The script below attaches the floppy disk image (VFD) to the VM specified:

Set objVPC = CreateObject("VirtualPC.Application")

Set objVM = objVPC.FindVirtualMachine("NT351")

Set colFloppyDrives = objVM.FloppyDrives

For Each objDrive in colFloppyDrives
    retVal = objDrive.AttachImage("d:\temp\win98se\win98ebd.vfd")
Next

Change the name of the VM (NT351) and the VFD (d:\temp\win98se\win98ebd.vfd) to match your values.

To detach run the following script:

Set objVPC = CreateObject("VirtualPC.Application")

Set objVM = objVPC.FindVirtualMachine("NT351")

Set colFloppyDrives = objVM.FloppyDrives

For Each objDrive in colFloppyDrives
    retVal = objDrive.ReleaseImage()
Next

See more FAQs on virtualization, System Center, and all things IT pro at John Savill's FAQs.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish