The host where the image is built runs on RHEL 7.1 using:
- dib-utils 0.0.9-1
- sfdisk 2.23.2
We've set the following environment variables to allow a proper execution and connection setup with our RHEL Satellite environment for package updates during the diskimage-builder run:
diskimage-builder/bin/disk-image-create --no-tmpfs -a amd64 vm rhel <custom_dib_element> -o RHEL-x86_64-openshift-origin-broker >/tmp/dib_rhel.log 2>&1
The problem seems to be the partition table writing respectively the bootloader handling. We found the following interesting informations in the written log file:
dib-run-parts Mon Sep 21 18:29:08 CEST 2015 Running /root/oso/image.c8DfiJSU/hooks/block-device.d/10-partition
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
sfdisk: Disk /dev/loop2: cannot get geometry
sfdisk: /dev/loop2: unrecognized partition table type
sfdisk: No partitions found
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/181/40 (instead of 652/255/63).
For this listing I'll assume that geometry.
sfdisk: start: (c,h,s) expected (0,51,9) found (0,32,33)
sfdisk: end: (c,h,s) expected (1023,180,40) found (652,180,40)
Warning: partition 1 does not end at a cylinder boundary
end of partition 1 has impossible value for cylinders: 652 (should be in 0-651)
BLKRRPART: Invalid argument
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
dib-run-parts Mon Sep 21 18:29:08 CEST 2015 10-partition completed
Disk /dev/loop2: 652 cylinders, 255 heads, 63 sectors/track
Old situation:
New situation:
Units: sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/loop2p1 * 2048 10485759 10483712 83 Linux
/dev/loop2p2 0 - 0 0 Empty
/dev/loop2p3 0 - 0 0 Empty
/dev/loop2p4 0 - 0 0 Empty
Successfully wrote the new partition table
When adding this QCOW2 image to glance and booting from it via the OpenStack Horizon dashboard, the instance console log below:
/var/lib/nova/instances/<instance_id>/console.log
stays empty :-(
When uploading the original RHEL QCOW2 image retrieved from https://rhn.redhat.com/rhn/software/c... to glance and booting from it, it works successfully!
From our point of view there seems to be bug within the DIB. Do you agree?
Dear DIB ,
when using diskimage-builder (DIB: http:// docs.openstack. org/developer/ diskimage- builder/) to create a custom Red Hat Enterprise Linux (RHEL) 6 QCOW2 image (see: https:/ /rhn.redhat. com/rhn/ software/ channel/ downloads/ Download. do?cid= 16952) we get a non-bootable result although the disk image building process ends successfully. The log of the disk image building run can be found here: https:/ /drive. google. com/file/ d/0B6btT4vDRIz_ NkhScXpnV2Q4UEE /view?usp= sharing!
The host where the image is built runs on RHEL 7.1 using:
- dib-utils 0.0.9-1
- sfdisk 2.23.2
We've set the following environment variables to allow a proper execution and connection setup with our RHEL Satellite environment for package updates during the diskimage-builder run:
- export DIB_RHSM_ USER=<user> PASSWORD= <password> xx.xxxxx. xxx/XMLRPC KEY=<key_ 1>,<key_ 2> 6.7-20150706. 0 IMAGES= file:// /root
- export DIB_RHSM_
- export DIB_SAT_URL=https://<host>.
- export DIB_SAT_
- export DIB_RHN_CHANNELS=""
- export DIB_REG_TYPE=rhn
- export DIB_RELEASE=
- export DIB_CLOUD_
- export DIB_IMAGE_SIZE=5
- export TMP_DIR=$HOME/oso
The command we use to start the image creation:
diskimage- builder/ bin/disk- image-create --no-tmpfs -a amd64 vm rhel <custom_ dib_element> -o RHEL-x86_ 64-openshift- origin- broker >/tmp/dib_rhel.log 2>&1
The problem seems to be the partition table writing respectively the bootloader handling. We found the following interesting informations in the written log file:
dib-run-parts Mon Sep 21 18:29:08 CEST 2015 Running /root/oso/ image.c8DfiJSU/ hooks/block- device. d/10-partition
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
sfdisk: Disk /dev/loop2: cannot get geometry
sfdisk: /dev/loop2: unrecognized partition table type
sfdisk: No partitions found
sfdisk: Warning: The partition table looks like it was made
for C/H/S=*/181/40 (instead of 652/255/63).
For this listing I'll assume that geometry.
sfdisk: start: (c,h,s) expected (0,51,9) found (0,32,33)
sfdisk: end: (c,h,s) expected (1023,180,40) found (652,180,40)
Warning: partition 1 does not end at a cylinder boundary
end of partition 1 has impossible value for cylinders: 652 (should be in 0-651)
BLKRRPART: Invalid argument
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
dib-run-parts Mon Sep 21 18:29:08 CEST 2015 10-partition completed
Disk /dev/loop2: 652 cylinders, 255 heads, 63 sectors/track
Old situation:
New situation:
Units: sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/loop2p1 * 2048 10485759 10483712 83 Linux
/dev/loop2p2 0 - 0 0 Empty
/dev/loop2p3 0 - 0 0 Empty
/dev/loop2p4 0 - 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
IMAGE_BLOCK_ DEVICE= /dev/loop2p1
...
dib-run-parts Mon Sep 21 18:29:32 CEST 2015 Running /root/oso/ image.c8DfiJSU/ hooks/cleanup. d/51-bootloader image.c8DfiJSU/ mnt ']' diskimage- builder/ bin/../ lib/img- functions image.c8DfiJSU/ mnt/boot/ extlinux ']' oso/image. c8DfiJSU/ mnt/boot/ extlinux/ extlinux. conf boot_kernel_ initrd /root/oso/ image.c8DfiJSU/ mnt ROOT=/root/ oso/image. c8DfiJSU/ mnt /root/oso/ image.c8DfiJSU/ mnt/boot image.c8DfiJSU/ mnt/etc/ redhat- release ']' image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.3.1. el6.x86_ 64 /root/oso/ image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.el6. x86_64 image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.3.1. el6.x86_ 64 /root/oso/ image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.el6. x86_64 /root/oso/ image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.el6. x86_64 image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.el6. x86_64 ']' image.c8DfiJSU/ mnt/boot/ vmlinuz- 2.6.32- 573.el6. x86_64 vmlinuz- 2.6.32- 573.el6. x86_64 VERSION= 2.6.32- 573.el6. x86_64 image.c8DfiJSU/ mnt/boot/ initramfs- 2.6.32- 573.el6. x86_64. img image.c8DfiJSU/ mnt/boot/ initramfs- 2.6.32- 573.el6. x86_64. img initramfs- 2.6.32- 573.el6. x86_64. img 2.6.32- 573.el6. x86_64. img ']' image.c8DfiJSU/ mnt/boot/ extlinux/ extlinux. conf <<_EOF_
+ set -eu
+ set -o pipefail
+ '[' -n /root/oso/
+ source /root/oso/
+ '[' -d /root/oso/
+ CONF=/root/
+ select_
+ TARGET_
+ BOOTDIR=
+ '[' -n '' -a -n '' ']'
+ '[' -f /root/oso/
++ grep PAE
++ ls -1rv /root/oso/
++ grep -v debug
++ head -1
++ echo ''
+ KERNEL=
++ ls -1rv /root/oso/
++ grep -v debug
++ head -1
+ KERNEL=
+ '[' '!' /root/oso/
++ basename /root/oso/
+ KERNEL=
+ KERNEL_
+++ ls /root/oso/
++ basename /root/oso/
+ RAMDISK=
+ '[' '!' initramfs-
+ sudo sh -c 'cat > /root/oso/
DEFAULT linux
LABEL linux 2.6.32- 573.el6. x86_64 cloudimg- rootfs console=tty0 console= ttyS0,115200 nofb nomodeset vga=normal -2.6.32- 573.el6. x86_64. img
KERNEL /boot/vmlinuz-
APPEND ro root=LABEL=
INITRD /boot/initramfs
_EOF_'
dib-run-parts Mon Sep 21 18:29:32 CEST 2015 51-bootloader completed
When adding this QCOW2 image to glance and booting from it via the OpenStack Horizon dashboard, the instance console log below:
/var/lib/ nova/instances/ <instance_ id>/console. log
stays empty :-(
When uploading the original RHEL QCOW2 image retrieved from https:/ /rhn.redhat. com/rhn/ software/ c... to glance and booting from it, it works successfully!
From our point of view there seems to be bug within the DIB. Do you agree?