I've been messing around with trying to understand how a PVM boots lately, and I have a question:
Suppose I got my server hosed enough that it won't boot. How do I boot into single-user mode, to fix the problem?
With a 'real' server, I just interrupt the grub boot process, add "single' to the end of my 'kernel line' in the grub.conf, and boot. But PVMs don't boot that way. Through some Xen magic, the kernel boots without using the installed grub inside the VM. I could mount the VMs first disk into another VM and edit the grub.conf kernel line, but that's pretty awkward.
Isn't there a better way?
Well, I have three thoughts on that thread:
1. It seems to be written for OVM 2.2, and I'm on 3.1.1. Perhaps some minor variation of it would work, though.
2. I have to wonder whether logging into the OVM server and running xm commands is supported.
3. Damn, that's awkward, if that's the best way to do it.
I'd personally set a PXE server and setup a rescue image. Its not that difficult to do and you can do a little more with it. It is rather silly that you have to go to those lengths to do certain things. I will say if you have some type of disk issue... the PVM guest will give you an option to drop to "single user mode" regardless of the grub conf.
How about attaching the broken system disk to another working VM, and repairing it from there? You could create a custom "rescue" VM for this purpose that has all the necessary tools installed to do such repairs. Or you could do a quick clone of a VM template that is similar to the broken one.
Thanks for the responses. Yes, the PXE boot thing and the "attach it to another VM" thing will work, but it sure is awkward. I haven't heard any easy way to do this, so I'll call this thread 'answered', and assume that there is simply no way to edit the parameters that grub is passing to the kernel.