[GH-ISSUE #73] operation failed: could not eject media on drive-ide0-1-0: Device drive-ide0-1-0 is locked #61

Closed
opened 2026-02-27 16:00:55 +03:00 by kerem · 1 comment
Owner

Originally created by @wildstray on GitHub (Jun 13, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/73

It happened when I tryed to disconnect an image from a running VM.

Environment:

Request Method: POST
Request URL: http://10.10.10.170/webvirtmgr/vds/1/test_webgui/

Django Version: 1.4.5
Python Version: 2.6.6
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs',
'vds')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/var/www/webvirtmgr/vds/views.py" in vds
  2.             libvirt_func.vds_umount_iso(conn, dom, image, storages)
    
    File "/var/www/webvirtmgr/libvirt_func.py" in vds_umount_iso
  3.     dom.attachDevice(xml)
    
    File "/usr/lib/python2.6/dist-packages/libvirt.py" in attachDevice
  4.     if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self)
    

Exception Type: libvirtError at /vds/1/test_webgui/
Exception Value: operation failed: could not eject media on drive-ide0-1-0: Device drive-ide0-1-0 is locked

Originally created by @wildstray on GitHub (Jun 13, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/73 It happened when I tryed to disconnect an image from a running VM. Environment: Request Method: POST Request URL: http://10.10.10.170/webvirtmgr/vds/1/test_webgui/ Django Version: 1.4.5 Python Version: 2.6.6 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs', 'vds') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/lib/python2.6/dist-packages/django/core/handlers/base.py" in get_response 1. response = callback(request, _callback_args, *_callback_kwargs) File "/var/www/webvirtmgr/vds/views.py" in vds 2. libvirt_func.vds_umount_iso(conn, dom, image, storages) File "/var/www/webvirtmgr/libvirt_func.py" in vds_umount_iso 3. dom.attachDevice(xml) File "/usr/lib/python2.6/dist-packages/libvirt.py" in attachDevice 4. if ret == -1: raise libvirtError ('virDomainAttachDevice() failed', dom=self) Exception Type: libvirtError at /vds/1/test_webgui/ Exception Value: operation failed: could not eject media on drive-ide0-1-0: Device drive-ide0-1-0 is locked
kerem closed this issue 2026-02-27 16:00:55 +03:00
Author
Owner

@retspen commented on GitHub (Jun 13, 2013):

Fix - github.com/retspen/webvirtmgr@741158b1f9

<!-- gh-comment-id:19415608 --> @retspen commented on GitHub (Jun 13, 2013): Fix - https://github.com/retspen/webvirtmgr/commit/741158b1f997998c32c8b18bd93130236e65eb53
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#61
No description provided.