Can't mount kvm image file on new kernel of 16.04(linux 4.4.0-119)

Bug #1761646 reported by fumihiko kakuma
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned
Xenial
Expired
Medium
Unassigned

Bug Description

When I use 4.4.0-62-generic kernel, I can mount kvm image file.
But when I use 4.4.0-116-generic or 119 kernel, I can't mount the kvm image file.
Is there some way to mount the kvm image file on 4.4.0-116-generic later kernel?

- release

root@ofaci1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
root@ofaci1:~#

- packages

root@ofaci1:~# dpkg -l | egrep "qemu|mount|linux-image-4.4.0-11"
ii cgroupfs-mount 1.2 all Light-weight package to set up cgroupfs mounts
ii ipxe-qemu 1.0.0+git-20150424.a25a16d-1ubuntu1.2 all PXE boot firmware - ROM images for qemu
ii libmount1:amd64 2.27.1-6ubuntu3.4 amd64 device mounting library
ii linux-image-4.4.0-116-generic 4.4.0-116.140 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-119-generic 4.4.0-119.143 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii mount 2.27.1-6ubuntu3.4 amd64 tools for mounting and manipulating filesystems
ii qemu-block-extra:amd64 1:2.5+dfsg-5ubuntu10.24 amd64 extra block backend modules for qemu-system and qemu-utils
ii qemu-kvm 1:2.5+dfsg-5ubuntu10.24 amd64 QEMU Full virtualization
ii qemu-system-common 1:2.5+dfsg-5ubuntu10.24 amd64 QEMU full system emulation binaries (common files)
ii qemu-system-x86 1:2.5+dfsg-5ubuntu10.24 amd64 QEMU full system emulation binaries (x86)
ii qemu-utils 1:2.5+dfsg-5ubuntu10.24 amd64 QEMU utilities
root@ofaci1:~#

- Use 4.4.0-62-generic

root@ofaci1:~# uname -a
Linux ofaci1 4.4.0-62-generic #83-Ubuntu SMP Wed Jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
root@ofaci1:~# qemu-nbd --connect /dev/nbd1 /opt/ci-pool/slave1.qcow2
root@ofaci1:~# fdisk /dev/nbd1

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/nbd1: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000dfd65

Device Boot Start End Sectors Size Id Type
/dev/nbd1p1 2048 3905535 3903488 1.9G 82 Linux swap / Solaris
/dev/nbd1p2 * 3905536 83884031 79978496 38.1G 83 Linux

Command (m for help): q

root@ofaci1:~# mount /dev/nbd1p2 /mnt/d1
root@ofaci1:~# ls /mnt/d1
bin etc initrd.img.old lost+found opt run sys var
boot home lib media proc sbin tmp vmlinuz
dev initrd.img lib64 mnt root srv usr vmlinuz.old
root@ofaci1:~# umount /mnt/d1

- Use 4.4.0-119-generic

root@ofaci1:~# uname -a
Linux ofaci1 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
root@ofaci1:~# qemu-nbd --connect /dev/nbd1 /opt/ci-pool/slave1.qcow2
root@ofaci1:~# echo $?
0
root@ofaci1:~# fdisk /dev/nbd1

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/nbd1: 40 GiB, 42949672960 bytes, 83886080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000dfd65

Device Boot Start End Sectors Size Id Type
/dev/nbd1p1 2048 3905535 3903488 1.9G 82 Linux swap / Solaris
/dev/nbd1p2 * 3905536 83884031 79978496 38.1G 83 Linux

Command (m for help): q

root@ofaci1:~# mount /dev/nbd1p2 /mnt/d1
mount: special device /dev/nbd1p2 does not exist
root@ofaci1:~# ls /dev/nbd1*
/dev/nbd1 /dev/nbd11 /dev/nbd13 /dev/nbd15
/dev/nbd10 /dev/nbd12 /dev/nbd14
root@ofaci1:~#

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1761646/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → linux (Ubuntu)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1761646

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: xenial
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the proposed kernel and post back if it resolves this bug?
See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed.

Thank you in advance!

Changed in linux (Ubuntu):
importance: Undecided → Medium
Changed in linux (Ubuntu Xenial):
importance: Undecided → Medium
status: New → Incomplete
tags: added: kernel-da-key
Revision history for this message
fumihiko kakuma (kakuma) wrote :

Thank you for your advice.
I tried linux-image-4.4.0-1021-kvm/xenial-proposed and linux-image-4.4.0-120-generic/xenial-proposed.
But they didn't boot on my host well. I may try them on an another machine, if I have any time.

Thanks.

Revision history for this message
fumihiko kakuma (kakuma) wrote :

I tried the above packages on the another machine and they didn't work.
But I found that the following works:

# dpkg -l linux-generic-hwe-16.04
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii linux-generic- 4.13.0.37.56 amd64 Complete Generic Linux kernel and
#

4.4.0-xxx kernel packages do not seem to work.

Thanks.

Revision history for this message
LouAlbano (loualbano) wrote :

I am also seeing this behaviour on Ubuntu 16.04, linux-image-4.4.0-127-generic.

Swapping to kernel 4.13.0-43-generic solved it here too.

Steps:

$ qemu-img create -b example.qcow -f qcow2 /run/shm/temp1.qcow2

$ qemu-nbd -c /dev/nbd1 /run/shm/temp1.qcow2

$ mkdir /tmp/mnt1

$ sudo /bin/mount /dev/nbd1p2 /tmp/mnt1

mount: special device /dev/nbd1p2 does not exist

I can do whatever other diag is needed, please let me know how I can help.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu Xenial) because there has been no activity for 60 days.]

Changed in linux (Ubuntu Xenial):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.