Mounting VM drives


Recommended Posts

Is there any way to mount a VM drive? Like a qcow2 volume? Either to mount it in Unassigned Devices and copy the files, or access the whole drive and modify it using a partition manager.

 

My use case it that I have cloned a broken drive to a qcow volume on my cache drive and it was successfully cloned, But now I need to do some partition management tasks on the drive and then I plan to clone it back to hardware... I can't (Easily) clone it back first because it is a 2 TB disk that refuses to fit on a 2TB SSD and in fact only contains under 200GB of data so if I could access the drive I could shrink the partition and fit it on a Smaller SSD.

 

I do a lot of drive conversions and use a dual drive slot in my Unraid server tower to let me avoid working on the patient machines directly.

Link to comment
43 minutes ago, Arbadacarba said:

Is there any way to mount a VM drive? Like a qcow2 volume? Either to mount it in Unassigned Devices and copy the files, or access the whole drive and modify it using a partition manager.

 

My use case it that I have cloned a broken drive to a qcow volume on my cache drive and it was successfully cloned, But now I need to do some partition management tasks on the drive and then I plan to clone it back to hardware... I can't (Easily) clone it back first because it is a 2 TB disk that refuses to fit on a 2TB SSD and in fact only contains under 200GB of data so if I could access the drive I could shrink the partition and fit it on a Smaller SSD.

 

I do a lot of drive conversions and use a dual drive slot in my Unraid server tower to let me avoid working on the patient machines directly.

You can use NBD have a look here.

 

https://gist.github.com/shamil/62935d9b456a6f9877b5

Link to comment
2 hours ago, Arbadacarba said:

But now I need to do some partition management tasks on the drive and then I plan to clone it back to hardware..

Set up a new VM, assign the damaged disk as the main disk, put your favorite bootable recovery image as the installation CD image, and start up the VM.

 

Or, my favorite, set up a VM specifically for recovery and maintenance tasks, and add the damaged image as a secondary drive.

Link to comment
10 hours ago, JonathanM said:

Or, my favorite, set up a VM specifically for recovery and maintenance tasks, and add the damaged image as a secondary drive.

 

Ya, That's my general Technique as well:

 

image.png.570014766d2ac20f46ea37856316c32b.png

 

The Bare Drive VM's Boot the random Hard Drives I get presented with to pull files from and find things on.

 

I just think it would be usefull to skip a step and get right into the drive itself. It seems obvious that Unassigned Devices should be able to mount VM Disks

  • Like 1
Link to comment
  • 1 month later...

So I've had a further idea... I have been using these various disk recovery tools in my home lab, to fix and duplicate drives... And occasionally I have to take the tools with me to help friends and family.

 

I have recently tried using Medicat, and have been really happy with it. Having the tools it includes and adding ISO's of my own purchased tools.

 

But I've started to try to find a way to use Medicat in my Unraid VMs. I've got a VM that boots from the Medicat Thumb Drive and that works, but again why can't I virtualize the USB drive?

 

I've downloaded the Linux creation tool for Medicat, and it seems like I should be able to mount a VDisk in the terminal and run the Medicat installer into that. It would be so usefull to be able to access that Disk from Outside.

Link to comment

So I was able to build a qcow2 VHD (.img) with ventoy and Medicat on it. (Booted a Debian VM with a new 64G VHD attached to it, and ran the Medicat Linux installer)

 

In a dedicated VM it boots and could in theory condense all my various Utility VMs down to 1, that if I keep the same ISO's on my EDC thumbdrive I could have the same tool collection with me when I go on site.

 

But do I really have to boot another VM with this attached to access it? 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.