Arbadacarba Posted May 29, 2023 Share Posted May 29, 2023 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. Quote Link to comment
JorgeB Posted May 29, 2023 Share Posted May 29, 2023 If you are using v6.12 (or v6.11 with the zfs plugin) you could create a zfs zvol, clone the image there, then mount that with UD. Quote Link to comment
SimonF Posted May 29, 2023 Share Posted May 29, 2023 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 Quote Link to comment
JonathanM Posted May 29, 2023 Share Posted May 29, 2023 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. Quote Link to comment
Arbadacarba Posted May 30, 2023 Author Share Posted May 30, 2023 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: 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 1 Quote Link to comment
Arbadacarba Posted July 23, 2023 Author Share Posted July 23, 2023 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. Quote Link to comment
Arbadacarba Posted July 27, 2023 Author Share Posted July 27, 2023 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? Quote Link to comment
Recommended Posts
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.