Questions about storage

Erik Huelsmann ehuels at gmail.com
Thu Aug 10 21:08:50 UTC 2023


Hi Cameron,

I'm trying to learn libvirt, and this surprised me. With #2, would it work
> to just use virsh?
>

I'm not sure what "this" is. If you mean "move a VM from one hypervisor to
another" then yes: it'll work with virsh. It's what `virsh migrate` is for.
The functionality is available in virt-manager too: right-click on your VM
and you'll see a "migrate" option there. VMs can have live or offline
migrations. The latter can happen from one machine to another even when
they don't share storage. libvirt will prepare the hypervisor on the target
machine, setting it up so you can start your VM after migration.


> You can use `virsh dumpxml` to save the vm settings, and a similar command
> for the qcow2 storage. Then `virsh define` to restore the vm on a different
> machine.
>

You could. But why re-invent the wheel? That's what `virsh migrate` is for.


> IIRC one of the points of libvirt is you don't want to touch the
> underlying files directly anyways, instead use tools like virsh so that the
> permissions are managed automatically. Plus with this, all you need is the
> VM and volume names, not their paths. Is the problem that UEFI and TPM
> variables aren't kept in the xml itself? I haven't had to touch those yet.
>


Regards,

-- 
Bye,

Erik.

http://efficito.com -- Hosted accounting and ERP.
Robust and Flexible. No vendor lock-in.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20230810/c236ff34/attachment.htm>


More information about the virt-tools-list mailing list