Ask Your Question

KVM- config_drive device not found on VM

asked 2012-07-24 18:56:02 -0500

tpatil gravatar image

I'm testing config_drive function using latest trunk code.

Launch one server with config_drive set to True.

$nova boot --flavor 1 --image a1f827d7-9726-4343-b52a-b8a2bf4cb594 --key_name openstack --config-drive True iso-config-drive If the value is set to “true”, it builds a 64MB vfat volume and attaches it to the server

I do see disk.config of size 64 mb is created on the compute host where this VM is running.

root@ubuntu-precise-002:/opt/stack/nova/instances/instance-0000000d# ls -lrt total 13984 -rw-rw-r-- 1 rohit libvirtd 1570 Jul 24 11:41 libvirt.xml -rw-rw-r-- 1 libvirt-qemu kvm 4731440 Jul 24 11:41 kernel -rw-rw-r-- 1 libvirt-qemu kvm 2254249 Jul 24 11:41 ramdisk -rw-r--r-- 1 libvirt-qemu kvm 67108864 Jul 24 11:41 disk.config -rw-rw---- 1 libvirt-qemu kvm 16249 Jul 24 11:42 console.log -rw-r--r-- 1 libvirt-qemu kvm 7274496 Jul 24 11:47 disk

I also see following 2 devices in the libvirt.xml

<disk type="file" device="disk">
  <driver type="qcow2" cache="none"/>
  <source file="/opt/stack/nova/instances/instance-0000000d/disk"/>
  <target bus="virtio" dev="vda"/>
<disk type="file" device="disk">
  <driver type="raw" cache="none"/>
  <source file="/opt/stack/nova/instances/instance-0000000d/disk.config"/>
  <target bus="virtio" dev="vdz"/>

After SSH to the VM, when I tried to mount the drive it says "No such file or directory".

mount /dev/vdz /tmp/stage

mount: mounting /dev/vdz on /tmp/stage failed: No such file or directory

I have deployed Openstack using devstack and I'm using default image that comes with devstack installation for launching new servers.

Any help will be appreciated.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted

answered 2012-07-24 21:39:40 -0500

vishvananda gravatar image

Even though the libvirt.xml uses vdz, the guest will not mount it there. It is probably at vdb in this case. It would be vdc on a larger instance.


edit flag offensive delete link more

answered 2012-07-24 21:50:03 -0500

tpatil gravatar image

Thanks Vishy. You are correct. I verified it using fdisk -l on VM and could see disk at vdb.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-07-24 18:56:02 -0500

Seen: 259 times

Last updated: Jul 24 '12