qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to start most minimal VM (no PCI) with a network to log in over


From: Thomas Huth
Subject: Re: How to start most minimal VM (no PCI) with a network to log in over SSH?
Date: Mon, 11 Sep 2023 15:27:55 +0200
User-agent: Evolution 3.48.4 (3.48.4-1.fc38)

On Sat, 2023-09-09 at 11:53 +0200, Paul Menzel wrote:
> Dear QEMU folks,
> 
> 
> I’d like to start the most minimal VM possible, but still want to be 
> able to log in over SSH. With QEMU 7.2.1 the command below fails, as
> I 
> am passing an incompatible NIC model:
> 
>      $ qemu-system-x86_64 -M 
> microvm,x-option-roms=off,pit=off,pic=off,isa-serial=off,rtc=off 
> -enable-kvm -cpu host -m 32G -smp 32 -nodefaults -no-user-config 
> -nographic -device virtio-rng-device -chardev stdio,id=virtiocon0 
> -device virtio-serial-device -device virtconsole,chardev=virtiocon0 
> -drive id=root,file=debian.img,format=raw,if=none -device 
> virtio-blk-device,drive=root -nic user,model=virtio-net-pci -net 
> user,hostfwd=tcp::22224-:22
>      qemu-system-x86_64: warning: hub 0 with no nics
>      qemu-system-x86_64: warning: netdev #net029 has no peer
>      qemu-system-x86_64: warning: requested NIC (anonymous, model 
> virtio-net-pci) was not created (not supported by this machine?)
> 
> What NIC model should be used instead?
> 
>      $ qemu-system-x86_64 -nic model=help
> 

IIRC "-nic model=help" only lists the PCI devices for some historical
reasons. You can get a list of all devices by running QEMU with "-
device help".

I've never tried it, so no clue whether it works, but you might want to
try:

 -netdev user,id=n1 -device virtio-net-device,netdev=n1

or:

 -netdev user,id=n1 -device ne2k_isa,netdev=n1

to get a NIC with the microvm machine.

 HTH,
  Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]