Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain ,----------- | Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode. | | Give root password for maintenance | (or type Control-D to continue): `-----------

,----------- nova compute: compute.log | 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57 | 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182 `-----------

I can reproduce the problem out of nova. ,----------- | [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | ", line 1, in <module> | File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit | result = proxy_call(self._autowrap, f, args, kwargs) | File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call | rv = execute(f,args,kwargs) | File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker | rv = meth(args,*kwargs) | File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options | r = libguestfsmod.mount_options (self._o, options, device, mountpoint) | RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type | >>> | [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i | </nova> | ><fs> list-filesystems | list-filesystems | /dev/sda1: unknown | /dev/sda2: ext4 | /dev/VolGroup00/LogVol00: ext4 | /dev/VolGroup00/LogVol01: swap `-----------

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain complain

,-----------
| Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode.
| 
| Give root password for maintenance
| (or type Control-D to continue):
`-----------

`----------- ,----------- nova compute: compute.log | 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57 | 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182 `-----------

`-----------

I can reproduce the problem out of nova. ,----------- nova.

,----------- | [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| ", /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | Formatting '/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk', fmt=qcow2 size=10737418240 backing_file='/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e' encryption=off cluster_size=65536  | [root@compute ~]# env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | image: /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | file format: qcow2 | virtual size: 10G (10737418240 bytes) | disk size: 196K | cluster_size: 65536 | backing file: /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e | [root@compute ~]# cd /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/ | <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/ | [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth | ls -lth | total 7.0M |
-rw-r--r--. 1 qemu qemu 6.9M Dec 18 23:53 disk | -rw-rw----. 1 qemu qemu   0 Dec 18 23:17 console.log |
-rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml | [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# qemu-img resize /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480 | <ova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480 | Image resized. | [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth | ls -lth | total 7.0M |
-rw-r--r--. 1 root root 257K Dec 19 00:29 disk | -rw-r--r--. 1 qemu qemu
6.9M Dec 18 23:53 disk | -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log | -rw-r--r--. 1 nova nova
1.5K Dec 18 23:17 libvirt.xml | [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# python | python | Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)  | [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 | Type "help", "copyright", "credits" or "license" for more information. | >>> import guestfs | from eventlet import tpool |  | image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk" |  | import guestfs | >>> from eventlet import tpool | >>>  | <stances/84ad06df-1223-4e49-ba83-660053f00061/disk" | >>>  | >>> handle = tpool.Proxy(guestfs.GuestFS()) | handle = tpool.Proxy(guestfs.GuestFS()) | >>> handle.add_drive_opts(image, format="qcow2") | handle.add_drive_opts(image, format="qcow2") | >>> handle.launch() | handle.launch()|  | >>>  | >>>  |
>>>  | >>> handle.mount_options("", "/dev/sda", "/") | handle.mount_options("", "/dev/sda", "/") | Traceback (most recent call last): |   File "<stdin>", line 1, in <module>
<module> |   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit
doit |     result = proxy_call(self._autowrap, f, args, kwargs)
*args,
**kwargs) |   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call
proxy_call |     rv = execute(f,args,kwargs)
execute(f,*args,**kwargs) |   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker
tworker |     rv = meth(args,*kwargs)
meth(*args,**kwargs) |   File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options
mount_options |     r = libguestfsmod.mount_options (self._o, options, device, mountpoint)
mountpoint) | RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type
| >>> 
type | >>>  | [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| </nova> 
| /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
-i | </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
-i | Welcome to guestfish, the libguestfs filesystem interactive shell for | editing virtual machine filesystems. |  | Type: 'help' for help on commands |       'man' to read the manual |       'quit' to quit the shell |  | Operating system: Fedora release 17 (Beefy Miracle) | /dev/VolGroup00/LogVol00 mounted on / | /dev/sda2 mounted on /boot |  |
><fs> list-filesystems
| list-filesystems
 | ><fs> list-filesystems | list-filesystems | /dev/sda1: unknown
unknown | /dev/sda2: ext4
ext4 | /dev/VolGroup00/LogVol00: ext4
ext4 | /dev/VolGroup00/LogVol01: swap
`-----------

swap `-----------

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain

,-----------
| Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode.
| 
| Give root password for maintenance
| (or type Control-D to continue):
`-----------

,----------- nova compute: compute.log
| 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57
| 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182
`-----------

I can reproduce the problem out of nova.

,----------- ,-----------
| [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| Formatting '/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk', fmt=qcow2 size=10737418240 backing_file='/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e' encryption=off cluster_size=65536   | [root@compute ~]# env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk | <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| image: /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| file format: qcow2 qcow2
| virtual size: 10G (10737418240 bytes) bytes)
| disk size: 196K 196K
| cluster_size: 65536 65536
| backing file: /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e
| [root@compute ~]# cd /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/ | <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/ /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth -lth
| ls -lth -lth
| total 7.0M |
7.0M
| -rw-r--r--. 1 qemu qemu 6.9M Dec 18 23:53 disk disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log |
console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# qemu-img resize /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480 21474836480
| <ova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480 21474836480
| Image resized. resized.
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth -lth
| ls -lth -lth
| total 7.0M |
7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk disk
| -rw-r--r--. 1 qemu qemu
qemu 6.9M Dec 18 23:53 disk disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log console.log
| -rw-r--r--. 1 nova nova
nova 1.5K Dec 18 23:17 libvirt.xml libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# python | python python
| python
| Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)   | [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 linux2
| Type "help", "copyright", "credits" or "license" for more information. information.
| >>> import guestfs guestfs
| from eventlet import tpool |  | image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk" |  tpool
| 
| image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| 
| import guestfs guestfs
| >>> from eventlet import tpool | >>>  | <stances/84ad06df-1223-4e49-ba83-660053f00061/disk" | >>>  tpool
| >>> 
| <stances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| >>> 
| >>> handle = tpool.Proxy(guestfs.GuestFS()) tpool.Proxy(guestfs.GuestFS())
| handle = tpool.Proxy(guestfs.GuestFS()) tpool.Proxy(guestfs.GuestFS())
| >>> handle.add_drive_opts(image, format="qcow2") format="qcow2")
| handle.add_drive_opts(image, format="qcow2") | >>> handle.launch() format="qcow2")
| >>> handle.launch()
| handle.launch()|  | >>>  | >>>  |
>>>  
| >>> 
| >>> 
| >>> 
| >>> handle.mount_options("", "/dev/sda", "/") "/")
| handle.mount_options("", "/dev/sda", "/") "/")
| Traceback (most recent call last): last):
|   File "<stdin>", line 1, in <module> <module>
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit doit
|     result = proxy_call(self._autowrap, f, *args,
**kwargs) *args, **kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call proxy_call
|     rv = execute(f,*args,**kwargs) execute(f,*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker tworker
|     rv = meth(*args,**kwargs) meth(*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options mount_options
|     r = libguestfsmod.mount_options (self._o, options, device, mountpoint) mountpoint)
| RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type | >>>  type
| >>> 
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
-i | </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
-i /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| Welcome to guestfish, the libguestfs filesystem interactive shell for for
| editing virtual machine filesystems. |  filesystems.
| 
| Type: 'help' for help on commands commands
|       'man' to read the manual manual
|       'quit' to quit the shell |  shell
| 
| Operating system: Fedora release 17 (Beefy Miracle) Miracle)
| /dev/VolGroup00/LogVol00 mounted on / /
| /dev/sda2 mounted on /boot |  |
/boot
| 
| ><fs>   | ><fs> list-filesystems | list-filesystems list-filesystems
| list-filesystems
| /dev/sda1: unknown unknown
| /dev/sda2: ext4 ext4
| /dev/VolGroup00/LogVol00: ext4 ext4
| /dev/VolGroup00/LogVol01: swap swap
`-----------

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain

,-----------
| Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode.
| 
| Give root password for maintenance
| (or type Control-D to continue):
`-----------

,----------- nova compute: compute.log
| 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57
| 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182
`-----------

I can reproduce the problem out of nova.

,-----------
| [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| Formatting '/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk', fmt=qcow2 size=10737418240 backing_file='/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e' encryption=off cluster_size=65536 
| [root@compute ~]# env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| image: /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| file format: qcow2
| virtual size: 10G (10737418240 bytes)
| disk size: 196K
| cluster_size: 65536
| backing file: /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e
| [root@compute ~]# cd /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 qemu qemu 6.9M root root 257K Dec 18 23:53 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# qemu-img resize /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| <ova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| Image resized.
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-r--r--. 1 qemu qemu 6.9M Dec 18 23:53 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# python
| python
| Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) 
| [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import guestfs
| from eventlet import tpool
| 
| image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| 
| import guestfs
| >>> from eventlet import tpool
| >>> 
| <stances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| >>> 
| >>> handle = tpool.Proxy(guestfs.GuestFS())
| handle = tpool.Proxy(guestfs.GuestFS())
| >>> handle.add_drive_opts(image, format="qcow2")
| handle.add_drive_opts(image, format="qcow2")
| >>> handle.launch()
| handle.launch()| 
| >>> 
| >>> 
| >>> 
| >>> handle.mount_options("", "/dev/sda", "/")
| handle.mount_options("", "/dev/sda", "/")
| Traceback (most recent call last):
|   File "<stdin>", line 1, in <module>
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit
|     result = proxy_call(self._autowrap, f, *args, **kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call
|     rv = execute(f,*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker
|     rv = meth(*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options
|     r = libguestfsmod.mount_options (self._o, options, device, mountpoint)
| RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type
| >>> 
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| Welcome to guestfish, the libguestfs filesystem interactive shell for
| editing virtual machine filesystems.
| 
| Type: 'help' for help on commands
|       'man' to read the manual
|       'quit' to quit the shell
| 
| Operating system: Fedora release 17 (Beefy Miracle)
| /dev/VolGroup00/LogVol00 mounted on /
| /dev/sda2 mounted on /boot
| 
| ><fs> 
| ><fs> list-filesystems
| list-filesystems
| /dev/sda1: unknown
| /dev/sda2: ext4
| /dev/VolGroup00/LogVol00: ext4
| /dev/VolGroup00/LogVol01: swap
`-----------

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain

,-----------
| Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode.
| 
| Give root password for maintenance
| (or type Control-D to continue):
`-----------

,----------- nova compute: compute.log
| 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57
| 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182
`-----------

I can reproduce the problem out of nova.

,-----------
| [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| Formatting '/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk', fmt=qcow2 size=10737418240 backing_file='/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e' encryption=off cluster_size=65536 
| [root@compute ~]# env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| image: /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| file format: qcow2
| virtual size: 10G (10737418240 bytes)
| disk size: 196K
| cluster_size: 65536
| backing file: /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e
| [root@compute ~]# cd /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# qemu-img resize /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| <ova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| Image resized.
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# python
| python
| Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) 
| [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import guestfs
| from eventlet import tpool
| 
| image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| 
| import guestfs
| >>> from eventlet import tpool
| >>> 
| <stances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| >>> 
| >>> handle = tpool.Proxy(guestfs.GuestFS())
| handle = tpool.Proxy(guestfs.GuestFS())
| >>> handle.add_drive_opts(image, format="qcow2")
| handle.add_drive_opts(image, format="qcow2")
| >>> handle.launch()
| handle.launch()| 
| >>> 
| >>> 
| >>> 
| >>> handle.mount_options("", "/dev/sda", "/")
| handle.mount_options("", "/dev/sda", "/")
| Traceback (most recent call last):
|   File "<stdin>", line 1, in <module>
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit
|     result = proxy_call(self._autowrap, f, *args, **kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call
|     rv = execute(f,*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker
|     rv = meth(*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options
|     r = libguestfsmod.mount_options (self._o, options, device, mountpoint)
| RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type
| >>> 
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| Welcome to guestfish, the libguestfs filesystem interactive shell for
| editing virtual machine filesystems.
| 
| Type: 'help' for help on commands
|       'man' to read the manual
|       'quit' to quit the shell
| 
| Operating system: Fedora release 17 (Beefy Miracle)
| /dev/VolGroup00/LogVol00 mounted on /
| /dev/sda2 mounted on /boot
| 
| ><fs> 
| ><fs> list-filesystems
| list-filesystems
| /dev/sda1: unknown
| /dev/sda2: ext4
| /dev/VolGroup00/LogVol00: ext4
| /dev/VolGroup00/LogVol01: swap
`-----------

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain

,-----------
| Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode.
| 
| Give root password for maintenance
| (or type Control-D to continue):
`-----------

,----------- nova compute: compute.log
| 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57
| 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182
`-----------

I can reproduce the problem out of nova.

,-----------
| [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| Formatting '/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk', fmt=qcow2 size=10737418240 backing_file='/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e' encryption=off cluster_size=65536 
| [root@compute ~]# env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| image: /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| file format: qcow2
| virtual size: 10G (10737418240 bytes)
| disk size: 196K
| cluster_size: 65536
| backing file: /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e
| [root@compute ~]# cd /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# qemu-img resize /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| <ova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| Image resized.
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# python
| python
| Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) 
| [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import guestfs
| from eventlet import tpool
| 
| image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| 
| import guestfs
| >>> from eventlet import tpool
| >>> 
| <stances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| >>> 
| >>> handle = tpool.Proxy(guestfs.GuestFS())
| handle = tpool.Proxy(guestfs.GuestFS())
| >>> handle.add_drive_opts(image, format="qcow2")
| handle.add_drive_opts(image, format="qcow2")
| >>> handle.launch()
| handle.launch()| 
| >>> 
| >>> 
| >>> 
| >>> handle.mount_options("", "/dev/sda", "/")
| handle.mount_options("", "/dev/sda", "/")
| Traceback (most recent call last):
|   File "<stdin>", line 1, in <module>
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit
|     result = proxy_call(self._autowrap, f, *args, **kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call
|     rv = execute(f,*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker
|     rv = meth(*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options
|     r = libguestfsmod.mount_options (self._o, options, device, mountpoint)
| RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type
| >>> 
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| Welcome to guestfish, the libguestfs filesystem interactive shell for
| editing virtual machine filesystems.
| 
| Type: 'help' for help on commands
|       'man' to read the manual
|       'quit' to quit the shell
| 
| Operating system: Fedora release 17 (Beefy Miracle)
| /dev/VolGroup00/LogVol00 mounted on /
| /dev/sda2 mounted on /boot
| 
| ><fs> 
| ><fs> list-filesystems
| list-filesystems
| /dev/sda1: unknown
| /dev/sda2: ext4
| /dev/VolGroup00/LogVol00: ext4
| /dev/VolGroup00/LogVol01: swap
`-----------

,----------- libvirt_injdect_parition is -1 in nova.conf
| macs-mac-mini:~ mac$ ssh root@control grep libvirt_inject /etc/nova/nova.conf
| #libvirt_inject_password=false
| #libvirt_inject_key=true
| #libvirt_inject_partition=-1
| macs-mac-mini:~ mac$ ssh root@compute grep libvirt_inject /etc/nova/nova.conf
| libvirt_inject_password=true
| #libvirt_inject_key=true
| #libvirt_inject_partition=-1
| libvirt_inject_partition=-1
`-----------

Fail to boot vm, with nova compute complain: Unable to mount image

When booting a Fedora 17 vm, the vm console complain

,-----------
| Welcom to emergency mode. Use "systemctl default" or ^D to enter default mode.
| 
| Give root password for maintenance
| (or type Control-D to continue):
`-----------

,----------- nova compute: compute.log
| 2013-12-18 23:16:22.325 2502 DEBUG nova.virt.disk.vfs.guestfs [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Mount guest OS image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk partition None setup_os_static /usr/lib/python2.6/site-packages/nova/virt/disk/vfs/guestfs.py:57
| 2013-12-18 23:16:22.393 2502 DEBUG nova.virt.disk.api [req-9bb7ee30-8c75-4344-a58f-7f868f7e8d4c b426464726c447239b00c6f9530ae323 67235dbad32449488e7f4b3d817266b7] Unable to mount image /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with error Error mounting /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk with libguestfs (mount_options: /dev/sda1 on / (options: ''): mount: you must specify the filesystem type). Cannot resize. is_image_partitionless /usr/lib/python2.6/site-packages/nova/virt/disk/api.py:182
`-----------

I can reproduce the problem out of nova.

,-----------
| [root@compute ~]# qemu-img create -f qcow2 -o backing_file=/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| Formatting '/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk', fmt=qcow2 size=10737418240 backing_file='/var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e' encryption=off cluster_size=65536 
| [root@compute ~]# env LC_ALL=C LANG=C qemu-img info /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| <var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| image: /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk
| file format: qcow2
| virtual size: 10G (10737418240 bytes)
| disk size: 196K
| cluster_size: 65536
| backing file: /var/lib/nova/instances/_base/da098c9e9b9bba6e4bcbf48e04b52e2c688f702e
| [root@compute ~]# cd /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| <ib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# qemu-img resize /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| <ova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk 21474836480
| Image resized.
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# ls -lth
| ls -lth
| total 7.0M
| -rw-r--r--. 1 root root 257K Dec 19 00:29 disk
| -rw-rw----. 1 qemu qemu    0 Dec 18 23:17 console.log
| -rw-r--r--. 1 nova nova 1.5K Dec 18 23:17 libvirt.xml
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# python
| python
| Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) 
| [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
| Type "help", "copyright", "credits" or "license" for more information.
| >>> import guestfs
| from eventlet import tpool
| 
| image="/var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| 
| import guestfs
| >>> from eventlet import tpool
| >>> 
| <stances/84ad06df-1223-4e49-ba83-660053f00061/disk"
| >>> 
| >>> handle = tpool.Proxy(guestfs.GuestFS())
| handle = tpool.Proxy(guestfs.GuestFS())
| >>> handle.add_drive_opts(image, format="qcow2")
| handle.add_drive_opts(image, format="qcow2")
| >>> handle.launch()
| handle.launch()| 
| >>> 
| >>> 
| >>> 
| >>> handle.mount_options("", "/dev/sda", "/")
| handle.mount_options("", "/dev/sda", "/")
| Traceback (most recent call last):
|   File "<stdin>", line 1, in <module>
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 187, in doit
|     result = proxy_call(self._autowrap, f, *args, **kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 147, in proxy_call
|     rv = execute(f,*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/eventlet/tpool.py", line 76, in tworker
|     rv = meth(*args,**kwargs)
|   File "/usr/lib/python2.6/site-packages/guestfs.py", line 3532, in mount_options
|     r = libguestfsmod.mount_options (self._o, options, device, mountpoint)
| RuntimeError: mount_options: /dev/sda on / (options: ''): mount: you must specify the filesystem type
| >>> 
| [root@compute 84ad06df-1223-4e49-ba83-660053f00061]# guestfish --ro -a /var/lib/nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| </nova/instances/84ad06df-1223-4e49-ba83-660053f00061/disk -i
| Welcome to guestfish, the libguestfs filesystem interactive shell for
| editing virtual machine filesystems.
| 
| Type: 'help' for help on commands
|       'man' to read the manual
|       'quit' to quit the shell
| 
| Operating system: Fedora release 17 (Beefy Miracle)
| /dev/VolGroup00/LogVol00 mounted on /
| /dev/sda2 mounted on /boot
| 
| ><fs> 
| ><fs> list-filesystems
| list-filesystems
| /dev/sda1: unknown
| /dev/sda2: ext4
| /dev/VolGroup00/LogVol00: ext4
| /dev/VolGroup00/LogVol01: swap
`-----------

,----------- libvirt_injdect_parition libvirt_inject_partition is -1 in nova.conf
| macs-mac-mini:~ mac$ ssh root@control grep libvirt_inject /etc/nova/nova.conf
| #libvirt_inject_password=false
| #libvirt_inject_key=true
| #libvirt_inject_partition=-1
| macs-mac-mini:~ mac$ ssh root@compute grep libvirt_inject /etc/nova/nova.conf
| libvirt_inject_password=true
| #libvirt_inject_key=true
| #libvirt_inject_partition=-1
| libvirt_inject_partition=-1
`-----------