How do I mount a qcow2 disk image?
I have a QEMU virtual machine that uses a qcow2 disk image.
How can I mount its filesystem without powering on the virtual machine?
mount virtualization qemu
add a comment |
I have a QEMU virtual machine that uses a qcow2 disk image.
How can I mount its filesystem without powering on the virtual machine?
mount virtualization qemu
add a comment |
I have a QEMU virtual machine that uses a qcow2 disk image.
How can I mount its filesystem without powering on the virtual machine?
mount virtualization qemu
I have a QEMU virtual machine that uses a qcow2 disk image.
How can I mount its filesystem without powering on the virtual machine?
mount virtualization qemu
mount virtualization qemu
asked Sep 19 '10 at 22:36
ændrükændrük
41.7k61194337
41.7k61194337
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
A quick google search turns up the qemu-nbd
program, mentioned here. It is part of the qemu-kvm
package, so you'll have to install KVM if you aren't using that already. Not sure about any direct GNOME/KDE solutions, if that is what you were looking for. Here is an example for using it:
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 --read-only /path/to/image.qcow2
udisksctl mount -b /dev/nbd0p1
2
Looks likeqemu-nbd
is the best way to go, as long as I remember tomodprobe nbd
first.qemu-nbd
fails silently if this module has not been loaded!
– ændrük
Sep 24 '10 at 16:03
That's unfortunate. You should be able to addnbd
to/etc/modules
, anyway.
– Tim Yates
Sep 24 '10 at 16:54
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
add a comment |
There's also libguestfs, but it's not yet available from official repositories1. There are binaries in libguestfs.org though.
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entiresupermin
appliance.
– Stefan Lasiewski
Mar 4 '13 at 5:53
add a comment |
xmount
can make the disk images of some VMs look like a raw disk (which can then be partitioned with losetup
, and the partitions mounted). I don't know if it supports qcow2, however.
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
add a comment |
you can directly mount as a normal mount like this
mount /dev/sdb1 /mount-point
But if u have n number of device mean you want again mount it to another directory for
that you can follow this one:
Mounting a partition from raw image is pretty simple:
losetup /dev/loop0 image.img
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /mnt/image
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f4396%2fhow-do-i-mount-a-qcow2-disk-image%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
A quick google search turns up the qemu-nbd
program, mentioned here. It is part of the qemu-kvm
package, so you'll have to install KVM if you aren't using that already. Not sure about any direct GNOME/KDE solutions, if that is what you were looking for. Here is an example for using it:
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 --read-only /path/to/image.qcow2
udisksctl mount -b /dev/nbd0p1
2
Looks likeqemu-nbd
is the best way to go, as long as I remember tomodprobe nbd
first.qemu-nbd
fails silently if this module has not been loaded!
– ændrük
Sep 24 '10 at 16:03
That's unfortunate. You should be able to addnbd
to/etc/modules
, anyway.
– Tim Yates
Sep 24 '10 at 16:54
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
add a comment |
A quick google search turns up the qemu-nbd
program, mentioned here. It is part of the qemu-kvm
package, so you'll have to install KVM if you aren't using that already. Not sure about any direct GNOME/KDE solutions, if that is what you were looking for. Here is an example for using it:
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 --read-only /path/to/image.qcow2
udisksctl mount -b /dev/nbd0p1
2
Looks likeqemu-nbd
is the best way to go, as long as I remember tomodprobe nbd
first.qemu-nbd
fails silently if this module has not been loaded!
– ændrük
Sep 24 '10 at 16:03
That's unfortunate. You should be able to addnbd
to/etc/modules
, anyway.
– Tim Yates
Sep 24 '10 at 16:54
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
add a comment |
A quick google search turns up the qemu-nbd
program, mentioned here. It is part of the qemu-kvm
package, so you'll have to install KVM if you aren't using that already. Not sure about any direct GNOME/KDE solutions, if that is what you were looking for. Here is an example for using it:
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 --read-only /path/to/image.qcow2
udisksctl mount -b /dev/nbd0p1
A quick google search turns up the qemu-nbd
program, mentioned here. It is part of the qemu-kvm
package, so you'll have to install KVM if you aren't using that already. Not sure about any direct GNOME/KDE solutions, if that is what you were looking for. Here is an example for using it:
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 --read-only /path/to/image.qcow2
udisksctl mount -b /dev/nbd0p1
edited Jan 4 at 3:34
Mihai Capotă
1,46911318
1,46911318
answered Sep 20 '10 at 1:08
Tim YatesTim Yates
27624
27624
2
Looks likeqemu-nbd
is the best way to go, as long as I remember tomodprobe nbd
first.qemu-nbd
fails silently if this module has not been loaded!
– ændrük
Sep 24 '10 at 16:03
That's unfortunate. You should be able to addnbd
to/etc/modules
, anyway.
– Tim Yates
Sep 24 '10 at 16:54
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
add a comment |
2
Looks likeqemu-nbd
is the best way to go, as long as I remember tomodprobe nbd
first.qemu-nbd
fails silently if this module has not been loaded!
– ændrük
Sep 24 '10 at 16:03
That's unfortunate. You should be able to addnbd
to/etc/modules
, anyway.
– Tim Yates
Sep 24 '10 at 16:54
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
2
2
Looks like
qemu-nbd
is the best way to go, as long as I remember to modprobe nbd
first. qemu-nbd
fails silently if this module has not been loaded!– ændrük
Sep 24 '10 at 16:03
Looks like
qemu-nbd
is the best way to go, as long as I remember to modprobe nbd
first. qemu-nbd
fails silently if this module has not been loaded!– ændrük
Sep 24 '10 at 16:03
That's unfortunate. You should be able to add
nbd
to /etc/modules
, anyway.– Tim Yates
Sep 24 '10 at 16:54
That's unfortunate. You should be able to add
nbd
to /etc/modules
, anyway.– Tim Yates
Sep 24 '10 at 16:54
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
I wrote a little tool to wrap this up: github.com/JonathonReinhart/qcow2-explore
– Jonathon Reinhart
Nov 23 '16 at 1:49
add a comment |
There's also libguestfs, but it's not yet available from official repositories1. There are binaries in libguestfs.org though.
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entiresupermin
appliance.
– Stefan Lasiewski
Mar 4 '13 at 5:53
add a comment |
There's also libguestfs, but it's not yet available from official repositories1. There are binaries in libguestfs.org though.
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entiresupermin
appliance.
– Stefan Lasiewski
Mar 4 '13 at 5:53
add a comment |
There's also libguestfs, but it's not yet available from official repositories1. There are binaries in libguestfs.org though.
There's also libguestfs, but it's not yet available from official repositories1. There are binaries in libguestfs.org though.
edited May 20 '15 at 19:21
Community♦
1
1
answered Sep 16 '11 at 22:14
sendmoreinfosendmoreinfo
22437
22437
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entiresupermin
appliance.
– Stefan Lasiewski
Mar 4 '13 at 5:53
add a comment |
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entiresupermin
appliance.
– Stefan Lasiewski
Mar 4 '13 at 5:53
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entire
supermin
appliance.– Stefan Lasiewski
Mar 4 '13 at 5:53
While libguestfs looks really nice, but is heavyweight. It has a ton of dependencies (It recommends up to 55 dependencies, and installs an entire
supermin
appliance.– Stefan Lasiewski
Mar 4 '13 at 5:53
add a comment |
xmount
can make the disk images of some VMs look like a raw disk (which can then be partitioned with losetup
, and the partitions mounted). I don't know if it supports qcow2, however.
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
add a comment |
xmount
can make the disk images of some VMs look like a raw disk (which can then be partitioned with losetup
, and the partitions mounted). I don't know if it supports qcow2, however.
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
add a comment |
xmount
can make the disk images of some VMs look like a raw disk (which can then be partitioned with losetup
, and the partitions mounted). I don't know if it supports qcow2, however.
xmount
can make the disk images of some VMs look like a raw disk (which can then be partitioned with losetup
, and the partitions mounted). I don't know if it supports qcow2, however.
answered Sep 20 '10 at 23:59
GillesGilles
44.6k1399140
44.6k1399140
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
add a comment |
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
The xmount manual states that only EWF and raw disk images can be used.
– ændrük
Sep 21 '10 at 2:21
add a comment |
you can directly mount as a normal mount like this
mount /dev/sdb1 /mount-point
But if u have n number of device mean you want again mount it to another directory for
that you can follow this one:
Mounting a partition from raw image is pretty simple:
losetup /dev/loop0 image.img
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /mnt/image
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
add a comment |
you can directly mount as a normal mount like this
mount /dev/sdb1 /mount-point
But if u have n number of device mean you want again mount it to another directory for
that you can follow this one:
Mounting a partition from raw image is pretty simple:
losetup /dev/loop0 image.img
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /mnt/image
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
add a comment |
you can directly mount as a normal mount like this
mount /dev/sdb1 /mount-point
But if u have n number of device mean you want again mount it to another directory for
that you can follow this one:
Mounting a partition from raw image is pretty simple:
losetup /dev/loop0 image.img
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /mnt/image
you can directly mount as a normal mount like this
mount /dev/sdb1 /mount-point
But if u have n number of device mean you want again mount it to another directory for
that you can follow this one:
Mounting a partition from raw image is pretty simple:
losetup /dev/loop0 image.img
kpartx -a /dev/loop0
mount /dev/mapper/loop0p1 /mnt/image
edited Feb 28 '14 at 5:52
answered Feb 28 '14 at 4:50
PremkumarPremkumar
310211
310211
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
add a comment |
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
1
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
– Twirrim
Mar 15 '18 at 23:03
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f4396%2fhow-do-i-mount-a-qcow2-disk-image%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown