QEMU image not bootable after restore

abkrim

Active Member
Sep 5, 2009
95
1
28
Pastrana (España)
castris.com
[SOLVED & TIP] QEMU image not bootable after restore

We need move a VPS QEMU to another machine

After restore, without any errors, VID don't start.
Code:
qmrestore --storage vzback vzdump-qemu-409-2011_02_15-02_58_23.tgz 409
INFO: restore QemuServer backup 'vzdump-qemu-409-2011_02_15-02_58_23.tgz' using ID 409
INFO: extracting 'qemu-server.conf' from archive
INFO: extracting 'vm-disk-scsi0.raw' from archive
INFO:   Rounding up size to full physical extent 50.00 GB
INFO:   Logical volume "vm-409-disk-1" created
INFO: new volume ID is 'vzback:vm-409-disk-1'
INFO: restore data to '/dev/vzhd/vm-409-disk-1' (53687091200 bytes)

INFO: 3034+840315 records in
INFO: 3034+840315 records out
INFO: 53687091200 bytes (54 GB) copied, 2957.35 s, 18.2 MB/s
INFO: restore QemuServer backup 'vzdump-qemu-409-2011_02_15-02_58_23.tgz' successful

System says "Not bootable partition"

Try
Code:
mount -o loop,offset=32256 vm-disk-scsi0.raw /mnt/409/

And see all data on /mnt/409

Try start with Centos LiveCd, and system say "Not partions on disk"

I'm frustrated. Any help?

Code:
pve-manager: 1.7-11 (pve-manager/1.7/5470)
running kernel: 2.6.32-4-pve
pve-kernel-2.6.32-4-pve: 2.6.32-30
qemu-server: 1.1-28
pve-firmware: 1.0-10
libpve-storage-perl: 1.0-16
vncterm: 0.9-2
vzctl: 3.0.24-1pve4
vzdump: 1.2-10
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1dso1

If use GParted show disk without partitions
 
Last edited:

abkrim

Active Member
Sep 5, 2009
95
1
28
Pastrana (España)
castris.com
[SOLVED & TIP] QEMU image not bootable after restore

For if it helps someone

Is not the first time it happens, I backup system fails in versions of Proxmox OpenVZ and QEMU.

Is missing, a real log backup, to report faults. One expects that the backups work.

By the way, with Proxmox I have learned long ago to have duplicate things.

The fact is that today, I dropped a machine, and surprise me by trying to recover back the other night that one of them, no errors in the logs of backups, or restore, failed because the disk (based on LVM)

Quite a problem.

Solution.

Some propose Qparted forum, but also slow in the console, in the case of showing the error to show you the error "unrecognized disk label"
  1. Download TestDisk
  2. Uncompress
  3. run #./testdisk_static
  4. Recover Partitions
  5. Restart the VPS with Centos CD and install in chroot mode
  6. grub-install /dev/sd[X] to restore the MBR


Well to me it worked.
 

dietmar

Proxmox Staff Member
Staff member
Apr 28, 2005
17,052
478
103
Austria
www.proxmox.com
Re: [SOLVED & TIP] QEMU image not bootable after restore

Is there a reliable way to reproduce that bug?
 

abkrim

Active Member
Sep 5, 2009
95
1
28
Pastrana (España)
castris.com
Re: [SOLVED & TIP] QEMU image not bootable after restore

Yes.

3 times, restore on 3 machines diferent, 3 times, get same error.

DISK NO BOOTABLE

A nice day.
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,353
837
163
Re: [SOLVED & TIP] QEMU image not bootable after restore

do you use 'scsi' for virtual disks?

does it also happen if you choose IDE or VIRTIO? using scsi is not recommended.
 

abkrim

Active Member
Sep 5, 2009
95
1
28
Pastrana (España)
castris.com
Re: [SOLVED & TIP] QEMU image not bootable after restore

Where information about MODEL Recomended for virtual DISK?

Wiki of proxmox say "Disk type: select IDE for windows guests, (optional SCSI or VIRTIO for Linux guests)"
Thanks.
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,353
837
163
Re: [SOLVED & TIP] QEMU image not bootable after restore

this wiki page needs to be corrected. provide a link and we will change it.
 

dswartz

Active Member
Dec 13, 2010
264
6
38
Re: [SOLVED & TIP] QEMU image not bootable after restore

Tom, can you say what specifically is the issue with scsi? I have no problem not using - be nice to know why though...
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,353
837
163
Re: [SOLVED & TIP] QEMU image not bootable after restore

on some of our versions the scsi option is not available (2.6.18er branch). IDE is used for best compatibility and virtio is used for best performance - on Linux these drivers are available in almost all modern kernels.
for more details, see also the KVM project pages.
 

abkrim

Active Member
Sep 5, 2009
95
1
28
Pastrana (España)
castris.com
Re: [SOLVED & TIP] QEMU image not bootable after restore

this wiki page needs to be corrected. provide a link and we will change it.

http://pve.proxmox.com/wiki/Installation

Fully virtualized Machines (KVM)
....


Disk type: select IDE for windows guests, (optional SCSI or VIRTIO for Linux guests)
....

A nice day.

NOTE: We are probing VIRTIO over Centos 5, and a better speed for I/O disk.
 

bleomycin

Active Member
Mar 20, 2011
43
1
28
Re: [SOLVED & TIP] QEMU image not bootable after restore

I believe i'm suffering from a similar issue and i just wanted to make sure i haven't done something wrong. I have a 64bit debian squeeze guest (ext4 partition) running via KVM, virtio, LVM based storage. I performed a backup:

Code:
vzdump --dumpdir /mnt/backup/ --snapshot 102

deleted the machine from proxmox, and performed a restore:

Code:
qmrestore /mnt/backup/vzdump-qemu-102-2011_03_19-23_38_58.tar 102
INFO: restore QemuServer backup '/mnt/backup/vzdump-qemu-102-2011_03_19-23_38_58.tar' using ID 102
INFO: extracting 'qemu-server.conf' from archive
INFO: extracting 'vm-disk-virtio0.raw' from archive
INFO:   Rounding up size to full physical extent 15.00 GB
INFO:   Logical volume "vm-102-disk-1" created
INFO: new volume ID is 'storage:vm-102-disk-1'
INFO: restore data to '/dev/storage/vm-102-disk-1' (16106127360 bytes)
INFO: 19+564713 records in
INFO: 19+564713 records out
INFO: 16106127360 bytes (16 GB) copied, 608.375 s, 26.5 MB/s
INFO: restore QemuServer backup '/mnt/backup/vzdump-qemu-102-2011_03_19-23_38_58.tar' successful

lvdisplay shows the logical volume was recreated after the restore:

Code:
--- Logical volume ---
  LV Name                /dev/storage/vm-102-disk-1
  VG Name                storage
  LV UUID                T0tVOl-e6J5-Kz1B-J8CQ-Fkf8-QbVl-KYquZW
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                15.00 GB
  Current LE             3841
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:3

However the vm boots to the same "No bootable device."

Any help is greatly appreciated!
 

tmo-nid

New Member
Nov 25, 2011
4
0
1
Re: [SOLVED & TIP] QEMU image not bootable after restore

Hi,

I have the same problem actually. For each backups, my vzdump command is successful.

Code:
 vzdump --dumpdir /var/lib/vz/backup --snapshot 101

Nov 25 09:42:46 INFO: backup mode: snapshot
Nov 25 09:42:46 INFO: ionice priority: 7
Nov 25 09:42:46 INFO: Logical volume "vzsnap-nidvm06-0" created
Nov 25 09:42:46 INFO: creating archive '/var/lib/vz/backup/vzdump-qemu-101-2011_11_25-09_42_45.tar'
Nov 25 09:42:46 INFO: adding '/var/lib/vz/backup/vzdump-qemu-101-2011_11_25-09_42_45.tmp/qemu-server.conf' to archive ('qemu-server.conf')
Nov 25 09:42:46 INFO: adding '/dev/drbdvg/vzsnap-nidvm06-0' to archive ('vm-disk-ide0.raw')
Nov 25 09:45:10 INFO: Total bytes written: 4477390336 (29.65 MiB/s)
Nov 25 09:45:10 INFO: archive file size: 4.17GB
Nov 25 09:45:13 INFO: Logical volume "vzsnap-nidvm06-0" successfully removed
Nov 25 09:45:13 INFO: Finished Backup of VM 101 (00:02:28)

When I restore my backup, it's successful too..

Code:
qmrestore --storage Datastore /var/lib/vz/backup/vzdump-qemu-101-2011_11_25-09_42_45.tar 114
INFO: restore QemuServer backup '/var/lib/vz/backup/vzdump-qemu-101-2011_11_25-09_42_45.tar' using ID 114
INFO: extracting 'qemu-server.conf' from archive
INFO: extracting 'vm-disk-ide0.raw' from archive
INFO:   Rounding up size to full physical extent 32.00 GB
INFO:   Logical volume "vm-114-disk-1" created
INFO: new volume ID is 'Datastore:vm-114-disk-1'
INFO: restore data to '/dev/drbdvg/vm-114-disk-1' (34359738368 bytes)
INFO: 3+37964377 records in
INFO: 131072+0 records out
INFO: 34359738368 bytes (34 GB) copied, 317.946 s, 108 MB/s
INFO: restore QemuServer backup '/var/lib/vz/backup/vzdump-qemu-101-2011_11_25-09_42_45.tar' successful


But, if I boot my VM, I have the same error : Boot failed : not a bootable disk "No bootable device."
Anybody has an idea? I don't know where is wrong.


pve-manager/1.9/6542
nidvm06:~# pveversion --verbose
pve-manager: 1.9-24 (pve-manager/1.9/6542)
running kernel: 2.6.32-6-pve
proxmox-ve-2.6.32: 1.9-47
pve-kernel-2.6.32-6-pve: 2.6.32-47
qemu-server: 1.1-32
pve-firmware: 1.0-14
libpve-storage-perl: 1.0-19
vncterm: 0.9-2
vzctl: 3.0.29-2pve1
vzdump: 1.2-16
vzprocps: 2.0.11-2
vzquota: 3.0.11-1
pve-qemu-kvm: 0.15.0-1
ksm-control-daemon: 1.0-6
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,353
837
163
Re: [SOLVED & TIP] QEMU image not bootable after restore

you cannot dump into the snapshot. use a backup target outside /var/lib/vz.
 

tmo-nid

New Member
Nov 25, 2011
4
0
1
Hi tom, Thx for your help :)

Ok, I replaced my backup target by /home (only for test) but I have the same problem.
Can you explain me why? what is the right type of partition to store the backup?
I don't understand this point.
 

tom

Proxmox Staff Member
Staff member
Aug 29, 2006
15,353
837
163
pls open a new thread, also post your:

> pveversion -v
> df -h
 

tmo-nid

New Member
Nov 25, 2011
4
0
1
I mounted a NFSshare to a local mount point to store the snapshot and it's working.
I will open a new thread to understand and discuss about that.
Thx :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!