Create Centos 7 minimal image for Google Compute Engine

google-cloud-platformgoogle-compute-engine

I`m installing Centos 7 minimal into my virtualbox with this settings

enter image description here

Then i create single "/" standard ext4 partition.

Partitions once installed are:

enter image description here

Once i upload as image and create instance, instance just don`t boot.

Here is the log from instance with my centos 7 minimal image:

    KBD: int09 handler: AL=0
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: HALT
drive 0x000fd900: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520
Space available for UMB: 000c0000-000eb800
Returned 122880 bytes of ZoneHigh
e820 map has 7 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 00000000bfffe000 = 1 RAM
  4: 00000000bfffe000 - 00000000c0000000 = 2 RESERVED
  5: 00000000fffbc000 - 0000000100000000 = 2 RESERVED
  6: 0000000100000000 - 0000000130000000 = 1 RAM
Unable to lock ram - bridge not found
KBD: int09 handler: AL=0
enter handle_19:
  NULL
Booting from Hard Disk 0...
Booting from 0000:7c00

But is just stuck.

Here is log from Google Centos 7

KBD: int09 handler: AL=0
PS2 keyboard initialized
All threads complete.
Scan for option roms
Searching bootorder for: HALT
drive 0x000fd920: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520
Space available for UMB: 000c0000-000eb800
Returned 122880 bytes of ZoneHigh
e820 map has 6 items:
  0: 0000000000000000 - 000000000009fc00 = 1 RAM
  1: 000000000009fc00 - 00000000000a0000 = 2 RESERVED
  2: 00000000000f0000 - 0000000000100000 = 2 RESERVED
  3: 0000000000100000 - 00000000bfffe000 = 1 RAM
  4: 00000000bfffe000 - 00000000c0000000 = 2 RESERVED
  5: 00000000fffbc000 - 0000000100000000 = 2 RESERVED
Unable to lock ram - bridge not found
KBD: int09 handler: AL=0
enter handle_19:
  NULL
Booting from Hard Disk 0...
Booting from 0000:7c00
 [H [J [1;1H [?25l [m [H [J [1;1H [20;7H [mUse the ^ and v keys to change the selection.                       

      Press 'e' to edit the selected item, or 'c' for a command prompt.    [4;80H  [7m [4;1H      CentOS Linux (3.10.0-327.4.4.el7.x86_64) 7 (Core)                         [m [4;79H [m [m [5;1H      CentOS Linux (3.10.0-229.20.1.el7.x86_64) 7 (Core)                        [m [5;79H [m [m [6;1H      CentOS Linux, with Linux 3.10.0-123.el7.x86_64                            [m [6;79H [m [m [7;1H      CentOS Linux, with Linux 0-rescue-c237d8614bd9258fe3d4b8048fbe651d        [m [7;79H [m [m [8;1H                                                                                [m [8;79H [m [m [9;1H                                                                                [m [9;79H [m [m [10;1H                                                                                [m [10;79H [m [m [11;1H                                                                                [m [11;79H [m [m [12;1H                                                                                [m [12;79H [m [m [13;1H                                                                                [m [13;79H [m [m [14;1H                                                                                [m [14;79H [m [m [15;1H                                                                                [m [15;79H [m [m [16;1H                                                                                [m [16;79H [m [m [17;1H                                                                                [m [17;79H [m [m [18;1H                                                                                [m [18;79H [m [18;80H  [4;79H [22;1H   The selected entry will be started automatically in 5s.                      [4;79H [22;1H   The selected entry will be started automatically in 4s.                      [4;79H [22;1H   The selected entry will be started automatically in 3s.                      [4;79H [22;1H   The selected entry will be started automatically in 2s.                      [4;79H [22;1H   The selected entry will be started automatically in 1s.                      [4;79H [22;1H   The selected entry will be started automatically in 0s.                      [4;79H [?25h [H [J [1;1H [H [J [1;1H[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct

Best Answer

It looks like your bootloader is no configured properly. The instructions form the article:

Configure the bootloader on the system so that it can boot on Compute Engine.

  1. Connect to the terminal on the system with the boot disk that you plan to import.
  2. Edit the GRUB config file. Usually this file is at /etc/default/grub, but on some older distributions it might be located in a non-standard directory.

  3. Make the following changes to the GRUB config file:

    • Remove any line that has splashimage=. Compute Engine does not support splash screens on boot.
    • Remove the rhgb and quiet kernel command line arguments.
    • Add console=ttyS0,38400n8d to the kernel command line arguments so that the instance can function with the Interactive Serial Console.

  4. Regenerate the grub.cfg file. Use one of the following commands depending on your distribution.

    • Debian and Ubuntu: sudo update-grub
    • RHEL, CentOS, SUSE, openSUSE: sudo grub-mkconfig -o /boot/grub/grub.cfg

  5. Edit the /etc/fstab file and remove references to all disks and partitions other than the boot disk itself and partitions on that boot disk. Invalid entries in /etc/fstab can cause your system startup process to halt.
Related Topic