-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot attach existing (but empty) logical volume to VM #1222
Comments
What is happening is we run ms.file(path).lower() against a list of known file types. I have a rather crude fix, as below, which allows me to now attach the raw block devices for the logical volumes to my VMs. There are probably better checks to do, but for now, this can let me attach them to my VMs :)
|
Sent a PR since this is probably more useful than a random diff in comments. |
PR diff fixes it for me too. Thanks @a-a! |
I have a storage pool of type "LOGICAL" defined, named "rust".
I added a logical volume "sms0" to this pool manually, and confirmed it's existence as follows:
In the above output I also have "c1e1d541-c3ef-46a2-8b81-14bf75907964-0.img" which was successfully added automatically by kimchi when creating a VM from a template, so at least something is working correctly.
From the web interface, I edit an existing VM with no volumes currently attached to it.
This is via Storage > Add
I change type from cdrom, to disk, select "Select an existing disk", and change the storage pool from "ISO" to my Physical Volume named "rust", however no Storage Volumes become visible and the Storage Volumes dropdown remains greyed out.
At the point of clicking on the new storage pool, the following two lines are written out to the log:
The source of such an error appears to be within isoinfo.py - but I would ask why we are treating a logical volume as an ISO, this does not seem correct, but actually may be a red herring in this case.
kimchi/isoinfo.py
Lines 406 to 415 in 2054832
Digging slightly deeper, looking at the http requests, I see the following request:
https://10.100.100.190:8001/plugins/kimchi/storagepools/rust/storagevolumes
The response is as follows:
Looking at storagevolumes.py - I see we try to see if a raw device is actually an ISO, which is perhaps the stage where the ISO error warnings in my error log occur.
kimchi/model/storagevolumes.py
Lines 310 to 320 in b67c319
Further on from there, we have the following checks:
kimchi/model/storagevolumes.py
Lines 322 to 333 in b67c319
It should be roughly around here where the checks are happening, and the disk is set isvalid == false, even though it may actually be valid as a raw block device.
I'll add some extra debug around here and see if I can catch what is being tripped up on, and try to formulate an appropriate patch if I can work it out.
The text was updated successfully, but these errors were encountered: