Skip to content
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

Template creation errors #1157

Closed
tomaae opened this issue Jul 10, 2017 · 23 comments
Closed

Template creation errors #1157

tomaae opened this issue Jul 10, 2017 · 23 comments

Comments

@tomaae
Copy link

tomaae commented Jul 10, 2017

Hello,
I have just installed kimchi to give it another go, but I'm not able to get past template.

When I try to use preconfigured images, I get following error:
KCHVM0005E: Remote ISO image is not supported by this server.
Not sure how to verify it.

When I try to create a template using downloaded iso (debian 8 or 9):
KCHTMPL0020E: Unable to create template due error: KCHIMG0001E: Error probing image OS information: part_list: parted print: /dev/sda: Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

Debian GNU/Linux 9 (stretch) SMP Debian 4.9.30-2+deb9u2
libvirt 3.0.0-4
ii ginger 2.4.0
ii ginger-base 2.3.0
ii kimchi 2.5.0
ii wok 2.5.0

@foi
Copy link

foi commented Jul 20, 2017

same on fedora 26, kimchi 2.5.0, wok 2.5.0

@Fredrik81
Copy link

I have same error code but a bit different message.
KCHTMPL0020E: Unable to create template due error: KCHIMG0001E: Error probing image OS information: part_list: parted print: /dev/sda: Error: Invalid partition table - recursive partition on /dev/sda.

I just installed wok and kimchi then i removed the default ISO store and added a new ISO store on different drive. So the drive where the ISOs is stored is not sda it's a btrfs raid 1

@alinefm
Copy link
Member

alinefm commented Jul 25, 2017

Hi @shii1 @foi

I don't have any Debian system to validate it. Debian is not usually tested by Kimchi community.
About the problem on Fedora 26, Kimchi 2.5.0 was validated on Fedora 25. I will try to get a Fedora 26 system to test it and return to you soon.

@Fredrik81

Which OS are you seeing that?

@tomaae
Copy link
Author

tomaae commented Jul 25, 2017

Hi @alinefm
Too bad, kimchi looked ideal for dev/qa. But it would be good idea to remove debian from the list if its not being tested.
I assumed its supported since its mentioned here:
https://github.com/kimchi-project/wok/#install-dependencies

@alinefm
Copy link
Member

alinefm commented Jul 25, 2017

@shii1 It is an open source community in which people contribute thinking about their preferred OS.
Debian was already focus of some people before but today there is no one working closely on it. Don't you want to be that person? :-)

The file you mentioned is only an installation guide. Unfortunately, it does not mean the project is free of bugs.

If I can reproduce the problem on Ubuntu 17.04 or Fedora 26, I will take a look to fix that.

@Fredrik81
Copy link

Fredrik81 commented Jul 25, 2017 via email

@alinefm
Copy link
Member

alinefm commented Jul 25, 2017

Thanks for the information, @Fredrik81

So you tried to create a Template from a predefined remote ISO (aka, from a URL) and it failed, right?
Just to make sure I will follow the same steps as yours.

@Fredrik81
Copy link

Fredrik81 commented Jul 25, 2017 via email

@tomaae
Copy link
Author

tomaae commented Jul 25, 2017

@alinefm
Of course I dont expect it to be bug free, no software really is :)
I would like to help with the issue, but python isnt really my thing. Learning new language would probably take more time I can afford.
If I can help with some debugs tho, I will be glad to do so.

@alinefm
Copy link
Member

alinefm commented Jul 25, 2017

@shii1 Did you get the same problem while using which type of ISO? A remote URL, from local dir pool?

@tomaae
Copy link
Author

tomaae commented Jul 26, 2017

@alinefm
There are 2 different errors. One is from remote url (preconfigured templates which come with kimchi).
Second one is by using my own iso images to create a template. For my own, it will extract the iso into /tmp directory and then fails with KCHIMG0001E.

@Fredrik81
Copy link

Hello,
Some more details.
Attached is a picture of how my ISO store looks like and if image is uploaded there it will fail.
image

But if i create a template under "/etc/kimchi/distros.d" it work. I pasted how the template looks like that i created.
/etc/kimchi/distros.d$ cat rockstor.json
[
{
"name": "rockstor-3.9.1",
"os_distro": "rockstor",
"os_arch": "x86_64",
"os_version": "3.9.1",
"path": "https://netix.dl.sourceforge.net/project/rockstor/Rockstor-3.9.1.iso"
}
]

@tjgruber
Copy link

tjgruber commented Aug 5, 2017

Same issue for me, but on both Fedora 25 and Fedora 26.

  1. I download an .iso from the Fedora website to my computer.
  2. In Kimchi, I upload the .iso file to the correct place.
  3. I attempt to create a template using the .iso I just uploaded, and I get that error:

KCHTMPL0020E: Unable to create template due error: KCHIMG0001E: Error probing image OS information: part_list: parted print: /dev/sda: Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

What must I do to fix this issue?

I can work around it for now, by using an existing built-in template such as the Fedora 24 one, and then just changing the .iso path before turning on the VM. But I'd really like to know if there's some commands I can run to fix it.

image

image

@alinefm
Copy link
Member

alinefm commented Aug 15, 2017

Hi all,

I was able to create a Template running Kimchi on Fedora 25 and using a Fedora 26 ISO image. I am still trying to reproduce that, but so far, it works for me.

@drts01
Copy link

drts01 commented Sep 7, 2017

I just set up kimchi 2.5.0 and wok 2.5.0 on Fedora 26 and have this same issue. dunno if this helps:

/var/lib/wok/user-requests.data:

{"info": {"status": 200, "zone": "PDT", "ip": "100.64.1.100", "app": "", "req": "POST", "user": "admin", "time": "22:33:10", "date": "2017-09-06"}, "message": {"code": "WOKROOT0001L", "params": {"username
": "admin"}}, "id": "fe8d84d2-e8cc-476b-aa74-3252b5022fdf", "error": null}
{"info": {"status": 200, "zone": "PDT", "ip": "", "app": "/plugins/kimchi", "req": "TASK", "user": "", "time": "22:33:37", "date": "2017-09-06"}, "message": {"code": "WOKASYNC0001L", "params": {"target_ur
i": "/plugins/kimchi/storagepools/kimchi_isos"}}, "id": "38d47e85-81e2-4b4b-a8cf-41e4af06fc1d", "error": null}
{"info": {"status": 500, "zone": "PDT", "ip": "100.64.1.100", "app": "/plugins/kimchi", "req": "POST", "user": "admin", "time": "22:34:00", "date": "2017-09-06"}, "message": {"code": "KCHTMPL0001L", "para
ms": {"os_distro": "ubuntu", "disks": "[{'base': '/var/lib/kimchi/isos/ubuntu-16.04.3-server-amd64.iso'}]", "name": "", "os_version": "16.04"}}, "id": "0780784f-77e6-4bc4-8de5-3d280ceeb0b0", "error": {"co
de": "KCHTMPL0020E", "params": {"err": "KCHIMG0001E: Error probing image OS information: part_list: parted print: /dev/sda: Warning: The driver descriptor says the physical block size is 2048 bytes, but L
inux says it is 512 bytes."}}}
# uname --kernel-name --kernel-release --kernel-version
Linux 4.12.9-300.fc26.x86_64 #1 SMP Fri Aug 25 13:09:43 UTC 2017

# parted --list
Model: ATA SAMSUNG SSD SM87 (scsi)
Disk /dev/sda: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End    Size   File system  Name                  Flags
 1      1049kB  211MB  210MB  fat16        EFI System Partition  boot, esp
 2      211MB   735MB  524MB  ext2
 3      735MB   512GB  511GB                                     lvm

@alinefm
Copy link
Member

alinefm commented Oct 3, 2017

I could reproduce that now. I am working on a patch to fix that.

@cjsoftuk
Copy link

cjsoftuk commented Oct 3, 2017

I, too, have just hit this on Debian 9.1 (along with the outstanding libvirt-bin situation). Pleased to see it's being worked on. If there's anything I can do to help @alinefm - please let me know as I have a client project stalled because of it.

alinefm added a commit that referenced this issue Oct 6, 2017
While creating a Template, the user can provide an ISO file or an Image
file. Kimchi relies on python magic to get the file mime type and it was
only considering ISO 9660 CD-ROM as valid for ISO images and it was fall
backing to an Image file and failing .
Add DOS/MBR as well to fix that problem.

Signed-off-by: Aline Manera <aline.manera@gmail.com>
@alinefm alinefm closed this as completed Oct 6, 2017
@Cybso
Copy link

Cybso commented Oct 27, 2017

I've applied the patch but the error message remains (tested with a Debian 9 netboot iso)

Sorry, forgot to restart wokd

alinefm added a commit that referenced this issue May 29, 2018
While creating a Template, the user can provide an ISO file or an Image
file. Kimchi relies on python magic to get the file mime type and it was
only considering ISO 9660 CD-ROM as valid for ISO images and it was fall
backing to an Image file and failing .
Add DOS/MBR as well to fix that problem.

Signed-off-by: Aline Manera <aline.manera@gmail.com>
@Jugulaire
Copy link

Hello,
Could you please give us the command to do the fix ? I got the error and i'm unable to correct it...

@Timi7007
Copy link

Timi7007 commented Aug 21, 2018

Even after deploying the patch it doesn't work. My LVM has sector size (logical/physical): 512B/4096B, the error I get from Kimchi says

KCHTMPL0020E: Unable to create template due error: KCHIMG0001E: Error probing image OS information: part_list: parted print: /dev/sda: Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

EDIT: I'm now using a workaround:

cd /etc/kimchi/distros.d && sudo mv ubuntu.json ubuntu_backup.json && sudo wget https://gist.githubusercontent.com/Timi7007/890dfd690aeae285212286d91e42a50b/raw/ubuntu.json && sudo service wokd restart && cd -

This adds a Ubuntu Server 18.04.1 image from the download-server. That way a template can be created and I can setup VMs.

@andreas-aeschlimann
Copy link

In case someone else has trouble finding the location of templates.py, here it is (Ubuntu 18):
/usr/lib/python2.7/dist-packages/wok/plugins/kimchi/model/templates.py

I manually applied the fix from 1ec059a, restarted wokd with sudo service wokd restart and then all was good.

pgurenko pushed a commit to pgurenko/kimchi that referenced this issue Apr 22, 2019
While creating a Template, the user can provide an ISO file or an Image
file. Kimchi relies on python magic to get the file mime type and it was
only considering ISO 9660 CD-ROM as valid for ISO images and it was fall
backing to an Image file and failing .
Add DOS/MBR as well to fix that problem.

Signed-off-by: Aline Manera <aline.manera@gmail.com>
@jocarren
Copy link
Contributor

jocarren commented May 24, 2019

Even after deploying the patch it doesn't work. My LVM has sector size (logical/physical): 512B/4096B, the error I get from Kimchi says

KCHTMPL0020E: Unable to create template due error: KCHIMG0001E: Error probing image OS information: part_list: parted print: /dev/sda: Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

EDIT: I'm now using a workaround:

cd /etc/kimchi/distros.d && sudo mv ubuntu.json ubuntu_backup.json && sudo wget https://gist.githubusercontent.com/Timi7007/890dfd690aeae285212286d91e42a50b/raw/ubuntu.json && sudo service wokd restart && cd -

This adds a Ubuntu Server 18.04.1 image from the download-server. That way a template can be created and I can setup VMs.

Tried it, it doesn't appear on the list.

Running ubuntu server 18.04

EDIT: it was because some links are 404. You may want to update your files. Thanks for the workaround btw.

@thecrypt0hunter
Copy link

thecrypt0hunter commented Sep 14, 2019

Here's the commands I used to get everything working from a fresh install - you do need to run it as root (sudo su)

wget -q https://raw.githubusercontent.com/kimchi-project/kimchi/1ec059af4040c50b1a7b9a34253510a46ca09d3b/model/templates.py -O /usr/lib/python2.7/dist-packages/wok/plugins/kimchi/model/templates.py
rm /etc/kimchi/distros.d/ubuntu.json
cat > /etc/kimchi/distros.d/ubuntu.json << EOF
[
    {
        "name": "Ubuntu Server 16.04.6 (Xenial Xerus)",
        "os_distro": "ubuntu",
        "os_arch": "x86_64",
        "os_version": "S16.04.6",
        "path": "http://releases.ubuntu.com/16.04/ubuntu-16.04.6-server-amd64.iso"
    },
    {
        "name": "Ubuntu Server 18.04.3 (Bionic Beaver)",
        "os_distro": "ubuntu",
        "os_arch": "x86_64",
        "os_version": "S18.04.3",
        "path": "http://releases.ubuntu.com/18.04/ubuntu-18.04.3-live-server-amd64.iso"
    },
    {
        "name": "Ubuntu Server 19.04 (Disco Dingo)",
        "os_distro": "ubuntu",
        "os_arch": "x86_64",
        "os_version": "S19.04",
        "path": "http://releases.ubuntu.com/19.04/ubuntu-19.04-live-server-amd64.iso"
    },
    {
        "name": "Ubuntu Desktop 18.04.3 (Bionic Beaver)",
        "os_distro": "ubuntu",
        "os_arch": "x86_64",
        "os_version": "D18.04.3",
        "path": "http://releases.ubuntu.com/18.04/ubuntu-18.04.3-desktop-amd64.iso"
    },
    {
        "name": "Ubuntu Desktop 19.04 (Disco Dingo)",
        "os_distro": "ubuntu",
        "os_arch": "x86_64",
        "os_version": "D19.04",
        "path": "http://releases.ubuntu.com/19.04/ubuntu-19.04-desktop-amd64.iso"
    }
]
EOF
service wokd restart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests