Installing on bare metal using qemu

Hello, world!

I’m a seasoned Linux and BSD administrator, doing my first Clear Linux installation.

I have a bare metal server to which I have no physical access, but which I can boot into a [Debian] Linux recovery mode. The recovery system contains qemu-system.

Here’s what I’ve tried (several times) without success:

  • Downloaded the Clear Linux Live Server ISO

  • Booted the ISO using qemu:

      qemu-system-x86_64 -enable-kvm -m 8192 \
      -cpu host -nic model=e1000e \
      -boot d -cdrom clear-33590-live-server.iso \
      -hda /dev/sda -hdb /dev/sdb -nographic
    
  • Walked through the installation process following the official guide. Didn’t see any errors and everything seemed to go fine.

  • Rebooted the server.

The problem is, the server does not come online. I think that it probably boots (can’t see since there’s no KVM) but doesn’t get online because the UID of the network adapter is obviously different during the qemu based installation.

I’ve been trying to find out how I could make Clear Linux to automatically use DHCP on any and all new network adapters, but haven’t found a solution. I can boot the server to the Linux recovery mode and access the file system of the installation, but I have no clue what I should do there to make the NIC activate properly.

Any ideas how to proceed from here?

Thank you! :slight_smile:

Have you been able to connect during installation? clear-live-server iso also comes with nmtui and nmcli which can be accessed and configured prior to running clr-installer. Have you tried configuring DHCP prior to or during installation?

1 Like

Hi!

I didn’t specifically test the connection during installation, but for what the installer showed me, it was working ok. However, since the installer was running under (or, rather, inside) qemu, it was using qemu’s emulated network adapter. The IP was 10.something – a private address provided by qemu.

The installer did give me the option to install additional bundles which also seems to hint that during the installation, the network connection was working just fine.

The issue here is, that the network adapter Clear Linux sees during the installation is different from the one available when the system boots from bare metal. I assume the UID of the qemu’s virtual adapter is different than the UID of the real adapter.

As you can see from the qemu command line in my original post, I used the parameter “-nic model=e1000e” to make sure that at least the NIC qemu provides is of the same type that the real adapter the server has. This, however, obviously isn’t enough because of the UID issue. While the virtual adapter gets configured and works just fine during the installation, when the system boots from bare metal, it does not initialize the real (hardware) NIC properly.

Maybe you can PXE boot directly to the Clear Linux iso served up from the network? QEMU seems like an additional headache.

If thats not possible to avoid, you could maybe set QM to do PCI passthru for the NIC, instead of virtualizing it.

3 Likes