CSV File upload for hosts



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



  • Yay! I’m glad I could help.



  • Afmrick thank you man, that fixed my problem…





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



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



  • 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]


Log in to reply
 

443
Online

38955
Users

10706
Topics

101581
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.