SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Not without installing additional software, as VHDX is a proprietary Microsoft (HyperV) disk format not recognised by any of the utilities shipped with Slackware.
libguestfs contains the necessary tools to mount a number of virtual disk formats, including VHDX.
If you have qemu installed you can probably use qemu-img to convert the VHDx image to a raw image which you with some trickery to pass the partition table will be able to mount.
Something like:
Code:
qemu-img convert -f vhdx -O raw old_image.vhdx new_file.raw
su
losetup -Pf new_file.raw
mount /dev/loop0p1 /mnt/hd
libguestfs contains the necessary tools to mount a number of virtual disk formats, including VHDX.
YIKES!, The required package list is massive... Explains why I didn't find a Slackbuild or a package from Alien Bob
Currently I'm able to access the images when I need to by using a Windows VM,
It's just tedious to fire one up for something which should be simple to handle in Linux. Though I do get it.
This isn't something I run across often enough to make going through trying to compile and install libguestfs worth it.
Quote:
If you have qemu installed you can probably use qemu-nbd. I have never had need for VHDx but have used qemu-nbd in the past for qcow2 images.
Unfortunately Virtualbox is not as feature rich as qemu, its conversion tool VBoxManage is only capable of converting from raw to some formats supported by Virtualbox.
However, even if you have no plans to use qemu for virtualization of x86 and other platforms like arm and sparc, you can still install qemu from slackbuilds.org at https://slackbuilds.org/repository/15.0/system/qemu/ only to use qemu-img to convert your VHDx image to a format readable by Virtualbox as well as the linux kernel loop device functionality.
Qemu from slackbuilds.org has no dependencies.
If you like virtualbox you should not load the kvm kernel module which speeds up x86 emulation in qemu. That kernel module will stop virtualbox from working as it cannot coexist with vboxdrv needed by virtualbox.
There was a version released just yesterday (libvhdi-alpha-20231127) that indicates added support for VHDx images. I'm the maintainer, and I will try and get an update to SBo before the Friday update cycle if I can get it properly tested by then.
Unfortunately Virtualbox is not as feature rich as qemu, its conversion tool VBoxManage is only capable of converting from raw to some formats supported by Virtualbox.
However, even if you have no plans to use qemu for virtualization of x86 and other platforms like arm and sparc, you can still install qemu from slackbuilds.org at https://slackbuilds.org/repository/15.0/system/qemu/ only to use qemu-img to convert your VHDx image to a format readable by Virtualbox as well as the linux kernel loop device functionality.
Qemu from slackbuilds.org has no dependencies.
If you like virtualbox you should not load the kvm kernel module which speeds up x86 emulation in qemu. That kernel module will stop virtualbox from working as it cannot coexist with vboxdrv needed by virtualbox.
regards Henrik
henca,
I use VirtualBox at home and qemu at work. My home notebook runs VirtualBox normally and it loads the kvm module on boot. Was that you meant ? Here is a printout:
henca,
I use VirtualBox at home and qemu at work. My home notebook runs VirtualBox normally and it loads the kvm module on boot. Was that you meant ?
No, I meant that regardless of plans to use qemu for virtualization it should be possible to use qemu-img to convert the VHD image to a raw format possible to mount as a loopback device.
Your choice of virtualization tool sets the kernel module you load. Those kernel modules are not compatible, you cannot run qemu and virtualbox at the same time on the same host machine. But even if you are running virtualbox you can use the tool qemu-img without any kvm kernel module loaded.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.