virt-install + Kickstart provisioning keeps dropping to dracut shell
Hello everybody,
First time posting here on LQ. So, I've been trying to automate the provisioning of vm's on my KVM host running CentOS7 as much as possible. So, I created a kickstart file, and a virt-install script that calls the kickstart file. Almost everything works as expected, but a short while after Kickstart starts doing its thing, I start getting a whole bunch of error messages that look like this: Code:
[ 188.602345] dracut-initqueue[699]: Warning: dracut-initqueue timeout - starting timeout scripts Code:
[ 188.602345] dracut-initqueue[699]: Warning: dracut-initqueue timeout - starting timeout scripts Now, as you can see, the warning says "/dev/root does not exist", and indeed, from the dracut shell, I can see that /dev/root doesn't exist. Code:
dracut:/# ls -lh /dev/root And from the rdsosreport log, I can't find anything else that's going wrong. Here's the virt-install script that creates the vm And here's the ks.cfg kickstart file that the script calls. I can spin up vm's with no problems whatsoever when I use the virt-manager GUI. Also, the virt-install script seems to do its job of actually creating the VM and calling the kickstart file. So, I assume that the problem is within the kickstart file, but I just can't seem to find what I'm doing wrong. Any help or input would be appreciated. Thanks in advance. |
I am not sure if it’s relevant, but here you call partition 1 “sda1”:
Code:
part sda1 --size=1024 --fstype=ext4 --asprimary --ondisk=vda |
Quote:
Good catch. I actually didn't see that before. Probably a typo I left while I was tinkering with the ks.cfg file. So, I changed the ks.cfg file so that now it reads like this: Code:
ignoredisk --only-use=vda And I added a line to create vda2, which fills the rest of the disk. But I tried to spin up a VM again after changing the ks.cfg again, and I'm still getting the same "Warning: /dev/root does not exist" error. I'm totally out of any ideas. Thanks for the help though. |
That's hard to troubleshoot, isn't it?
Your virt-install script doesn't specify the disk bus (scsi or virtio). I would think that the default is virtio, so that your kickstart should work, but perhaps I am wrong? Best to specify virtio explicitly, e.g. --disk ${disk_image_file},bus=virtio. How did you create the kickstart file? A good practice is basing it on a manual installation that is as close as possible to your intended automatic installation. When your manual installation is complete, find the corresponding kickstart file under /root and adapt it. |
Quote:
All my other VM's (installed with virt-manager) use virtio. I actually got the ks.cfg file from another VM. I did modify the ks.cfg and add some stuff, like a different partitioning scheme and language support. But I ran ksvalidator on the ks.cfg file I'm working with, and it gave no errors. I'd really like this to work, but I have no idea what to even look for anymore. It doesn't seem like this should be that complicated. If it works with virt-manager, I'm not sure why it doesn't work with the virt-install command. |
My Issue
Just for anyone who may be searching and come across this page.
In my case the actual issue was the kickstart file itself was not at the location specified by the init.ks kernel arg. Basically it was /tmp/some.ks on my system, and I accidentally set the ks.init arg to the same path, when it is actually /some.ks inside of the vm itself. |
All times are GMT -5. The time now is 08:44 PM. |