<div dir="ltr">Correct no libvirt involved as such, will post this on qemu mailing list. <div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards<br>Tanmoy Sinha<br></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 5:09 PM Peter Krempa <<a href="mailto:pkrempa@redhat.com">pkrempa@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jun 27, 2019 at 16:22:27 +0530, Tanmoy Sinha wrote:<br>
> Hi All,<br>
> <br>
> I am unable to figure out the issue here, when I try to create a filesystem<br>
> (ext4) on a virtual disk using qemu-nbd. This happens intermittently.<br>
> <br>
> Following is the sequence of commands:-<br>
> <br>
> $> qemu-img create -f qcow2 test.qcow2 30G<br>
> <br>
> <br>
> $> qemu-nbd --connect=/dev/nbd0 test.qcow2<br>
<br>
I think you forgot to use -f  qcow2 in this command line.<br>
<br>
Also the qemu mailing list will probably be better target for this<br>
question since your examples are not using libvirt.<br>
</blockquote></div>