Creating new VMs through ManageIQ and PXE


#1

Hello all,

The past few days I’ve been busy setting up a CFME/ManageIQ environment with a PXE server. What is working is the following; ManageIQ creates a new VM. The VM boots and accesses the PXE server.

What happens next is the server waits for manual input. If I go to the VM and press the menu item for provisioning, all the steps seem to work fine.

The manual menu selection is not very helpful, but also the kickstart script I created in ManageIQ and added to the catalog Item is not used.

I seem to be missing something. Do I need to write custom code to create a directory on the PXE server with the mac-address with a custom menu/kickstart per server or is there something else I’m just missing?

Thanks in advance everyone! :slight_smile:


It all starts with PXE, but how.....?
How to use pxe provision
#2

@bdunne Can you help out here?


#3

So the CFME appliance should create a custom pxe config file on an NFS server which is mounted to access the pxelinux.cfg folder? Do you do this step? If not I can provide details of how to get this working.


#4

Hi @renebod,

Have you added the PXE server to ManageIQ and refreshed it?
Are you selecting the PXE server and PXE image in the provisioning dialogs?

You do not need to create any special directories, the ManageIQ code should automatically create the PXE boot file and kickstart file on the PXE server. Do you see these files? Also, you may want to check the evm.log file for any errors.


#6

Thanks for the suggestions. After correcting nfs rw rights, I am getting a menu file with mac-address as filename in my pxelinux.cfg. The ManageIQ server initiates the deployment and the installation. I only have one more issue here;

I have added a kickstart ‘Customization Template’ under Infrastructure. This now contains the lines;
%post
wget --no-check-certificate <%= evm[:callback_url_on_post_install] %>
%end

On the iPXE server this line is translated to;
%post
wget --no-check-certificate
%end

The mac-file and customization file on the iPXE server don’t get removed, the new VM keeps restarting into the install process (endless loop) and after a period of time the request status turns to Failed.

Is there something I can fix for the callback_url? Will this callback also remove the mac and ks file on the iPXE server?


#7

Hello,

I have some problems with provisionning VM with PXE. MIQ create VM, start it for install and stops there.

Can you detail me how do you configure PXE on DHCP please? for me, the BootFile Name value is pxelinux.0. it is correct?


#8

These two links were very helpful for me and should give you the correct information;



#9

I just found this;

https://bugzilla.redhat.com/show_bug.cgi?id=1165789

There seems to have been an known issue with this. It would be a good idea to update the documentation to express the correct syntax!


#10

Thank you to take time to help me.

Thiis bug not concenring me, the post_callback_url is correct for me, because am using the last MIQ version.

My problem is, when i leave pxelinux.0 (BootFile name) in the DHCP config, the install start but with the default file config. is not start with the file writed by MIQ on mac directory.

Thanks


#11

If you tail /var/log/messages, you will see what the iPXE server checks, it will probably be pxelinux.cfg/macaddress


#12

Hi,
I always have the problem:

MIQ well written the boot file with macaddress and the kickstart file, but the VM can not start with this file. how to configure the DHCP to redirect VM to boot this file.
thank you


#13

You seem to be getting pxelinux.0 instead of your mac address based file in pxelinux.cfg right?

Could you look in /var/log/messages and see what it other locations it tries before it ends up on pxelinux.0?


#14

No, in my DHCP config, i redirect PXE client to pxelinux.0 file(BootFile Name option), so when the VM start with PXE, it’s look for this file.
How do I configure my DHCP server with pxe server?

I have this error on /var/log/messages :
Feb 25 10:46:52 pxe-01 nfsdcltrack[6874]: sqlite_insert_client: insert statement prepare failed: table clients has 2 columns but 3 values were supplied

thanks


#15

For setting up DHCP this was the solution for me;


#16

The problem is pxe look for wrong file name, i don’t know why:


when i rename it manually, VM can load it but there is error:

Any idea?

Thanks


#17

Could you share your menu.php please?