VM fails to start with error "Exit message: Bad volume specification"

Solution Verified - Updated -

Environment

  • Red Hat Virtualization (RHV-M) 4.x

Issue

  • Unable to start VM and fails with the following error message:
2023-05-30 08:10:59.461+00 | VM MY_VM is down with error. Exit message: Bad volume specification {'index': 2, 'domainID': 'a4fb514e-3318-47c0-ab48-3b634c27950f', 'reqsize': '0', 'name': 'sdc', 'alias': 'ua-de245259-050f-442a-8576-2cb0373ffd7f', 'format': 'raw', 'poolID': '00000001-0001-0001-0001-000000000311', 'volumeID': '259c6abe-3790-40a4-b833-34c4680a7a52', 'apparentsize': 0, 'diskType': 'block', 'discard': False, 'specParams': {}, 'readonly': True, 'iface': 'sata', 'truesize': 0, 'propagateErrors': 'report', 'address': {'bus': '0', 'controller': '0', 'type': 'drive', 'target': '0', 'unit': '2'}, 'device': 'cdrom', 'path': '/rhev/data-center/mnt/blockSD/a4fb514e-3318-47c0-ab48-3b634c27950f/images/ae535574-6f21-4483-8aad-e7a79b6135ca/259c6abe-3790-40a4-b833-34c4680a7a52', 'imageID': 'ae535574-6f21-4483-8aad-e7a79b6135ca', 'type': 'disk'}.

Resolution

  • Remove the "Attach CD" option from the VM, then try to start the VM
RHV-M UI/Webadmin -> Compute -> Virtual-Machines
    Select VM MY_VM -> Click on Edit
        On the Left pane/window search for "Boot Options"
        If it not listed, then click on "Show Advanced Option" at the bottom
        Click on "Boot Options" and uncheck the "Attach CD"
        Click OK

Root Cause

  • The VM is failing to start because the VM has setup to boot with CD RHV-toolsSetup_4.3_10.iso.
    The volume/image of RHV-toolsSetup_4.3_10.iso is marked ILLEGAL, hence fails to boot.

  • It is difficult to ascertain why the image/volume was set to ILLEGAL as the logs are not available (rolled over).

Diagnostic Steps

  • The error messages seems indicates there is a cd-rom device that is not correct state, which is preventing the VM to start
VM MY_VM is down with error. Exit message: Bad volume specification {
'index': 2, 
'domainID': 'a4fb514e-3318-47c0-ab48-3b634c27950f', 
'reqsize': '0', 
'name': 'sdc', 
'alias': 'ua-de245259-050f-442a-8576-2cb0373ffd7f', 
'format': 'raw', 
'poolID': '00000001-0001-0001-0001-000000000311', 
'volumeID': '259c6abe-3790-40a4-b833-34c4680a7a52', 
'apparentsize': 0, 
'diskType': 'block', 
'discard': False, 
'specParams': {}, 
'readonly': True, 
'iface': 'sata', 
'truesize': 0, 
'propagateErrors': 
'report', 'address': {
'bus': '0', 
'controller': '0', 
'type': 'drive', 
'target': '0', 
'unit': '2'}, 
'device': 'cdrom',  <<<========
'path': '/rhev/data-center/mnt/blockSD/a4fb514e-3318-47c0-ab48-3b634c27950f/images/ae535574-6f21-4483-8aad-e7a79b6135ca/259c6abe-3790-40a4-b833-34c4680a7a52', 
'imageID': 'ae535574-6f21-4483-8aad-e7a79b6135ca', 
'type': 'disk'}.
  • From the RHV-M Database, this VM has one disk that is a direct lun.
direct lun:
               disk_id                |              lun_id               
--------------------------------------+-----------------------------------
 1712ffcb-ba63-4abe-a87f-f75201be042a | 368fc61e6cbfa8caadb06f61900c34b0a
(1 row)
  • Here we see there is a device attached to the VM.
-[ RECORD 1 ]------------------------------------
vm_name    | MY_VM
current_cd | ae535574-6f21-4483-8aad-e7a79b6135ca
  • The ae535574-6f21-4483-8aad-e7a79b6135ca device appears to be RHV-toolsSetup_4.3_10.iso in the iso domain.
-[ RECORD 1 ]---+-------------------------------------
image_guid      | 259c6abe-3790-40a4-b833-34c4680a7a52
image_group_id  | ae535574-6f21-4483-8aad-e7a79b6135ca
storage_name    | iso-domain
storage_id      | a4fb514e-3318-47c0-ab48-3b634c27950f
disk_alias      | RHV-toolsSetup_4.3_10.iso
storage_pool_id | 00000001-0001-0001-0001-000000000311
  • When checking the metadata of this ae535574-6f21-4483-8aad-e7a79b6135ca, it is marked ILLEGAL.
image:    ae535574-6f21-4483-8aad-e7a79b6135ca

            - 259c6abe-3790-40a4-b833-34c4680a7a52
            status: ILLEGAL, voltype: LEAF, format: RAW, legality: ILLEGAL, type: PREALLOCATED, capacity: 536870912, truesize: 536870912

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments