Invalid Operation for Device 0: How to Fix It

To fix this error, simply remove the snapshots in the VM

Reading time icon 2 min. read


Readers help support Windows Report. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more

Key notes

  • Consolidating the disks in VMware is an effective method to resolve this issue.
  • When resizing the disk always remember to use decimal numbers.
invalid Operation for Device 0

Have you ever come across this kind of error message Invalid operation for device 0 while trying to expand the disk on your virtual machine? Well sit tight and scroll down for more info.

Vmware is a virtual machine software, but just like any other application, it can experience problems. We will take you on step-by-step troubleshooting methods on how to fix this issue.

What is Invalid operation device 0?

Invalid operation device 0 is a Vmware error, and it’s usually caused by the following:

  • Improper configuration – In case the virtual machine has not been configured correctly, it is possible that you may encounter this error.
  • Issues with snapshots – The snapshots should be omitted, if they are not removed you might experience this specific error.

How can I fix this Invalid operation device 0?

  • Use decimal number when resizing disk – To avoid this issue, use decimal number when resizing disk in VMware.

1. Use powercli

  1. Open powercli.
  2. Run this Get-HardDisk -vm MyVMName | where {$_.name -eq “Hard disk 1“} | Set-HardDisk -capacityGB 100.
  3. Close powercli. 
Note icon NOTE
Be sure to replace the appropriate VMname, disk name, and capacity when using this command.

2. Consolidate disks in VMware

  1. Right-click the VM name in the VMware vSphere client.
  2. In the menu, click Snapshots.
  3. Lastly, select Consolidate.

Note icon NOTE
When it comes to consolidating VMware disks, there may be a risk of losing data. To mitigate this, it’s recommended to create a backup of the VMware VM by copying all files to a separate folder on a datastore before proceeding with the disk consolidation process.

3. Remove the snapshots in VM

  1. Select Inventory and click on Virtual Machine.
  2. Next, pick Snapshot, and select Snapshot Manager.
  3. Choose a snapshot by clicking it.
  4. Click Delete. After deleting, the data is permanently saved and added to the parent data, while simultaneously removing the specific snapshot that was selected.
  5. Click Yes in the confirmation dialog
  6. Click Close to exit the Snapshot Manager. 
Note icon NOTE
Deleting all snapshots when you have limited disk space can lead to a depletion of disk space, failing all virtual machines with an existing snapshot.

We hope that this guide has helped resolve your issue. Many users reported that Vmware is not working on Windows 11, and we covered this issue in a separate guide, so be sure not to miss it.

We would be grateful if you could kindly let us know which solution proved most effective in your case by leaving a comment below.

More about the topics: vmware, Windows 11 Fix