• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Fog Image Import Issue

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    5
    1.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      malix
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        Your post has me a bit confused too.

        From an image standpoint there are 2 parts.

        1. The raw data files that are stored in /images/<image_name>
        2. 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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        george1421G 1 Reply Last reply Reply Quote 0
        • george1421G
          george1421 Moderator @george1421
          last edited by

          @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

          MariaDB [fog]> 
          

          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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          M 1 Reply Last reply Reply Quote 0
          • M
            malix @george1421
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman
              last edited by

              Sticking this link here for future readers:
              https://wiki.fogproject.org/wiki/index.php?title=Migrate_FOG

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              214

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project