qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1719282] [NEW] Unable to boot after drive-mirror
@ 2017-09-25  9:48 Farid Zarazvand
  2017-09-25 19:14 ` [Qemu-devel] [Bug 1719282] " John Snow
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Farid Zarazvand @ 2017-09-25  9:48 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Hi,
I am using "drive-mirror" qmp block-job command to transfer VM disk image to other path (different physical disk on host).
Unfortunately after shutting down and starting from new image, VM is unable to boot and qrub enters rescue mode displaying following error:
```
error: file '/grub/i386-pc/normal.mod' not found.
Entering rescue mode...
grub rescue>
```

To investigate the problem, I compared both RAW images using linux "cmp
-l" command and found out that they differ in 569028 bytes starting from
address 185598977 to 252708864 which are located on /boot partition.

So I mounted /boot partition of mirrored RAW image on host OS and it
seems that file-system is broken and grub folder is not recognized. But
/boot on original RAW image has no problem.

Mirrored Image:
ls -l /mnt/vm-boot/
ls: cannot access /mnt/vm-boot/grub: Structure needs cleaning
total 38168
-rw-r--r-- 1 root root   157721 Oct 19  2016 config-3.16.0-4-amd64
-rw-r--r-- 1 root root   129281 Sep 20  2015 config-3.2.0-4-amd64
d????????? ? ?    ?           ?            ? grub
-rw-r--r-- 1 root root 15739360 Nov  2  2016 initrd.img-3.16.0-4-amd64
-rw-r--r-- 1 root root 12115412 Oct 10  2015 initrd.img-3.2.0-4-amd64
drwxr-xr-x 2 root root    12288 Oct  7  2013 lost+found
-rw-r--r-- 1 root root  2679264 Oct 19  2016 System.map-3.16.0-4-amd64
-rw-r--r-- 1 root root  2114662 Sep 20  2015 System.map-3.2.0-4-amd64
-rw-r--r-- 1 root root  3126448 Oct 19  2016 vmlinuz-3.16.0-4-amd64
-rw-r--r-- 1 root root  2842592 Sep 20  2015 vmlinuz-3.2.0-4-amd64

Original Image:
ls /mnt/vm-boot/ -l
total 38173
-rw-r--r-- 1 root root   157721 Oct 19  2016 config-3.16.0-4-amd64
-rw-r--r-- 1 root root   129281 Sep 20  2015 config-3.2.0-4-amd64
drwxr-xr-x 5 root root     5120 Nov  2  2016 grub
-rw-r--r-- 1 root root 15739360 Nov  2  2016 initrd.img-3.16.0-4-amd64
-rw-r--r-- 1 root root 12115412 Oct 10  2015 initrd.img-3.2.0-4-amd64
drwxr-xr-x 2 root root    12288 Oct  7  2013 lost+found
-rw-r--r-- 1 root root  2679264 Oct 19  2016 System.map-3.16.0-4-amd64
-rw-r--r-- 1 root root  2114662 Sep 20  2015 System.map-3.2.0-4-amd64
-rw-r--r-- 1 root root  3126448 Oct 19  2016 vmlinuz-3.16.0-4-amd64
-rw-r--r-- 1 root root  2842592 Sep 20  2015 vmlinuz-3.2.0-4-amd64

ls /mnt/vm-boot/grub/ -l
total 2376
-rw-r--r-- 1 root root      48 Oct  7  2013 device.map
drwxr-xr-x 2 root root    1024 Oct 10  2015 fonts
-r--r--r-- 1 root root    9432 Nov  2  2016 grub.cfg
-rw-r--r-- 1 root root    1024 Oct  7  2013 grubenv
drwxr-xr-x 2 root root    6144 Aug  6  2016 i386-pc
drwxr-xr-x 2 root root    1024 Aug  6  2016 locale
-rw-r--r-- 1 root root 2400500 Aug  6  2016 unicode.pf2

qemu Version: 2.7.0-10

Host OS: Debian 8x64
Guest OS: Debian 8x64

QMP Commands log:
socat UNIX-CONNECT:/var/run/qemu-server/48016.qmp STDIO
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 7, "major": 2}, "package": "pve-qemu-kvm_2.7.0-10"}, "capabilities": []}}
{ "execute": "qmp_capabilities" }
{"return": {}}
{ "execute": "drive-mirror",
  "arguments": {
    "device": "drive-ide0",
    "target": "/diskc/48016/vm-48016-disk-2.raw",
    "sync": "full",
    "mode": "absolute-paths",
    "speed": 0
  }
}
{"return": {}}
{"timestamp": {"seconds": 1506331591, "microseconds": 623095}, "event": "BLOCK_JOB_READY", "data": {"device": "drive-ide0", "len": 269445758976, "offset": 269445758976, "speed": 0, "type": "mirror"}}
{"timestamp": {"seconds": 1506332641, "microseconds": 245272}, "event": "SHUTDOWN"}
{"timestamp": {"seconds": 1506332641, "microseconds": 377751}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-ide0", "len": 271707340800, "offset": 271707340800, "speed": 0, "type": "mirror"}}

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: drive-mirror

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1719282

Title:
  Unable to boot after drive-mirror

Status in QEMU:
  New

Bug description:
  Hi,
  I am using "drive-mirror" qmp block-job command to transfer VM disk image to other path (different physical disk on host).
  Unfortunately after shutting down and starting from new image, VM is unable to boot and qrub enters rescue mode displaying following error:
  ```
  error: file '/grub/i386-pc/normal.mod' not found.
  Entering rescue mode...
  grub rescue>
  ```

  To investigate the problem, I compared both RAW images using linux
  "cmp -l" command and found out that they differ in 569028 bytes
  starting from address 185598977 to 252708864 which are located on
  /boot partition.

  So I mounted /boot partition of mirrored RAW image on host OS and it
  seems that file-system is broken and grub folder is not recognized.
  But /boot on original RAW image has no problem.

  Mirrored Image:
  ls -l /mnt/vm-boot/
  ls: cannot access /mnt/vm-boot/grub: Structure needs cleaning
  total 38168
  -rw-r--r-- 1 root root   157721 Oct 19  2016 config-3.16.0-4-amd64
  -rw-r--r-- 1 root root   129281 Sep 20  2015 config-3.2.0-4-amd64
  d????????? ? ?    ?           ?            ? grub
  -rw-r--r-- 1 root root 15739360 Nov  2  2016 initrd.img-3.16.0-4-amd64
  -rw-r--r-- 1 root root 12115412 Oct 10  2015 initrd.img-3.2.0-4-amd64
  drwxr-xr-x 2 root root    12288 Oct  7  2013 lost+found
  -rw-r--r-- 1 root root  2679264 Oct 19  2016 System.map-3.16.0-4-amd64
  -rw-r--r-- 1 root root  2114662 Sep 20  2015 System.map-3.2.0-4-amd64
  -rw-r--r-- 1 root root  3126448 Oct 19  2016 vmlinuz-3.16.0-4-amd64
  -rw-r--r-- 1 root root  2842592 Sep 20  2015 vmlinuz-3.2.0-4-amd64

  Original Image:
  ls /mnt/vm-boot/ -l
  total 38173
  -rw-r--r-- 1 root root   157721 Oct 19  2016 config-3.16.0-4-amd64
  -rw-r--r-- 1 root root   129281 Sep 20  2015 config-3.2.0-4-amd64
  drwxr-xr-x 5 root root     5120 Nov  2  2016 grub
  -rw-r--r-- 1 root root 15739360 Nov  2  2016 initrd.img-3.16.0-4-amd64
  -rw-r--r-- 1 root root 12115412 Oct 10  2015 initrd.img-3.2.0-4-amd64
  drwxr-xr-x 2 root root    12288 Oct  7  2013 lost+found
  -rw-r--r-- 1 root root  2679264 Oct 19  2016 System.map-3.16.0-4-amd64
  -rw-r--r-- 1 root root  2114662 Sep 20  2015 System.map-3.2.0-4-amd64
  -rw-r--r-- 1 root root  3126448 Oct 19  2016 vmlinuz-3.16.0-4-amd64
  -rw-r--r-- 1 root root  2842592 Sep 20  2015 vmlinuz-3.2.0-4-amd64

  ls /mnt/vm-boot/grub/ -l
  total 2376
  -rw-r--r-- 1 root root      48 Oct  7  2013 device.map
  drwxr-xr-x 2 root root    1024 Oct 10  2015 fonts
  -r--r--r-- 1 root root    9432 Nov  2  2016 grub.cfg
  -rw-r--r-- 1 root root    1024 Oct  7  2013 grubenv
  drwxr-xr-x 2 root root    6144 Aug  6  2016 i386-pc
  drwxr-xr-x 2 root root    1024 Aug  6  2016 locale
  -rw-r--r-- 1 root root 2400500 Aug  6  2016 unicode.pf2

  qemu Version: 2.7.0-10

  Host OS: Debian 8x64
  Guest OS: Debian 8x64

  QMP Commands log:
  socat UNIX-CONNECT:/var/run/qemu-server/48016.qmp STDIO
  {"QMP": {"version": {"qemu": {"micro": 0, "minor": 7, "major": 2}, "package": "pve-qemu-kvm_2.7.0-10"}, "capabilities": []}}
  { "execute": "qmp_capabilities" }
  {"return": {}}
  { "execute": "drive-mirror",
    "arguments": {
      "device": "drive-ide0",
      "target": "/diskc/48016/vm-48016-disk-2.raw",
      "sync": "full",
      "mode": "absolute-paths",
      "speed": 0
    }
  }
  {"return": {}}
  {"timestamp": {"seconds": 1506331591, "microseconds": 623095}, "event": "BLOCK_JOB_READY", "data": {"device": "drive-ide0", "len": 269445758976, "offset": 269445758976, "speed": 0, "type": "mirror"}}
  {"timestamp": {"seconds": 1506332641, "microseconds": 245272}, "event": "SHUTDOWN"}
  {"timestamp": {"seconds": 1506332641, "microseconds": 377751}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "drive-ide0", "len": 271707340800, "offset": 271707340800, "speed": 0, "type": "mirror"}}

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1719282/+subscriptions

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-22  4:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25  9:48 [Qemu-devel] [Bug 1719282] [NEW] Unable to boot after drive-mirror Farid Zarazvand
2017-09-25 19:14 ` [Qemu-devel] [Bug 1719282] " John Snow
2017-09-27 11:32 ` Farid Zarazvand
2017-10-09 18:48 ` John Snow
2017-10-24  7:59 ` Farid Zarazvand
2019-12-23 20:56 ` John Snow
2020-02-22  4:17 ` Launchpad Bug Tracker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).