Skip to content

Image not booting in kvm #27

@tuxpeople

Description

@tuxpeople

I tried to build a KVM qemu image, but it's not booting. Most probably, I did something wrong, but I'm unable to find it.

My environment:

[root@lab2 ~]# virsh --version
4.5.0
[root@lab2 ~]# qemu-img --version | head -1
qemu-img version 1.5.3, Copyright (c) 2004-2008 Fabrice Bellard
[root@lab2 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)

I use a GitHub workflow to build it, more or less the same as yours:
https://github.com/tuxpeople/libvirt-alpine-playground/blob/master/.github/workflows/release.yml

I already tried it with your example files, but I'm also unable to boot it with them. But for the record, this are mine:

I use this script to deploy it: https://github.com/tuxpeople/libvirt-alpine-playground/blob/master/labdeploy.sh

Basically, what I do is this:

  • download the image
  • make a copy for the vm
  • create the vm
wget ${IMG} -O /data/virt/images/alpine-playground.qcow2
qemu-img create -q -f qcow2 -F qcow2 -b /data/virt/images/alpine-playground.qcow2 $DISK
qemu-img resize $DISK $DISK_SIZE
virsh \
    pool-create-as \
    --name=${VMNAME} \
    --type=dir \
    --target=${VMDIR}/${VMNAME} \

virt-install \
    --import \
    --name=${VMNAME} \
    --memory=2048 \
    --vcpus=1 \
    --cpu=host \
    --disk=${VMNAME}.qcow2,bus=virtio \
    --network=bridge=bridge99,model=virtio \
    --os-variant=auto \
    --noautoconsole \
    --graphics=spice,port=-1,listen=localhost

When I connect to the console, nothing displays. Also no errors anywhere... Do you have an idea?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions