On Mon, Apr 03, 2023 at 01:28:14PM +0100, Richard W.M. Jones wrote:
13:19 < tgolembi[m]> is there a trick how to convert a VM with name that starts
with a dash? It's being confused for virt-v2v argument.
:)
Yes you can do this:
$ virt-v2v -o [etc...] -- vmname
Duh. I didn't see that in the documentation and it didn't occur to me
to try.
Thanks
Note all -options need to come before the "--".
For example:
$ virt-builder fedora-35
$ mv fedora-35.img ./-fedora-35.img
$ virt-v2v -i disk -o null -- -fedora-35.img
[ 0.0] Setting up the source: -i disk -fedora-35.img
[etc]
It's quite possible this could hit other corner-cases inside virt-v2v
(eg when running subprocesses), so if you see bugs please file them.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v