locked
Is it possible to mount the vhd file as read only when it is being used by a virtual machine? RRS feed

  • Question

  • Hi,

    When I tried to do this, I got the error saying it is being used by another process so I couldn't mount it....

    I was able to mount this before as read-only but not sure what happened but now it won't let me.  Any suggestions? 

    Also, do you need integration service installed on guest machine to be able to use virtual scsi disk?  For some reason, my vm linux server does not even see the virtual scsi disk (it does not have IC for linux installed).  Thanks.




    Thanks first.
    Wednesday, November 11, 2009 4:19 AM

Answers

  • Hi,

    When I tried to do this, I got the error saying it is being used by another process so I couldn't mount it....

    I was able to mount this before as read-only but not sure what happened but now it won't let me.  Any suggestions? 

    Also, do you need integration service installed on guest machine to be able to use virtual scsi disk?  For some reason, my vm linux server does not even see the virtual scsi disk (it does not have IC for linux installed).  Thanks.


    The safest way to mount a VHD that is being used by a VM is to create a differencing disk and point that to the VHD - then you mount the differencing disk.  This guarantees that you will not alter the root VHD.
    And yes, you can mount a VHD read-only (not present it to a VM this way - but mount it at the host or any Server 2008 R2 / Win7 system)
    This is through Disk Management (or using Diskpart)

    In regards to the virtual SCSI - yes, Integration Components are required to be installed in the VM for the VM to be able to support a virtual SCSI bus, and therefore hot add / remove.  As hot add / remove is only support for SCSI presented virtual disks.

    Then you go into the OS and have to perform the requisite mount, umount, etc.

    Brian Ehlert (hopefully you have found this useful)
    • Proposed as answer by Vincent Hu Tuesday, November 17, 2009 9:35 AM
    • Marked as answer by Vincent Hu Wednesday, November 18, 2009 9:14 AM
    Wednesday, November 11, 2009 3:40 PM