Discussion:
Forcing Virtual CP to use CD-Drive
(too old to reply)
a***@hotmail.co.uk
2010-07-13 10:41:40 UTC
Permalink
I have installed some software on Virtual Pc that requires a CD to be
in the drive.

How can I force Virtual PC 2007 to always use a physical drive as
standard on startup ?
MikeD
2010-07-15 02:54:09 UTC
Permalink
Post by a***@hotmail.co.uk
I have installed some software on Virtual Pc that requires a CD to be
in the drive.
How can I force Virtual PC 2007 to always use a physical drive as
standard on startup ?
I don't think you can "force" it so-to-speak. This gets saved to the .vmc
file. You could possibly write a launcher program which edits the .vmc file
and then runs VPC2007. A .vmc file is just an .xml file, which itself is
just a text file. So it's easily edited. But you gotta know what to edit in
it. I experimented a bit. With an .iso file assigned to the CD drive,
there was this in the .vmc file (hope this doesn't word-wrap too badly in a
newsgroup message; you might have to copy it to Notepad and fix
line-breaks):

<ide_adapter>
<ide_controller id="1">
<location id="0">
<drive_type type="integer">2</drive_type>
<pathname>
<absolute type="string">I:\CD Images\VB\en_vb6_ent_cd1.iso</absolute>
<relative type="string">..\..\CD Images\VB\en_vb6_ent_cd1.iso</relative>
</pathname>
</location>
</ide_controller>
<ide_controller id="0">
<location id="0">
<drive_type type="integer">1</drive_type>
<pathname>
<absolute type="string">I:\Virtual PC Files\Windows XP.vhd</absolute>
<relative type="string">.\Windows XP.vhd</relative>
</pathname>
<undo_pathname>
<absolute type="string" />
<relative type="string" />
</undo_pathname>
</location>
</ide_controller>
</ide_adapter>

After I captured a physical drive (and shutdown the guest OS so the .vmc
file would get saved), it changed to this:

<ide_adapter>
<ide_controller id="1">
<location id="0">
<drive_type type="integer">2</drive_type>
<pathname>
<absolute type="string">M</absolute>
<relative type="string" />
</pathname>
</location>
</ide_controller>
<ide_controller id="0">
<location id="0">
<drive_type type="integer">1</drive_type>
<pathname>
<absolute type="string">I:\Virtual PC Files\Windows XP.vhd</absolute>
<relative type="string">.\Windows XP.vhd</relative>
</pathname>
<undo_pathname>
<absolute type="string" />
<relative type="string" />
</undo_pathname>
</location>
</ide_controller>
</ide_adapter>

Now, what this tells me is that the CD drive seems to be IDE controller 1
and to set it to a physical drive of the host OS, you simply put in the
drive letter for <absolute type> and "clear" the <relative type>.

But in all honesty, I don't see why this would be necessary. If a physical
drive was being used when the guest OS is shutdown, then that same physical
drive is going to be used when the guest OS is re-started. And of course, if
you're not shutting down the guest OS, but instead just saving the state,
then it should still be the physical drive. Of course, this assumes the user
(be it you or whomever) hasn't changed any of this while the guest OS is
running. But even if that's the case, it's still no different than having
removed the CD or putting in a different CD in a PHYSICAL computer and then
rebooting it. So...I really don't know what you're trying to solve or
accomplish.
--
Mike
Loading...