Macvtap devices?

2022-09-02 Thread X Tec
I have used the -netdev tap,[...] options before, though almost exclusively for 
bridged networking.

I understand this setup uses tap (or tun/tap?) virtual devices for the virtual 
machines.

But, what are "macvtap" devices really?
I saw the term while reading some libvirt docs for comparison purposes; they 
particularly seem to favor these devices...
But even after internet searching I was not able to understand them.

So, if someone could help,
What are they, or what's their difference with "normal" tap devices commonly 
used in QEMU?
Are macvtap devices supported in QEMU? How can one use them?

Thanks beforehand.



Error using swtpm for TPM2

2022-09-02 Thread X Tec
Using QEMU 6.2 and swtpm 0.5.3.

So I start swtpm with:
swtpm socket -t --tpm2 --tpmstate dir=~/tpm0 --ctrl 
type=unixio,path=~/tpm0/swtpm-sock --log level=20 -d

And use these options for QEMU:
-chardev socket,id=chrtpm,path=~/tpm0/swtpm-sock -tpmdev 
emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0

Try to run QEMU and I get this error:
tpm-emulator: TPM result for CMD_INIT: 0x9 operation failed

Then QEMU aborts, and even the swtpm process seemingly gets killed (is no 
more), with or without the -t option.

Could someone help please?
Thanks.



Need help understanding the devices concepts

2022-09-01 Thread X Tec
Hello.

I have lines such as these ones:
-drive file=path/win10.qcow2,index=0,media=disk,format=qcow2,id=disk1,if=none 
-device virtio-blk-pci,drive=disk1,bootindex=1 \
-device qemu-xhci,id=xhci2 -device 
usb-host,bus=xhci2.0,vendorid=0x,productid=0x,bootindex=2 \
-audiodev spice,id=audio1 -device ich9-intel-hda -device 
hda-output,audiodev=audio1 \
-netdev tap,id=n1,br=br0,helper=/usr/lib/qemu-bridge-helper -device 
virtio-net-pci,netdev=n1,mac=52:54:00:xx:yy:zz \
-device qemu-xhci,id=xhci1 -chardev spicevmc,name=usbredir,id=usbredirchardev1 
-device usb-redir,chardev=usbredirchardev1,id=usbredirdev1 \
[...]

Not sure if I'm able to explain myself, but I'd like to understand the overall 
logic behind what I'm trying to do here. I already read the manual and docs, 
but still struggling...

I mean, when I use -audiodev, -netdev, or any other -*dev, how is this called? 
Adding/defining a "device", "driver", "interface", "port", "whatever"? And the 
exact same question when I follow the -*dev with the corresponding -device or 
-chardev options where the -*dev is plugged/connected to.

Also, if things such as -netdev, -device, -drive are called "options", then 
would things such as id=,if=,index= be called "parameters"?

Thanks beforehand for your attention.



Re: Boot order not working with OVMF

2022-08-22 Thread X Tec
And how do I do that?

On 2022-08-20 23:45:49, Christopher Snowhill (kode54) wrote:
> 
> > On Aug 20, 2022, at 7:30 PM, x...@trimaso.com.mx wrote:
> > 
> > Hello.
> > 
> > I noticed that "-boot order=dc" -for example- seems to be only functional 
> > in SeaBIOS, but totally ignored in OVMF. With this last one I need to use 
> > "-boot menu=on", press Esc, and manually edit boot order.
> > 
> > Is there a reason for this?
> > Oh, and forgot to mention in previous thread, I'm currently using QEMU 6.2.
> > 
> > Thanks again for your attention.
> > 
> 
> You should be specifying bootindex (integer) values on the boot devices 
> themselves. At least that's what Proxmox does when it automates qemu-kvm 
> command lines.