On Wed, Mar 22, 2023 at 12:00 PM morgan cox <morganco...@gmail.com> wrote:

> Hello.
>
> Is it possible to remove a (unmounted, unused) disk from a VM when online?
>
> I tried via the UI and I get 'Error while executing action: Cannot remove
> Virtual Disk. At least one of the VMs is not down.'
>
> I know you can with standard KVM/Libvirt/virt-manager - is there any way I
> can remove a disk from a VM whilst it is online in Ovirt ?
>
> Thanks


Preliminary task is to remove the device from VM OS point of view. This way
you don't get error messages when you unplug it from oVirt UI
If not used, not mounted, you can simply run
echo 1 >  /sys/block/device-name/device/delete

Pay attention to device-name, that should match your intended one!

Then I think you should go under the disks subtab of the running vm, select
the disk and deactivate it. Then you can remove it.
In case you already went through this, what is your oVirt version and which
type of virtual disk (virtio/virtio-scsi, ecc..)?

See also here the documentation for other details:
https://www.ovirt.org/documentation/virtual_machine_management_guide/index.html#Removing_Virtual_Disks_From_Virtual_Machines

HIH,
Gianluca
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/RLY6CVNPTA7AIWJIRK4GTXPKHMNYK67N/

Reply via email to