virt-install + Kickstart provisioning keeps dropping to dracut shell
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
That line repeats dozens and dozens of times until i finally get this message:
Code:
[ 188.602345] dracut-initqueue[699]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 188.602654] dracut-initqueue[699]: Warning: Could not boot.
[ 188.733354] dracut-initqueue[699]: Warning: /dev/root does not exist
Starting Dracut Emergency Shell...
Warning: /dev/root does not exist
Generating "/run/initramfs/rdsosreport.txt"
Entering emergency mode. Exit the shell to continue.
Type "journalctl" to view system logs.
You might want to save "/run/initramfs/rdsosreport.txt" to a USB stick or /boot
after mounting them and attach it to a bug report.
dracut:/#
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
ls: cannot access /dev/root: No such file or directory
But I'm not sure why I get that message though. I got the ks.cfg file from an existing vm that I installed with the virt-manager GUI (although I did add/modify a few things).
And from the rdsosreport log, I can't find anything else that's going wrong.
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.
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.
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.
Well, I just tried with buses virtio, sata, and scsi, and none of them worked. I still get the same "Warning: /dev/root does not exist" message and dropped to a dracut shell again.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.