Questions about storage

Cameron Showalter cameronsplaze222 at gmail.com
Thu Aug 10 20:40:20 UTC 2023


Hi,

I'm trying to learn libvirt, and this surprised me. With #2, would it work
to just use virsh? 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. 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.

Thanks!


On Wed, Aug 9, 2023 at 6:40 AM Blake McBride <blake1024 at gmail.com> wrote:

> Thanks, Cole.
>
> I hope that putting all of the files associated with a particular VM in
> one place and allowing that to be specified in one unique directory would
> be a high priority.  Without it, backing up and moving a VM becomes too
> unwieldy, risky, and just a needless hassle.
>
> Thanks.
>
> Blake
>
>
> On Wed, Aug 9, 2023 at 8:12 AM Cole Robinson <crobinso at redhat.com> wrote:
>
>> On 8/8/23 9:47 PM, Blake McBride wrote:
>> > Greetings,
>> >
>> > I make pretty regular use of VMs on my Linux box.  I've used KVM,
>> > VirtualBox, and VMWare.  I'd like to make more use of KVM/virt-manager
>> > but I am having a number of problems using virt-manager.  I'm pretty
>> > sure the problem is me.  I just need to understand it more.  I think all
>> > of my questions are about storage.  I hope someone on this list can help
>> > me.  Here are my questions:
>> >
>> > 1.  Is there any way of escaping the whole "storage pool" concept?  I'd
>> > like to just specify a directory to put my files in rather than needing
>> > to creating a pool each time.  Likewise for the ISO I use to gen the
>> > system.  I want to be able to simply browse my disk and select the ISO.
>> >
>>
>> In the storage browser UI, there's the button to `browse local` which
>> opens a native file browser, which kinda escapes the pool UI. But no,
>> there's not a simple UI way to create a new directory for each VM.
>> virt-manager and libvirt convention is to place all VM disk images in
>> one directory. Straying from that requires more config and UI clicks
>>
>> > 2.  I need all of the files associated with a particular VM in one
>> > independent place so I can back it up and move it as a unit easily.
>> > This includes the cow2 file and all of the VM meta information files.
>> >
>>
>> No unfortunately this is not easy to do with libvirt. XML and disk
>> images are never in the same place, UEFI variables are somewhere else,
>> TPM state is yet another place, etc. And I don't know of a tool that
>> simplifies moving all these details. Maybe some virt-v2v invocation can
>> do it.
>>
>> - Cole
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20230810/ba02c902/attachment.htm>


More information about the virt-tools-list mailing list