Hi Robert,

I've modified disk images for oVirt virtual machines before.  I mostly run servers so they all use preallocated as opposed to thin provisioned disks.  I'm not sure if that matters, but it means my VM disk images are raw files (as opposed to qcow).  Therefore, I used something like the following guide to get into the disk image.  These directions don't use kpartx or libguestfs, but I guess those would work too.  I think it goes without saying, your VM should be off before you modify its disk without its knowledge.

https://major.io/2010/12/14/mounting-a-raw-partition-file-made-with-dd-or-dd_rescue-in-linux/

For me, the biggest problem I had was the partition in the disk image was really an LVM PV.  And that LVM group had the same volume group name as one on the server I was doing this modification.  I had two volume groups with the same name, which made things a little tricky.  But I'll leave that to you to figure out :)

Scott

On Sat, Jun 25, 2016 at 11:41 PM Robert Story <rstory@tislabs.com> wrote:
Hello,

I'm using oVirt 3.5.x w/nfs for vm file storage. I'm trying to restore a vm
from backup, which entails:

 - scp backup.tar to vm
 - untar backup on vm

this means all the data makes 3 trips over the network, each of which
causes a load spike on my nfs server. That nfs load, of course, affects all
other vms.

what I'd like to be able to do is

 - scp backup.tar to nfs server
 - stop vm
 - mount vm disks on nfs server
 - untar backup on nfs server (using ionice to minimze load impact)
 - unmount vm disks
 - start vm

I remember that I used to use kpartx to mount regular KVM disks, so I'm
hoping that it can also be done here. Anyone else tried to make this work?


Robert

--
Senior Software Engineer @ Parsons
_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users