ISO file being modified? Print
Monday, 02 February 2009
It turns out that some virtual machines will try to update an ISO image!

Sometimes when strange things happen we start looking at the issues we normally take for granted. For example: Can I trust my Windows XP SP2 CD? Has it been corrupted?

Recently, while working on a Virtual Machine, I was having big problems with a very simple installation. At some point I decided to go back to a repository where I keep my old CD images and generate an MD5 sum for the original image file - then compare that with the local copy that I had on my workstation. Sure enough - the files were different! After a bit of tinkering I discovered that the Virtual Machine was actually writing to the ISO file... which is not supposed to happen!

To make this problem go away, I thought at first that it would be enough to change the permissions on the ISO file to read-only. Perhaps that is enough - but then I had a better idea: mount the ISO file onto a loopback device and set the loopback device to read-only. Think of this as a brute force solution to the problem:

sudo /sbin/losetup --verbose --read-only -f ms-WinXP-sp2.iso
Loop device is /dev/loop0

The --verbose option will cause losetup to tell you the name of the loop device that it assigned. Use the --all option to get a list of all the loop devices that have images mounted on them:

sudo /sbin/losetup --all

Finally, edit the configuration details for the VM to access that loopback device instead of the ISO file.

Later tests showed that the Virtual Machine was no longer changing the ISO file.

 
< Prev   Next >

Mailing List

To join our mailing list,
enter your email address
and press Subscribe:

AzerTech RSS


Copyright © 2010 by AzerTech.net, All rights reserved.
Powered By BNT Solutions, Inc.



Note: Site functionality is impaired when using IE6 or less.