I´ve got a question about virt-manager. Perhaps some of you might be able to help me.
What I want to do is redirect an USB-stick (which of course is attached to my host) to a virtual machine (virt-manager/qemu/kvm).
To be more precise: I want to redirect my ventoy-stick in order to boot a live OS in a VM.
Well, in actual fact I was successful in accomplishing my goal. I did it this way:
in the settings of my Debian vm:
“add device”
I chose “USB host-device” and from the popup menu the respective stick
in “boot options” this is the boot order: VirtIO - NIC - the ventoy stick
in “boot options”: I checked “activate start menu”
I put the img-file ( easy-4.3.4-amd64.img) on my ventoy stick so I could boot from it directly.
And indeed I could - when starting the installed OS (Debian) - choose the ventoy stick by first hitting the ESC key which gave me the choice of what to boot from.
I chose the ventoy stick and was presented with the ventoy menu. Everything worked pretty well.
But here´s the catch:
I don´t want to have the ventoy stick connected all of the time, just when I need it.
But when I disconenct the stick from the host and then try to boot Debian (the installed OS in the vm) I cannot start it.
Virt-manager complains about not finding the stick (because I disconnected it).
I wonder why that is … because, like I´ve lready said: “in “boot options” this is the boot order: VirtIO - NIC - the ventoy stick”.
So why the complaint Why is starting Debian prohibited
Good idea. Sorry I didn´t think of it in the first place. At least I could´ve written down the exact phrasing.
O.K., here are the screenshots (in German though, but I try to translate the gist at least):
Here you see (boot order) that the USB-stick isn´t even checked, but even if it were …
the (virtual) hard drive is still of position one.
Here are the error messages when I detach the stick and try to boot installed Debian:
The heading is:
“Error when starting the domain…”
Well, it´s clear that the device “090c:1000” cannot be found, as I detached the USB-stick.
But that shouldn´t prevent the system from booting installed Debian, right?
The first thing that comes to mind, when seeing this, is that it probably wants every device to work, no matter the boot order. So, if you have something on the last place to boot, it still wants to have it work, because if it boots and the first two fail, then it wants to boot from the third and if it suddenly is not connected, this would be a fatal error. So, it already checks, which devices are available, beforehand.
That makes perfect sense and indeed I got that impression, too.
I see.
Well, then it looks like nothing else can be done than to choose “remove device” from the seetings when I´m done experimenting as I don´t want to have the ventoy-stick plugged in all the time.
If there isn’t one already there, it would probably be smart to add a button, which skips the check, so the boot devices are more convenient to use.
You might inform yourself about that on the official libvirt or virt-manager or whoever is responsible, channels/fora, if you think this feature would help a lot.
Uh, I haven´t come across such a button so far. But I haven´t looked out for such a thing until now I have to admit.
I may investigate further. Thanks for the hint.
Yes, that sounds like a good idea. Thanks.
Well, to be honest, I considered this “problem” to be a bit quirky at the most.
So I guess it´s not that important. I don´t expereiment with attaching a USB-stick to the vm a lot.
It´s just EasyOS which seems to need that workaround.