[opensuse-virtual] pvgrub2-boot of Opensuse Xen DomU -- possible? documentation? example?
I'd recently attempted to boot an Opensuse DomU, on Opensuse Dom0, switching to pvgrub2 rather than pygrub as the bootloader mechanism. Failed at it, and asked at the Xen ML "pvgrub2 launch of Xen 4.5.1 DomU just drops to grub2 prompt ?" http://xen.markmail.org/thread/dmugrhbg6rv4vzn7 Before proceeding to hunt-n-peck my way through figuring this out, Is DomU on current Opensuse+Xen, in my case, rpm -qa | egrep "kernel-xen-4|^xen-4|grub2-x" | sort grub2-x86_64-efi-2.02~beta2-20.10.1.x86_64 grub2-x86_64-xen-2.02~beta2-20.10.1.x86_64 kernel-xen-4.2.5-2.1.g0491388.x86_64 xen-4.5.1_13-391.1.x86_64 pvgrub2-bootable? If YES, is there any clear *documentation*, ideally with an example? -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 at 12:54 PM, PGNet Dev <pgnet.dev@gmail.com> wrote: I'd recently attempted to boot an Opensuse DomU, on Opensuse Dom0, switching to pvgrub2 rather than pygrub as the bootloader mechanism.
You may want to use what the installer tools use (virt-install and vm-install) and that is grub.xen to boot your domU from the grub2-x86_64-xen RPM. Be sure to pull the latest channel updates. pygrub cannot read a btrfs file system to get boot information for starting the VM. The syntax for a configuration file is, kernel="/usr/lib/grub2/x86_64-xen/grub.xen" - Charles
Failed at it, and asked at the Xen ML
"pvgrub2 launch of Xen 4.5.1 DomU just drops to grub2 prompt ?" http://xen.markmail.org/thread/dmugrhbg6rv4vzn7
Before proceeding to hunt-n-peck my way through figuring this out,
Is DomU on current Opensuse+Xen, in my case,
rpm -qa | egrep "kernel-xen-4|^xen-4|grub2-x" | sort grub2-x86_64-efi-2.02~beta2-20.10.1.x86_64 grub2-x86_64-xen-2.02~beta2-20.10.1.x86_64 kernel-xen-4.2.5-2.1.g0491388.x86_64 xen-4.5.1_13-391.1.x86_64
pvgrub2-bootable?
If YES, is there any clear *documentation*, ideally with an example? -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
-- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 12:14 PM, Charles Arnold wrote:
On 10/30/2015 at 12:54 PM, PGNet Dev <pgnet.dev@gmail.com> wrote: I'd recently attempted to boot an Opensuse DomU, on Opensuse Dom0, switching to pvgrub2 rather than pygrub as the bootloader mechanism.
You may want to use what the installer tools use (virt-install and vm-install) and that is grub.xen to boot your domU from the grub2-x86_64-xen RPM. Be sure to pull the latest channel updates. pygrub cannot read a btrfs file system to get boot information for starting the VM.
The syntax for a configuration file is, kernel="/usr/lib/grub2/x86_64-xen/grub.xen"
I'm not looking to add complexity to the boot stack -- for either Dom0 or the DomUs. I don't want to install/use virt-install or vm-install. I'd like to keep it bog simple. No auto-magic, no installer layers, etc Simply use already provided Xen-native xl to boot a txt-based, clear & easy to read GUEST.cfg, specifying the pvgrub2 'kernel=' line. As mentioned in my referenced post, my kernel = /home/tmp/pvgrub2/grub-x86_64-xen failed, where that file's generated with grub2-mkstandalone \ -o grub-x86_64-xen \ -O x86_64-xen \ boot/grub2/grub-xen-pvgrub2.cfg Can you detail how /usr/lib/grub2/x86_64-xen/grub.xen is generated? Also, you re-mention pygrub ("pygrub cannot read ..."). I'm specifically looking to ensure that pygrub is EXCLUDED from the process, and that only PVGRUB2 is used. -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 at 01:28 PM, PGNet Dev <pgnet.dev@gmail.com> wrote: On 10/30/2015 12:14 PM, Charles Arnold wrote:
On 10/30/2015 at 12:54 PM, PGNet Dev <pgnet.dev@gmail.com> wrote: I'd recently attempted to boot an Opensuse DomU, on Opensuse Dom0, switching to pvgrub2 rather than pygrub as the bootloader mechanism.
You may want to use what the installer tools use (virt-install and vm-install) and that is grub.xen to boot your domU from the grub2-x86_64-xen RPM. Be sure to pull the latest channel updates. pygrub cannot read a btrfs file system to get boot information for starting the VM.
The syntax for a configuration file is, kernel="/usr/lib/grub2/x86_64-xen/grub.xen"
I'm not looking to add complexity to the boot stack -- for either Dom0 or the DomUs.
I don't want to install/use virt-install or vm-install.
I'd like to keep it bog simple. No auto-magic, no installer layers, etc
Simply use already provided Xen-native xl to boot a txt-based, clear & easy to read GUEST.cfg, specifying the pvgrub2 'kernel=' line.
I think that is what I was meant to say. A config file using grub.xen on the kernel line can be started with xl create -f <config file>. You don't need to actually run the installer tools or have libvirt in the picture.
As mentioned in my referenced post, my
kernel = /home/tmp/pvgrub2/grub-x86_64-xen
failed, where that file's generated with
grub2-mkstandalone \ -o grub-x86_64-xen \ -O x86_64-xen \ boot/grub2/grub-xen-pvgrub2.cfg
Can you detail how
/usr/lib/grub2/x86_64-xen/grub.xen
is generated?
grub.xen is part of the official grub2 package. You can download the source RPM and see how it is built.
Also, you re-mention pygrub ("pygrub cannot read ...").
I'm specifically looking to ensure that pygrub is EXCLUDED from the process, and that only PVGRUB2 is used.
Understood. I only mentioned it as some don't realize it doesn't work at all if the boot partition in the VM is btrfs. - Charles -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 12:49 PM, Charles Arnold wrote:
I think that is what I was meant to say. A config file using grub.xen on the kernel line can be started with xl create -f <config file>. You don't need to actually run the installer tools or have libvirt in the picture.
Something's still amiss Given cat test.cfg name = 'test' builder = 'linux' kernel = '/usr/lib/grub2/x86_64-xen/grub.xen' disk = [ 'phy:/dev/VG0/testBOOT,xvda,w', 'phy:/dev/VG0/testROOT,xvdc,w', ] root = '(xen/xvdc,msdos1)' ... exec of xl create -c test.cfg still drops me to a grub prompt, instead of booting the guest, grub> ls (proc) (memdisk) (xen/xvda) (xen/xvda,msdos1) (xen/xvdb) (xen/xvdb,msdos1) (xen /xvdc) (xen/xvdc,msdos1) grub> Using ANY of those^^ in the root= line does the same -- grub prompt. This is with vgchange -an kpartx -av /dev/VG0/testBOOT mount /dev/mapper/VG0-testBOOT1 /mnt/TEMP tree -L 1 /mnt/TEMP/grub2 /mnt/TEMP/grub2 ├── backgrounds ├── custom.cfg ├── device.map ├── device.map.old ├── fonts ├── grub.cfg ├── grubenv ├── i386-pc ├── locale └── themes What's missing? -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
Here is a generic (but working) example of a config file. What I am not using in this example is the 'root' option. name="os13.2pv" description="None" uuid="09e84b64-5b3d-bb48-7fe3-488e7058878d" memory=1024 maxmem=1024 vcpus=2 on_poweroff="destroy" on_reboot="restart" on_crash="destroy" localtime=0 keymap="en-us" builder="linux" kernel="/usr/lib/grub2/x86_64-xen/grub.xen" disk=[ '/dev/dm-0,raw,xvda,w,backendtype=phy', ] vif=[ 'mac=00:16:3e:0d:cb:82,bridge=br0', ] vfb=['type=vnc,vncunused=1'] - Charles
On 10/30/2015 at 02:07 PM, PGNet Dev <pgnet.dev@gmail.com> wrote: On 10/30/2015 12:49 PM, Charles Arnold wrote: I think that is what I was meant to say. A config file using grub.xen on the kernel line can be started with xl create -f <config file>. You don't need to actually run the installer tools or have libvirt in the picture.
Something's still amiss
Given
cat test.cfg name = 'test' builder = 'linux' kernel = '/usr/lib/grub2/x86_64-xen/grub.xen' disk = [ 'phy:/dev/VG0/testBOOT,xvda,w', 'phy:/dev/VG0/testROOT,xvdc,w', ] root = '(xen/xvdc,msdos1)' ...
exec of
xl create -c test.cfg
still drops me to a grub prompt, instead of booting the guest,
grub> ls (proc) (memdisk) (xen/xvda) (xen/xvda,msdos1) (xen/xvdb) (xen/xvdb,msdos1) (xen /xvdc) (xen/xvdc,msdos1) grub>
Using ANY of those^^ in the root= line does the same -- grub prompt.
This is with
vgchange -an kpartx -av /dev/VG0/testBOOT mount /dev/mapper/VG0-testBOOT1 /mnt/TEMP tree -L 1 /mnt/TEMP/grub2 /mnt/TEMP/grub2 ├── backgrounds ├── custom.cfg ├── device.map ├── device.map.old ├── fonts ├── grub.cfg ├── grubenv ├── i386-pc ├── locale └── themes
What's missing?
-- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 01:38 PM, Charles Arnold wrote:
Here is a generic (but working) example of a config file. What I am not using in this example is the 'root' option.
name="os13.2pv" description="None" uuid="09e84b64-5b3d-bb48-7fe3-488e7058878d" memory=1024 maxmem=1024 vcpus=2 on_poweroff="destroy" on_reboot="restart" on_crash="destroy" localtime=0 keymap="en-us" builder="linux" kernel="/usr/lib/grub2/x86_64-xen/grub.xen" disk=[ '/dev/dm-0,raw,xvda,w,backendtype=phy', ] vif=[ 'mac=00:16:3e:0d:cb:82,bridge=br0', ] vfb=['type=vnc,vncunused=1']
I note your use of format disk=[ '/dev/dm-0,raw,xvda,w,backendtype=phy', ] Noting that my usage boots just fine using pygrub, disk = [ 'phy:/dev/VG0/testBOOT,xvda,w', 'phy:/dev/VG0/testROOT,xvdc,w', ] is a change to 'your' format *required* here? Also, instead of a root-vol spec'n, root = '(xen/xvda,msdos1)' you appear to use a UUID spec, uuid="09e84b64-5b3d-bb48-7fe3-488e7058878d" Again, is this change *required*? If yes, since I'm mounting a partitioned LV, namely "/dev/VG0/testBOOT, partition 1", wha's the UUID that is to be used? @ grub prompt is clearly seeing the partition ... If "yes" to either, then this is a change in behavior in the Xen cfg's requirements; where's correct usage with Opensuse's pvgrub documented? If "no" to both, then I don't yet see the problem. -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 02:55 PM, PGNet Dev wrote:
On 10/30/2015 01:38 PM, Charles Arnold wrote:
Here is a generic (but working) example of a config file. What I am not using in this example is the 'root' option.
name="os13.2pv" description="None" uuid="09e84b64-5b3d-bb48-7fe3-488e7058878d" memory=1024 maxmem=1024 vcpus=2 on_poweroff="destroy" on_reboot="restart" on_crash="destroy" localtime=0 keymap="en-us" builder="linux" kernel="/usr/lib/grub2/x86_64-xen/grub.xen" disk=[ '/dev/dm-0,raw,xvda,w,backendtype=phy', ] vif=[ 'mac=00:16:3e:0d:cb:82,bridge=br0', ] vfb=['type=vnc,vncunused=1']
I note your use of format
disk=[ '/dev/dm-0,raw,xvda,w,backendtype=phy', ]
Noting that my usage boots just fine using pygrub,
disk = [ 'phy:/dev/VG0/testBOOT,xvda,w', 'phy:/dev/VG0/testROOT,xvdc,w', ]
is a change to 'your' format *required* here?
I haven't followed this discussion, but the the answer to the general question you ask here is no. The first format is the new xl disk config format, described in $xen-src/docs/misc/xl-disk-configuration.txt and xl.cfg(5). The second format is the old xmdomain.cfg(5) format. But the old format should still be supported. With the exception of embedded python, a Xen community goal was to support existing domain config when moving from xm/xend to xl/libxl.
Also, instead of a root-vol spec'n,
root = '(xen/xvda,msdos1)'
you appear to use a UUID spec,
uuid="09e84b64-5b3d-bb48-7fe3-488e7058878d"
In this context, uuid is simply domain metadata, similar to name, id, description, etc. Regards, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 11/02/2015 08:10 AM, Jim Fehlig wrote:
I haven't followed this discussion, but the the answer to the general question
Yep, got these to work -- but only if I use a DIY/custom pvgrub2 binary. The opensuse-included one fails, currently: http://lists.opensuse.org/opensuse-virtual/2015-10/msg00014.html -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Mon, Nov 02, PGNet Dev wrote:
On 11/02/2015 08:10 AM, Jim Fehlig wrote:
I haven't followed this discussion, but the the answer to the general question
Yep, got these to work -- but only if I use a DIY/custom pvgrub2 binary. The opensuse-included one fails, currently:
http://lists.opensuse.org/opensuse-virtual/2015-10/msg00014.html
This is supposed to work out of the box. Perhaps the single grub2-x86_64-xen.rpm from Tumbleweed is needed because the required changes were not backported to 13.2. Olaf -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 11/03/2015 12:45 AM, Olaf Hering wrote:
This is supposed to work out of the box. Perhaps the single grub2-x86_64-xen.rpm from Tumbleweed is needed because the required changes were not backported to 13.2.
How safe is an application of TW's pkg to an Opensuse 13.2 install in this since, grub2-x86_64-xen.rpm case? It *appears* relatively independent rpm -q --whatprovides grub2-x86_64-xen grub2-x86_64-xen-2.02~beta2-20.10.1.x86_64 rpm -q --whatrequires grub2-x86_64-xen xen-tools-4.5.1_13-391.1.x86_64 rpm -qa | grep -i ^xen xen-libs-4.5.1_13-391.1.x86_64 xen-tools-4.5.1_13-391.1.x86_64 xen-4.5.1_13-391.1.x86_64 Or are you suggesting that the backport to 13.2 be done & used? -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Tue, Nov 03, PGNet Dev wrote:
On 11/03/2015 12:45 AM, Olaf Hering wrote:
This is supposed to work out of the box. Perhaps the single grub2-x86_64-xen.rpm from Tumbleweed is needed because the required changes were not backported to 13.2.
How safe is an application of TW's pkg to an Opensuse 13.2 install in this since, grub2-x86_64-xen.rpm case?
This package is firmware (for the VM), as such it is unrelated to the host. Olaf -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Wed, Nov 04, Olaf Hering wrote:
On Tue, Nov 03, PGNet Dev wrote:
On 11/03/2015 12:45 AM, Olaf Hering wrote:
This is supposed to work out of the box. Perhaps the single grub2-x86_64-xen.rpm from Tumbleweed is needed because the required changes were not backported to 13.2.
How safe is an application of TW's pkg to an Opensuse 13.2 install in this since, grub2-x86_64-xen.rpm case?
This package is firmware (for the VM), as such it is unrelated to the host.
I just verified it, Leap lacks the functionality as well. The one from TW is able to start the install, and once that is done it offers a menu to boot into the configured disk. Per default it boots (any) installer, if an iso is assigned to the VM. Olaf -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 10/30/2015 01:38 PM, Charles Arnold wrote:
Here is a generic (but working) example of a config file.
Here, Opensuse's pvgrub kernel fails to boot a guest, still dropping to a grub prompt. My DIY-kernel works fine. Using Opensuse's provided pvgrub2 kernel, cat /home/xen/test.cfg name = 'msg' builder = 'linux' kernel = '/usr/lib/grub2/x86_64-xen/grub.xen' disk = [ '/dev/VG0/testBOOT,raw,xvda,backendtype=phy,rw', '/dev/VG0/testROOT,raw,xvdc,backendtype=phy,rw',] vif = [ 'mac=00:16:3E:10:10:01, bridge=br0, vifname=vifT',] vfb = [ 'type=vnc, vncdisplay=1001, vnclisten=127.0.0.1' ] extra = 'textmode=1 xencons=xvc0 noirqdebug elevator=noop console=hvc0' localtime = 0 on_shutdown = 'destroy' on_reboot = 'restart' on_crash = 'destroy' maxmem = 1024 memory = 1024 vcpus = 1 cpus = "1-3" cpu_cap = 100 cpu_weight = 256 exec of xl create -c /home/xen/test.cfg fails, and just drops me to a boot prompt, GNU GRUB version 2.02~beta2 Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions. grub> ls (proc) (memdisk) (xen/xvda) (xen/xvda,msdos1) (xen/xvdb) (xen/xvdb,msdos1) (xen /xvdc) (xen/xvdc,msdos1) grub> Otoh, if I simply change to my own pvgrub2 blob cat /home/xen/test.cfg ... - kernel = '/usr/lib/grub2/x86_64-xen/grub.xen' + kernel = '/home/tmp/pvgrub2/grub-x86_64-xen' ... where cd /home/tmp rm -rf /home/tmp/pvgrub2 mkdir -p /home/tmp/pvgrub2/boot/grub/ cd /home/tmp/pvgrub2 cat << EOF > boot/grub/grub.cfg insmod part_msdos set root=(xen/xvda,msdos1) linux /vmlinuz-xen root=/dev/xvdc1 noresume splash=silent quiet textmode=1 xencons=xvc0 noirqdebug elevator=noop console=hvc0 initrd /initrd-xen configfile /boot/grub/grub.cfg boot EOF ( note the changes from previous path(s) /boot/grub2, to /boot/grub ...) grub2-mkstandalone \ --compress=no \ --locales="" \ --fonts="unicode" \ --themes="" \ -O x86_64-xen \ -o grub-x86_64-xen \ boot/grub/grub.cfg now exec of xl create -c /home/xen/test.cfg boots the guest, Welcome to openSUSE 13.2 "Harlequin" - Kernel 4.2.3-1.gef1562d-xen (xvc0). opensuse-test login: -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
participants (4)
-
Charles Arnold
-
Jim Fehlig
-
Olaf Hering
-
PGNet Dev