I'm sure you would have heard of the awesome virtualization features in Windows 7. It’s pretty simple to setup a new virtual machine. In this article, we will look at few ways to work with virtual floppy images in Windows Virtual PC(WVPC).
If you're a developer, here's the treat. And the relevant powershell snippet:
$vmName = "SampleVM" # name of the virtual machine
$floppyImagePath = "D:\FloppyImage.vfd" # full path to the virtual floppy image
$vpc = new-object -com VirtualPC.Application
$vm = $vpc.FindVirtualMachine($vmName)
foreach ($floppyDrive in $vm.FloppyDrives)
$retVal = $floppyDrive.AttachImage($floppyImagePath)
Modify the variables and run the snippet in powershell.
By default, WVPC stores your virtual machines at %SystemDrive%\Users\<Username>\Virtual Machines. If you look in there, each virtual machine is simply a xml file. E.g. The contents of SampleVM.vmcx would be:
Let's go one level deep and explore the VMC file(refer vmc_path in the snippet above):
The configuration file already has the floppy node, simply modify it to add a custom floppy image(underlined below):
Save the VMC file and start using the floppy image.
Happy VM’ing :-)
Edit: Replaced images with text. Thanks Abhinaba for the suggestion :)