Comments on: How to Create a Virtual HardDisk Volume Using a File in Linux https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/ Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks. Mon, 26 Feb 2024 09:13:12 +0000 hourly 1 By: max https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/comment-page-1/#comment-2140000 Mon, 26 Feb 2024 09:13:12 +0000 https://www.tecmint.com/?p=31434#comment-2140000 Hi,

`sudo` you only really need them for the mount and unmount.

dd does not need sudo (/dev/zero is world readable by default) and the mkfs also does not need root (as long as the file is owned by you).

mkdir also does not need sudo!

]]>
By: Dave https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/comment-page-1/#comment-2131049 Tue, 30 Jan 2024 22:47:57 +0000 https://www.tecmint.com/?p=31434#comment-2131049 I’m halfway there. I was a bit confused about the “/media” bit being in the dd command but not the mkfs command, but then again I’m a novice. I took that out and continued.

When I got to the mount command I put in the full path to the created img file and that seemed to work.

However, in the graphical file browser (in Zorin) what I see is my img file’s name with a padlock on it. In the sidebar is “1.3GB volume” rather than the container name.

I can’t eject that. And when I try to save a new file in this virtual space — using Nano, for example, it says I can’t.

So like commenter Jam on this page, what I have is read only?

I appreciate the instructions, but how should I proceed so that I can use this virtual disk?

]]>
By: Ravi Saive https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/comment-page-1/#comment-2126600 Tue, 16 Jan 2024 04:34:44 +0000 https://www.tecmint.com/?p=31434#comment-2126600 In reply to Tom.

@Tom,

Yes, you are correct in noting that VHD and VHDX have specific compatibility specifications. While Windows 10/11 provides the Disk2vhd program for creating virtual hard disk files (VHD/VHDX) from physical disks, the process is generally tailored for Windows environments.

For Linux-based systems such as Ubuntu or RHEL/CentOS, you can use tools like “dd” to create a disk image. However, directly converting to VHD or VHDX may not be straightforward, as these formats are more native to Windows.

To achieve compatibility, you might need additional tools or a two-step process. You could first create a raw disk image using “dd” or a similar tool and then convert it to VHD/VHDX using a tool like qemu-img.

]]>
By: Tom https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/comment-page-1/#comment-2126280 Mon, 15 Jan 2024 11:24:40 +0000 https://www.tecmint.com/?p=31434#comment-2126280 So I CANNOT take this “VHD” in a name-only file and “mount” it to Windows or VB, right?

VHD and VHDX have very specific specifications for COMPATIBILITY.

W10/11 has a Disk2vhd program and moves from MS to Ubuntu or RHEL/CENTOS (or whats left of it), so does Ubuntu/Linux/Unix have an equivalency to DUMP a physical disk into the VHDX or VHD format?

]]>
By: Jam https://www.tecmint.com/create-virtual-harddisk-volume-in-linux/comment-page-1/#comment-1787459 Sat, 07 May 2022 20:16:52 +0000 https://www.tecmint.com/?p=31434#comment-1787459 I tried this method, but the mounted drive/container remains read-only… I could not find how to enable write permission.

]]>