Hi All, I am unable to figure out the issue here, when I try to create a filesystem (ext4) on a virtual disk using qemu-nbd. This happens intermittently. Following is the sequence of commands:- $> qemu-img create -f qcow2 test.qcow2 30G $> qemu-nbd --connect=/dev/nbd0 test.qcow2 $> *mkfs.ext4 /dev/nbd0* * mkfs.ext4: Device size reported to be zero. Invalid partition specified, or* *Thu Jun 13 14:44:24 2019 partition table wasn't reread after running fdisk, due to* *Thu Jun 13 14:44:24 2019 a modified partition being busy and in use. You may need to reboot* *Thu Jun 13 14:44:24 2019 to re-read your partition table.* Following is the version details: root@localhost:~# qemu-img --version qemu-img version 2.8.1(Debian 1:2.8+dfsg-6+deb9u7) Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers root@localhost:~# qemu-nbd --version qemu-nbd version 0.0.1 Written by Anthony Liguori. Copyright (C) 2006 Anthony Liguori <anthony@codemonkey.ws>. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. root@localhost:~# uname -a Linux localhost 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux Regards Tanmoy Sinha
On Thu, Jun 27, 2019 at 16:22:27 +0530, Tanmoy Sinha wrote:> Hi All, > > I am unable to figure out the issue here, when I try to create a filesystem > (ext4) on a virtual disk using qemu-nbd. This happens intermittently. > > Following is the sequence of commands:- > > $> qemu-img create -f qcow2 test.qcow2 30G > > > $> qemu-nbd --connect=/dev/nbd0 test.qcow2I think you forgot to use -f qcow2 in this command line. Also the qemu mailing list will probably be better target for this question since your examples are not using libvirt.
Correct no libvirt involved as such, will post this on qemu mailing list. Regards Tanmoy Sinha On Thu, Jun 27, 2019 at 5:09 PM Peter Krempa <pkrempa@redhat.com> wrote:> On Thu, Jun 27, 2019 at 16:22:27 +0530, Tanmoy Sinha wrote: > > Hi All, > > > > I am unable to figure out the issue here, when I try to create a > filesystem > > (ext4) on a virtual disk using qemu-nbd. This happens intermittently. > > > > Following is the sequence of commands:- > > > > $> qemu-img create -f qcow2 test.qcow2 30G > > > > > > $> qemu-nbd --connect=/dev/nbd0 test.qcow2 > > I think you forgot to use -f qcow2 in this command line. > > Also the qemu mailing list will probably be better target for this > question since your examples are not using libvirt. >
Maybe Matching Threads
- Re: mkfs fails on qemu-nbd device
- mkfs.ext2 succeeds despite nbd write errors?
- Re: Nested KVM on VMware ESXi failure (was: Re: Issue with libguestfs-test-tool on a guest hosted on VMWare ESXi)
- Re: Issue with libguestfs-test-tool on a guest hosted on VMWare ESXi
- Re: mkfs.ext2 succeeds despite nbd write errors?