Ask Your Question
1

Error when booting instance created from vmdk file

asked 2017-01-20 07:49:40 -0500

Gigel gravatar image

I need to migrate a VM from VMWare to OpenStack, so I exported the VM and obtained a vmdk and an ovf file. I created an OpenStack image from the vmdk file:

openstack image create "h5nsn1_vmdk" \
  --file /openstack/images/h5nsn1/h5nsn1-disk1.vmdk \
  --disk-format vmdk --container-format bare \
  --public

and then I launched an instance from that image, but when I connected to the instance console I saw that there was a "Could not boot" error:

dracut-initqueue[238]: Warning: Could not boot.
dracut-initqueue[238]: Warning: /dev/disk/by-uuid/d8366f41-f65d-4034-9aa4-ab137c5c1f7f does not exist

This is the output of the blkid command run from the original VM:

/dev/sda1: UUID="c57bba3b-c004-46e9-87e0-632c7b9262fd" TYPE="swap"
/dev/sda2: UUID="d8366f41-f65d-4034-9aa4-ab137c5c1f7f" TYPE="xfs"

The same "Could not boot" problem appears when I convert the vmdk file to qcow2 format, load it as an image and launch an instance from that image:

qemu-img convert -f vmdk -O qcow2 -c h5nsn1-disk1.vmdk h5nsn1-disk1.qcow2

openstack image create "h5nsn1" \
  --file /openstack/images/h5nsn1/h5nsn1-disk1.qcow2 \
  --disk-format qcow2 --container-format bare \
  --public

Any idea on how to solve this problem?

I use a Newton release OpenStack installation and vSphere Client 6.0.0 VMWare ESXi 6.0.0.


Additional investigations:
I got the same error when trying to create a new VM in VirtualBox and selected the vmdk file for "Use an existing virtual hard disk file" option.
I saw that the new VM had a SATA controller for the disk image, so I created a SCSI controller and assigned that image to it, and after that the VM booted successfully in VirtualBox.

After that I tried to create the OpenStack image this way:

openstack image create "h5nsn1_vmdk_scsi_2" \
  --file /openstack/images/h5nsn1/h5nsn1-disk1.vmdk \
  --disk-format vmdk --container-format bare \
  --property hw_disk_bus=scsi \
  --public

but I got the same error when launching the instance.

This is the header of the vmdk file:

# Disk DescriptorFile
version=1
CID=a73d90b3
parentCID=ffffffff
createType="streamOptimized"

# Extent description
RDONLY 125829120 SPARSE "generated-stream.vmdk"

# The Disk Data Base
#DDB

ddb.adapterType = "lsilogic"
ddb.geometry.cylinders = "7832"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "93fe0e05c26748dab064b879242212c9"
ddb.virtualHWVersion = "9"

Any help is appreciated. Thank you

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
1

answered 2018-04-15 08:23:25 -0500

tanggc gravatar image

when you creat vm by vmware, you disk bus is IDE, but kvm default disk bus is virtio

edit flag offensive delete link more
0

answered 2019-01-24 07:52:03 -0500

Deepa gravatar image

Were you able to fix this ?

edit flag offensive delete link more
0

answered 2019-05-02 21:57:05 -0500

I had a similar issue migrating a CentOS VM from ESXi to OpenStack. I managed to solve it by creating the Glance image directly from the VMDK and using the IDE disk bus:

openstack image create --container-format bare --disk-format vmdk --property hw_disk_bus=ide --file centosvh3-disk1.vmdk centosvh3_vmdk

Just to add more info, the VMDK was exported from ESXi using ovftool:

ovftool 'vi://user:pass@esxi-host/centosvh3_linux' centosvh3
edit flag offensive delete link more
0

answered 2019-05-11 18:24:43 -0500

Hi @Gigel! I has some issues while migrating images from VMware to openstack in the past. This errors seems to be related to CentOS/Fedora/RHE images that set the values of the disks to be assigned as /hdx drives instead of .vdx. Somehow the original initramfs got corrupted or didn't have all the necessary to boot on OpenStack. To fix it I've followed this :

  • Create an instance from the image
  • Login to the console
  • Hard reboot the instance and reload the console to login to single mode in the grub menu
  • Select the centos rescue option on the grub menu and edit it to replace ro by rw init=/bin/bash and remove rhg quiet. Ctrl+x to start the VM and once in the bash prompt do the following:
  • mount /dev/vda1 in /boot
  • run command: dracut -fv o by passing specifically the kernel version you are using by default on recue mode dracut -f /boot/initramfs-$(uname -r).img $(uname -r) to rebuild the initramfs
  • reboot the instance /sbin/reboot -f

Hope it is the same issue as mine and it can solve yours. |

Note: most of the modern Linux distributions based on 2.6.27+ linux kernel include the virtio drivers already as standard.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-01-20 07:49:40 -0500

Seen: 1,700 times

Last updated: May 11