Sigh, for virtual box the update build wrecks the boot MBR. After the updates are installed and the script reboots the vm it hangs at “GRUB” I was pretty sure that installed SuSE with by path instead of id and yes, autoyast has:

    <device_map config:type="list">
      <device_map_entry>
        <firmware>hd0</firmware>
        <linux>/dev/sda</linux>
      </device_map_entry>
    </device_map>

some how the boot manager got installed to /dev/disk/by-id/ata-VBOX_HARDDISK_6VM23FX0 according to /boot/grub2/device.map. And of course after packer clones the original VirtualBox vm the uuid changes and not boot. So I had to add

    echo "(hd0)   /dev/sda" > /boot/grub2/device.map  

to the start of the update script

Another problem that came up with VirtualBox is that the interface was renamed to eth1 after the reboot but the configurations were still pointing to eth0. The workaround for that was adding

    # remove the old udev rule before the reboot
    rm /etc/udev/rules.d/70-persistent-net.rules

Which meant the old eth0 was removed before the reboot and was then automatically set up at the boot-up.

Leave a reply

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required

97 − = 94