You are not logged in.

#1 2022-03-15 13:03:33

solskog
Member
Registered: 2020-09-05
Posts: 321

headless install a kvm guest via ssh

I am installing a kvm guest using live usb image from qemu-headless package inside a physical headless machine.

qemu-system-x86_64 ...
-netdev user,id=guest1,hostfwd=tcp::22222-:22

So that I tried with

ssh -p22222 root@localhost

The problem is archlinux live USB image has a default empty root password
And the default /etc/ssh/sshd_config has PermitEmptypasswords option set to NO.

Offline

#2 2022-03-15 13:35:57

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 565

Re: headless install a kvm guest via ssh

Offline

#3 2022-03-15 14:14:11

solskog
Member
Registered: 2020-09-05
Posts: 321

Re: headless install a kvm guest via ssh

The solutions provided requires modification of /etc/ssh/sshd_config or using cloud-init custom build image. I am looking for a solution that can login me into kvm guest from host machine without modification of the standard live USB image.
something like this, but couldn't get it right.

qemu-system-x86_64 -serial stdio -kernel vmlinuz -hda wheezy.img -append "root=/dev/sda console=ttyS0"

Offline

#4 2022-03-15 17:47:16

Maniaxx
Member
From: .de
Registered: 2014-05-14
Posts: 636

Re: headless install a kvm guest via ssh

You don't need to alter the original image. But you probably have to provide a 2nd image/USB-Stick/etc with the cloud-init configuration to set up the sshd (as stated in the wiki).
If you don't know how to set up QEMU try 'virt-manager' as a template manager. You can grab its qemu commands out of the logs if you want to go back to console.


sys2064

Offline

Board footer

Powered by FluxBB