KVM- config_drive device not found on VM

Asked by Tushar Patil

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>
    <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"/>
    </disk>

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.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Tushar Patil
Solved:
Last query:
Last reply:
Revision history for this message
Vish Ishaya (vishvananda) said :
#1

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.

Vish

Revision history for this message
Tushar Patil (tpatil) said :
#2

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