Boot VM using LXC, mount: wrong fs type, bad option, bad superblock
I need to boot Vm using LXC with Openstack Havana.I'm configuring Openstack LXC by specifying libvirt_type=lxc in /etc/nova/nova.conf.When I'm booting VM,i'm getting following error..
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] NovaException:
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] --
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] Failed to mount filesystem: Unexpected error while running command.
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] Command: mount /dev/nbd2 /var/lib/nova/instances/b6ea4d32-f740-4657-8d35-8b855e8767d6/rootfs
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] Exit code: 32
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] Stdout: ''
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6] Stderr: 'mount: wrong fs type, bad option, bad superblock on /dev/nbd2,\n missing codepage or helper program, or other error\n\n In some cases useful info is found in syslog - try\n dmesg | tail or so.\n'
2015-03-16 19:42:54.116 10438 TRACE nova.compute.manager [instance: b6ea4d32-f740-4657-8d35-8b855e8767d6]
2015-03-16 19:43:05.681 10438 AUDIT nova.compute.resource_tracker [-] Auditing locally available compute resources
I'm using below glance commands to upload images:
glance add name="kernel" is_public=true container_format=aki disk_format=aki < /boot/uImage
glance add name="rootfs_suricata" is_public=true container_format=ovf disk_format=qcow2 < rootfs.ext2.gz
I'm able to generate libvirt.xml file and able to boot VM manually from the libvirt.xml file. Below is the libvirt.xml file..
cat */libvirt.xml
<domain type="lxc">
<uuid>c20e9668-f8b5-41d6-b62f-5ded651cdbaa</uuid>
<name>instance-0000000b</name>
<memory>524288</memory>
<vcpu>1</vcpu>
<os>
<type machine="ppce500">exe</type>
<cmdline>root=/dev/ram console=tty0 console=ttyS0,115200</cmdline>
<init>/bin/sh</init>
</os>
<clock offset="utc"/>
<devices>
<filesystem type="mount">
<source dir="/var/lib/nova/instances/c20e9668-f8b5-41d6-b62f-5ded651cdbaa/rootfs"/>
<target dir="/"/>
</filesystem>
<interface type="bridge">
<mac address="fa:16:3e:07:c0:98"/>
<source bridge="br-int"/>
<target dev="tapdf6a4bdc-ec"/>
<virtualport type="openvswitch">
<parameters interfaceid="df6a4bdc-ec88-43b9-b4bd-d9a0410df405"/>
</virtualport>
</interface>
<console type="pty"/>
</devices>
</domain>
What format has been used for glance uploading image for your VM ?
hi
I'm able to sove this.
Thanks Abhishek Jain
@ashu it would be good if you added the solution as an answer below, so that others will find it in the future