Creating generic virtual appliance based on RH7
We are aiming to create a generic virtual appliance based on RH7. I performed a minimal installation of RH7 in virtual box and exported to an OVA file. Then I imported the OVA into Xen, however the virtual machine fails to start as it cannot find any of the partitions (see screenshot attached).

Error reported is:
Warning: /dev/disk/by-uuid/XXXXXXXX does not exist
Existing dracut presents further details:
Warning: Not all disks have been found
Warning: You might want to regenerate your initramfs
One work around I found is to boot using the rescue option in grub, which boots successfully, and then to regenerate the initramfs using "dracut -vf"
After this step I am able to boot successully using the standard (non-resuce) option in grub.
Is there anything I can do to investigate and address this problem in virtual box before exporting to OVA and create an applicance which boots automatically in XEN.
I had the same problem when creating the virtual machine on XEN and importing into virtual box.
I thought maybe I should edit fstab to use the label rather than the uuid, but wasn't sure this is the right thing to do.
Attachments
Responses
You can edit the /etc/fstab in the minimal installation to mount partitions using UUID.
blkid command will list the partitions and their UUID. After this stage is done, then export as OVA.
Just wondering whether it wouldn't be easier for you to use the RH-provided qcow2 image (available from the RHEL download page) as a base for your VM. It's fairly minimal, and you wouldn't need to bother with OS installation.
UUIDs are subject to change - particularly when moving from one bit of "hardware" to another (as would happen when changing virtualization environments). In general, you're better off using something that will survive "hardware" moves.
- Applying LABELs to extX partitions allows you to reference your extX-based filesystems by LABEL within /etc/fstab
- Using LVM objects allows you to reference by LV name
Both are stable across hardware - far mor than either UUID or /dev/XdN devices may be (e.g., an OVA imported to VMware would tend to get a /dev/sdN device node whereas one imported into a Xen type of environment would get a /dev/xvdN device node).
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
