Ask Your Question

Instance recovery using qemu-nbd [closed]

asked 2015-03-18 16:44:03 -0500

rahulrajvn gravatar image

updated 2015-03-18 16:44:58 -0500

OS: Centos7

Openstack version : Juno

I was trying the recovery methods mentioned in

Mainly recovery of the Data in the instance Disk created @ /var/lib/nova/instances/xxxxxxx.instance-uuid-xxxxxx/disk

They are trying to mount the disk file using qemu-nbd command which gives me no result. When I try to modprobe the nbd module I get the following error.

modprobe: FATAL: Module nbd not found.

I was not able to find the package which gives the module.

any one have any idea regarding recovery of data from the data file of the instance.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by rahulrajvn
close date 2015-03-19 09:45:29.471499

2 answers

Sort by ยป oldest newest most voted

answered 2015-03-19 01:57:27 -0500

dbaxps gravatar image

You may install libguestfs-tools on CentOS 7. Details of setup may be found here

sudo yum install libguestfs-tools


$  guestfish --rw -a trusty-server-cloudimg-amd64-disk1.img

Welcome to guestfish, the guest filesystem shell for
editing virtual machine filesystems and disk images.

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

> run
> list-filesystems
/dev/sda1: ext4
> mount /dev/sda1 /
edit flag offensive delete link more


Hi , I needed to edit the disk file found @ /var/lib/nova/instances/xxxxxxx.instance-uuid-xxxxxx/disk. I tried guestfish for the same but it was not working listing any filesystem.

rahulrajvn gravatar imagerahulrajvn ( 2015-03-19 08:39:59 -0500 )edit

Its Working :)... Thanks

rahulrajvn gravatar imagerahulrajvn ( 2015-03-19 09:45:04 -0500 )edit

If you have an XFS image and you're trying to do a repair, don't forget to also install the libguestfs-xfs package.

ehayes gravatar imageehayes ( 2016-03-28 13:40:50 -0500 )edit

answered 2015-03-18 18:07:46 -0500

Ive tested this and it works just fine. Not sure what the package is called on Centos but on Ubuntu:

apt-cache search qemu-nbd

qemu-utils - QEMU utilities

Once you have that package or what ever is the equivalent for Centos you should be able to follow the procedure to recover data.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-03-18 16:44:03 -0500

Seen: 5,721 times

Last updated: Mar 19 '15