[vbox] vbox_scripts for don't create VDI image if vm name template contains dot.

Bug #1376429 reported by Oleksii Aleksieiev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
Low
Evgeny Kozhemyakin

Bug Description

At the moment functions/vm.sh script when creating an hdd relays on virtual box feature to add .vdi extension to the filename.

VBoxManage createhd --filename "$vm_disk_path/$disk_name" --size $disk_mb --format VDI

The problem is that vm_name depends on vm_name_prefix variable in config.sh.

if user set vm_name_prefix to the name with "." (dot) in it the virtual box threat the part after dot as a filename extension and does not create .vdi extension.

Solution is to use disk_filename instead disk_name

VBoxManage createhd --filename "$vm_disk_path/$disk_filename" --size $disk_mb --format VDI

Steps to reproduce

#VBoxManage createhd --filename "test1" --size 10 --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 4ffc1fb9-e480-49f4-86b4-e3fbecf04218

#VBoxManage createhd --filename "test2.ext" --size 10 --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 1f248cf2-8fcd-43b9-84ba-f00ce14d6c09

#VBoxManage createhd --filename "test3_ext" --size 10 --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: d0dda225-d070-455c-989c-ef8cc624228f

#ls -1
test1.vdi
test2.ext
test3_ext.vdi

Changed in fuel:
milestone: none → 6.0
assignee: nobody → Miroslav Anashkin (manashkin)
Changed in fuel:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-main (master)

Fix proposed to branch: master
Review: https://review.openstack.org/126857

Changed in fuel:
assignee: Miroslav Anashkin (manashkin) → Evgeny Kozhemyakin (ekozhemyakin)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-main (master)

Reviewed: https://review.openstack.org/126857
Committed: https://git.openstack.org/cgit/stackforge/fuel-main/commit/?id=ef804344a8b052f1a512a52e8e93271ceb27d31f
Submitter: Jenkins
Branch: master

commit ef804344a8b052f1a512a52e8e93271ceb27d31f
Author: Evgeny Kozhemyakin <email address hidden>
Date: Wed Oct 8 14:11:05 2014 +0400

    Fixes a bug with filename extension during .vdi creation.

    Change-Id: Ib1a7b0256d8961946e844f265667053e5e422d9b
    Closes-Bug: 1376429

Changed in fuel:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.