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

CSV File upload for hosts

Scheduled Pinned Locked Moved
General
2
7
3.4k
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.
  • G
    golpemortal
    last edited by Oct 9, 2012, 6:45 PM

    I am trying to upload a CSV file to Host Management on FOG 0.32. The file uploads, but then states that the MAC addresses are invalid. Is there a certain format the information is supposed to be in for FOG to recognize it? I am currently using excel. Will someone please provide a simple CSV file for easier modification.

    1 Reply Last reply Reply Quote 0
    • A
      afmrick
      last edited by Oct 9, 2012, 9:14 PM

      There’s an example in the wiki at [url]http://www.fogproject.org/wiki/index.php/Managing_FOG#Method_4:_Uploading_Host_Information[/url]

      To summarize, you just need to create a plain text file with each line designating a host in this format:
      [CODE]MAC Address, Host name, IP Address, Description, OSID , ImageID[/CODE]

      Here’s an example for 4 lab computers w/ no IP or description:
      [CODE]“B8:AC:6F:3F:A9:34”,“LABPC-1”,“”,“”,“5”,“15”
      “B8:AC:6F:3F:A9:19”,“LABPC-2”,“”,“”,“5”,“15”
      “B8:AC:6F:3F:A9:EF”,“LABPC-3”,“”,“”,“5”,“15”
      “B8:AC:6F:3F:A8:F4”,“LABPC-4”,“”,“”,“5”,“15” [/CODE]

      Although, FOG 0.32 has a bug where it ignored the ImageID. I added line 51 below to /var/www/html/fog/management/includes/hosts.upload.include.php to fix that (line numbers shown):

      [CODE]48 $img = $core->getImageManager()->getImageById( $data[5] );
      49 $mac = new MACAddress($data[0]);
      50 $host = new Host(-1, $data[1], $data[3] . " “._(“Uploaded by batch import on”).” " . date(“F j, Y, g:i a”), $data[2], null, $mac, $data[4]);
      51 $host->setImage( $img );[/CODE]

      1 Reply Last reply Reply Quote 0
      • A
        afmrick
        last edited by Oct 9, 2012, 9:19 PM

        Just to add, you can export you Excel spreadsheet to a CSV assuming you set it up to match the requirements.

        1 Reply Last reply Reply Quote 0
        • G
          golpemortal
          last edited by Oct 9, 2012, 9:37 PM

          Thank you for the information. I’ll give it a try, but now running into another issue: I imaged a Dell Optiplex980 with another Dell Optiplex 980 and it worked great, but when I try to push the same image to Transource Mir-800qm and it gives me a “uvesafb eax= 0x4f00 VBE info block failed, err -2 failed with vbe_init() failed with -22” and then freezes and gives me a snow screen.

          1 Reply Last reply Reply Quote 0
          • A
            afmrick
            last edited by Oct 9, 2012, 10:05 PM

            Check out [url]http://fogproject.org/forum/threads/snow-screen-with-hp-elitebook-8460p.164/[/url] and/or try a different kernel.

            1 Reply Last reply Reply Quote 0
            • G
              golpemortal
              last edited by Oct 10, 2012, 2:40 PM

              Afmrick thank you man, that fixed my problem…

              1 Reply Last reply Reply Quote 0
              • A
                afmrick
                last edited by Oct 10, 2012, 4:18 PM

                Yay! I’m glad I could help.

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

                168

                Online

                12.0k

                Users

                17.3k

                Topics

                155.2k

                Posts
                Copyright © 2012-2024 FOG Project