How do I mount a qcow2 disk image?
up vote
18
down vote
favorite
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 |Â
up vote
18
down vote
favorite
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 |Â
up vote
18
down vote
favorite
up vote
18
down vote
favorite
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
40.7k59190336
40.7k59190336
add a comment |Â
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
15
down vote
accepted
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.
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 |Â
up vote
3
down vote
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 |Â
up vote
-1
down vote
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 |Â
up vote
-2
down vote
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 at 23:03
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
15
down vote
accepted
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.
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 |Â
up vote
15
down vote
accepted
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.
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 |Â
up vote
15
down vote
accepted
up vote
15
down vote
accepted
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.
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.
edited Jun 23 '15 at 9:28
Cristian Ciupitu
15112
15112
answered Sep 20 '10 at 1:08
Tim Yates
26623
26623
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 |Â
up vote
3
down vote
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 |Â
up vote
3
down vote
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 |Â
up vote
3
down vote
up vote
3
down vote
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
sendmoreinfo
21437
21437
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 |Â
up vote
-1
down vote
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 |Â
up vote
-1
down vote
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 |Â
up vote
-1
down vote
up vote
-1
down vote
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
Gilles
43.6k1398137
43.6k1398137
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 |Â
up vote
-2
down vote
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 at 23:03
add a comment |Â
up vote
-2
down vote
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 at 23:03
add a comment |Â
up vote
-2
down vote
up vote
-2
down vote
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
Premkumar
310211
310211
1
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
â Twirrim
Mar 15 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 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 at 23:03
A qcow2 image is not a raw image, and can't be mounted through either of those approaches.
â Twirrim
Mar 15 at 23:03
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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