Using kickstart file to start VM

Wojciech Szpunar

New Member
Jun 3, 2016
20
0
1
42
Hello,

I'm trying to run VM and auto install it with Kickstart file.
So I have file in root filesystem and in http accessible location but VM is failing to start.

At first I saw I need to add -kernel parameter to boot cause kvm was complaining about missing argument:

kvm: -append only allowed with -kernel option

Then I have added kernel parameter which according to documentation should be set to bzImage:

#Product%3A VPS2-Centos7-Kickstart (ID%3A 2)
args: -kernel bzImage; -append ks=/srv/centos7.ks.cfg;​

but this ends with another error:
qemu: could not load kernel 'bzImage': No such file or directory​

So now question is how I should add kickstart file to successfully start this machine?
Does anybody know?

I have try to use http as source but I got same error non stop.

Any ideas?

Regards

Wojtek
 
I guess you need to replace "bzImage" with the actual path to your kernel image..
 
Hi,
Yes I was trying to do that too correct image should be called vmlinuz in this case but you still need to add -initrd otherwise kernel panic.

Systems starts to boot but then stops again on busybox error:
/bin/sh: can't access tty; job control turned off

It have problems with finiding init and mounting /dev as well.

Any ideas? Anybody got it to work?

Regards

Wojtek
 

Attachments

  • proxmox_kickstart_install_fail.png
    proxmox_kickstart_install_fail.png
    14.6 KB · Views: 29
You added a Debian initrd, that's obviously not going to work. You need to use the kernel and initrd from a centos dvd if you want to install centos.

I suggest you setup a PXE server and install it via netboot. Much easier and you can easily build it for Debian- and RHEL-based systems.
 
Hmmm yes I see that now, I thought that I'm giving init rd from CD obviously I miss understood boot command :)

Not sure if I can use netboot and PXE in a way I want it but I will look into it.
Basically I have 3rd party system integrated with Proxmox VE over API and this system is making a call over API to create Machine, set all parameters and then boot it.
I thought it would be easiest to just add Kickstart file like you do to normal startup of linux install but this didn't work and -append do require -kernel parameter then you need to add -initrd parameter as well otherwise kernel will panic.

Wonder why you cannot just pass ks:http://server_ip/ks.cfg to it as you do to bare metal installs etc.

Did you play with that in past?
 
You have to interfere with the boot loader, e.g. extract the parameters and append yours if you want to run it from command line.

Best is to configure via DHCP/PXE, once set up: lifetime joy!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!