1

We use a mix of Windows 7 physical desktops and vitual machines (hosted on ESX). We use the same image and AD domain for both.

On the VMs, when we create a new volume, whether on an existing disk or a new one, it appears as read-only. Read-only flags are not set in diskpart, nor does clearing those flags make the disk readable. This problem does not affect our physical desktops.

Here are steps you can replicate on your Win7 system:

  1. Apply a Windows 7 image. Don't join to a domain. Log on as local administrator.
  2. Open computer management and browse to disk management.
  3. If Disk 0 is full, right click on the C volume and shrink it to get some free space. Or just add a hard drive in vCenter.
  4. Right-click on the unallocated space and create a new simple volume. In the wizard, give it a drive letter and format it as NTFS.
  5. Open DiskPart. In Diskpart, enter 'select disk 0' and 'select volume y' where y is the volume number of the new volume.
  6. Enter the commands 'attr disk clear readonly' and 'attr volume clear readonly'
  7. Enter 'detail disk' and 'detail volume' to verify that the read only flag is set to no.
  8. Close DiskPart and open Windows Explorer. Right-click on the new drive and bring up properties.
  9. Verify permissions are set so that the Administrators group has Full Control.
  10. Right-click on open space in Windows Explorer and notice that "New" is not in the context menu.
  11. Drag a file to the drive and get an error that the media is write-protected.
  12. Go back into properties and try to change permissions. Get "media is write protected" errors again.
  13. Repeat steps 5 - 10 until you go nuts.

If we apply this same Win7 image to a physical desktop, new volumes are read-write as normal. If we perform these steps on Server 2012 VMs on the same datacenter/cluster/datastore, new volumes are read-write as normal. If we apply this Win7 image to a VM, the volumes are read-only despite diskpart listing them as read-write.

  • How are you applying the image? Template? SCCM? Something else? – TheCleaner Apr 6 '17 at 18:58
  • SCCM. We have an automated installer on DVD that includes Win 7 and a few options like the JRE and .Net Framework. It's the Army Gold Master, if you're familiar with that. – Michael Cornn Apr 6 '17 at 19:01
  • Our production image is applied by SCCM. For our VMs, we're building a template with which to use VMWare Composer. Composer creates a temporary volume on the VM as part of the deployment process, and that's where we found this glitch. – Michael Cornn Apr 6 '17 at 19:01
  • 1
    I don't have a great answer for this but I did find this which leads me to believe the issue lies with AGM: sevenforums.com/virtualization/… – TheCleaner Apr 6 '17 at 20:58
2

VMware sent me this link. The AGM has a problem with the default way ESX mounts disks. http://kb.vmware.com/kb/1012225

From the site: To disable HotPlug capability using the vSphere Client:

  1. Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.
  2. Power off the virtual machine.
  3. Right-click the virtual machine and click Edit Settings.
  4. Click the Options tab.
  5. Click General > Configuration Parameters > Add Row.
  6. Insert a new row with the name devices.hotplug and a value of false.
  7. Power on the virtual machine.
  • If you can't find this in your UI, try editing .vmx file of your VM adding the row devices.hotplug = "FALSE" at the end. – eldos Mar 2 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.