Bug 1618916
| Summary: | Grub lens cannot parse view entries after menu entries | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Guillaume Pavese <guillaume.pavese> | ||||
| Component: | augeas | Assignee: | Pino Toscano <ptoscano> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.5 | CC: | bugs, guillaume.pavese, ptoscano, rjones, yoguo | ||||
| Target Milestone: | pre-dev-freeze | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-11-13 09:28:43 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
(In reply to Guillaume Pavese from comment #0) > libguestfs: trace: v2v: aug_match "/files/boot/grub/grub.conf/title/kernel" > guestfsd: main_loop: proc 51 (command_lines) took 0.11 seconds > guestfsd: main_loop: new request, len 0x54 > guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds > libguestfs: trace: v2v: aug_match = [] > libguestfs: trace: v2v: aug_get "/files/boot/grub/grub.conf/default" > guestfsd: main_loop: new request, len 0x50 > guestfsd: error: no matching node > guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds > libguestfs: trace: v2v: aug_get = NULL (error) > kernels offered by the bootloader in this guest (first in list is default): > virt-v2v: error: no kernels were found in the bootloader configuration. > > This probably indicates that virt-v2v was unable to parse the bootloader > configuration of this guest. This is correct, indeed augeas was not able to parse /boot/grub/grub.conf as also virt-v2v logs: augeas failed to parse /boot/grub/grub.conf: error "Lenses @Grub and grub.lns could be used to load this file" augeas failed to parse /boot/grub/menu.lst: error "Get did not match entire input" at line 18 char 0 in lens /usr/share/augeas/lenses/dist/grub.aug:286.14-287.43: augeas failed to parse /etc/grub.conf: error "Get did not match entire input" at line 18 char 0 in lens /usr/share/augeas/lenses/dist/grub.aug:286.14-287.43: augeas failed to parse /etc/security/limits.conf: error "Iterated lens matched less than it should" at line 53 char 16 in lens /usr/share/augeas/lenses/dist/limits.aug:66.17-.40: > - vm's grub : > [root@vs-int-prd-kib-fr-301 ~]# cat /boot/grub/grub.conf > # grub.conf generated by anaconda > # > # Note that you do not have to rerun grub after making changes to this file > # NOTICE: You have a /boot partition. This means that > # all kernel and initrd paths are relative to /boot/, eg. > # root (hd0,0) > # kernel /vmlinuz-version ro root=/dev/xvda3 > # initrd /initrd-[generic-]version.img > #boot=/dev/xvda > default=0 > timeout=5 > serial --unit=0 --speed=115200 > terminal --timeout=5 serial console > title CentOS 6 (2.6.32-504.el6.x86_64) > root (hd0,0) > kernel /vmlinuz-2.6.32-504.el6.x86_64 ro > root=UUID=1b9cb00b-2af5-4024-a973-3f1722e96013 rd_NO_LUKS KEYBOARDTYPE=pc > KEYTABLE=fr LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 > crashkernel=auto console=tty0 rd_NO_LVM rd_NO_DM console=ttyS0,115200n8 > initrd /initramfs-2.6.32-504.el6.x86_64.img > serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 > terminal --timeout=10 serial console The "problem" in this case are the last two lines, which are general configuration lines and not menu entries. Commenting them, or simply moving them before the first "title", makes augeas able to parse it. (Note that "serial", and "terminal" are actually duplicated...) Can you please try to edit the grub.conf in the guest as I mentioned above? I'm reassigning this bug to augeas in the meanwhile. Yes I confirm moving terminal and serial entries to the top (I also commented the redundant ones) did the trick. This vm is successfully imported now. Will that step be unnecessary if augeas can be fixed? Thanks Similar case of bug 1582236: invalid grub.conf file that grub silently accepts anyway. *** This bug has been marked as a duplicate of bug 1582236 *** |
Created attachment 1476738 [details] v2v log - import fails I try to import a Centos 6.6 vm running on RHEL 5.11 Xen host. It fails with the following error in virt-v2v log (full log attached to this bug report): installed kernel packages in this guest: * kernel 2.6.32-504.el6.x86_64 (x86_64) /boot/vmlinuz-2.6.32-504.el6.x86_64 /boot/initramfs-2.6.32-504.el6.x86_64.img /boot/config-2.6.32-504.el6.x86_64 /lib/modules/2.6.32-504.el6.x86_64 2022 modules found virtio: blk=true net=true xen=false debug=false libguestfs: trace: v2v: aug_match "/files/boot/grub/grub.conf/title/kernel" guestfsd: main_loop: proc 51 (command_lines) took 0.11 seconds guestfsd: main_loop: new request, len 0x54 guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds libguestfs: trace: v2v: aug_match = [] libguestfs: trace: v2v: aug_get "/files/boot/grub/grub.conf/default" guestfsd: main_loop: new request, len 0x50 guestfsd: error: no matching node guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds libguestfs: trace: v2v: aug_get = NULL (error) kernels offered by the bootloader in this guest (first in list is default): virt-v2v: error: no kernels were found in the bootloader configuration. This probably indicates that virt-v2v was unable to parse the bootloader configuration of this guest. rm -rf '/var/tmp/null.O2ALYm' --------------------------- - vm's xen config file : [root@ps-inf-int-xen-fr-301 ~]# cat /etc/xen/vs-int-prd-kib-fr-301 name = "vs-int-prd-kib-fr-301" uuid = "a7c484d3-87d2-55d5-f2e3-62f2d1424262" maxmem = 2048 memory = 2048 vcpus = 1 builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "c" pae = 1 acpi = 1 apic = 1 localtime = 0 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" device_model = "/usr/lib64/xen/bin/qemu-dm" usb = 1 usbdevice = "tablet" disk = [ "file:/vm/vs-int-prd-kib-fr-301.img,hda,w" ] vif = [ "mac=00:16:3e:1f:a6:85,bridge=xenbr0_8,script=vif-bridge", "mac=00:16:3e:1f:a6:86,bridge=xenbr0_40,script=vif-bridge", "mac=00:16:3e:1f:a6:87,bridge=xenbr0_50,script=vif-bridge", "mac=00:16:3e:1f:a6:8f,bridge=xenbr0_5,script=vif-bridge" ] parallel = "none" serial = "pty" [root@ps-inf-int-xen-fr-301 ~]# - vm's fdisk -l : [root@vs-int-prd-kib-fr-301 ~]# fdisk -l Disk /dev/xvda: 41.9 GB, 41875931136 bytes 255 heads, 63 sectors/track, 5091 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0008d86c Device Boot Start End Blocks Id System /dev/xvda1 * 1 26 204800 83 Linux Partition 1 does not end on cylinder boundary. /dev/xvda2 26 2637 20971520 83 Linux /dev/xvda3 2637 3420 6291456 83 Linux /dev/xvda4 3420 5092 13425664 5 Extended /dev/xvda5 3420 4073 5242880 83 Linux /dev/xvda6 4073 4595 4194304 83 Linux /dev/xvda7 4596 4857 2097152 82 Linux swap / Solaris [root@vs-int-prd-kib-fr-301 ~]# - vm's grub : [root@vs-int-prd-kib-fr-301 ~]# cat /boot/grub/grub.conf # grub.conf generated by anaconda # # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that # all kernel and initrd paths are relative to /boot/, eg. # root (hd0,0) # kernel /vmlinuz-version ro root=/dev/xvda3 # initrd /initrd-[generic-]version.img #boot=/dev/xvda default=0 timeout=5 serial --unit=0 --speed=115200 terminal --timeout=5 serial console title CentOS 6 (2.6.32-504.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=1b9cb00b-2af5-4024-a973-3f1722e96013 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=fr LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto console=tty0 rd_NO_LVM rd_NO_DM console=ttyS0,115200n8 initrd /initramfs-2.6.32-504.el6.x86_64.img serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1 terminal --timeout=10 serial console [root@vs-int-prd-kib-fr-301 ~]# - vm's fstab and device.map : [root@vs-int-prd-kib-fr-301 ~]# cat /etc/fstab # /etc/fstab # Created by anaconda on Tue Jan 26 14:41:38 2016 # # Accessible filesystems, by reference, are maintained under '/dev/disk' # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info # UUID=1b9cb00b-2af5-4024-a973-3f1722e96013 / ext4 defaults 1 1 UUID=49520c76-0757-44ec-9423-945d60e121e2 /boot ext3 defaults 1 2 UUID=8af637c7-8243-4da6-851a-4aca442b11e8 /opt ext4 defaults 1 2 UUID=0328aae0-a874-40cc-b8e8-100ac35002c1 /tmp ext4 defaults 1 2 UUID=88b7a0f6-46ce-42b6-a58c-24c9ff0ba5b5 /var ext4 defaults 1 2 UUID=302aa2e3-f88b-4123-9613-838e0001d003 swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 [root@vs-int-prd-kib-fr-301 ~]# [root@vs-int-prd-kib-fr-301 ~]# cat /boot/grub/device.map # this device map was generated by anaconda (hd0) /dev/xvda [root@vs-int-prd-kib-fr-301 ~]#