Solved Fog Image Import Issue
I am just going to come out and say it, I goofed up. But, I am trying to figure out how I can resolve the problem I created.
I have a fresh Fog 1.3.5 server that I wanted to upload an image file to create all the images for my hosts.
I already uploaded all my hosts with their MAC addresses without issue, I wanted to do the same with the images and link them, that way I don’t have to create and link an image file manually 1 at a time for the 100+ hosts I have.
So first, I exported the images to CSV to get the “format” of the template. Then I filled in the blanks.
However, this is where I goofed up, I deleted the settings and left them blank. Settings that identified the storage group, OS, Partition, Image Type, etc. I know, I am kicking myself for it. Please don’t scrutinize me, I already see my BIG error.
It did successfully import the images, however, when I go to view the images on the web GUI, they are not listed, if I try to create a new image manually using the same image name, it fails because that name already exists.
If I FTP into Fog and view the images directory, they do not show there either.
I really don’t want to have to wipe and reload Fog. So, is there a way to clear the images I goofed up importing? Is there another directory other than images they could be? Cache? Config? Anything? Or do I need to start over?
Any help is appreciated.
Sticking this link here for future readers:
@george1421 said in Fog Image Import Issue:
mysql -u root fog
Thank you very much, I was able to go in and clear the images table from the mysql DB.
@george1421 Before we get too crazy deleting stuff lets do this.
We probably should backup the current state of the database with this command run as an elevated user.
mysqldump --allow-keywords -x -v fog > fogbackup.sql
From there log into the mysql user too with
mysql -u root fog
You should end up at a mysql command prompt
Then key in this command
select imageID, imagename from images;
your output should look similar to this:
MariaDB [fog]> select imageID, imagename from images; +---------+-------------------+ | imageID | imagename | +---------+-------------------+ | 1 | Drivers Container | | 15 | WIN7OEMX64 | | 16 | WIN7ENTSP1X6401 | | 22 | WIN7ENTSP1X8601 | +---------+-------------------+ 4 rows in set (0.00 sec)
These are all of the records in your images table.
Your post has me a bit confused too.
From an image standpoint there are 2 parts.
- The raw data files that are stored in /images/<image_name>
- The metadata that is stored in fog’s database.
What you view in the web gui is the database information. There is no way to directly view the contents of the raw data files from the web gui.
Now with that said, I’m suspecting that your data you uploaded via the csv file is missing something that the webgui needs. We can clean this up by working directly with the mysql database.