Locked disk after VM clone

In my early start of using ovirt I had an idea that running the ovirt vm based on templates so I fast could deploy new vm.
This was before puppet/foreman was introduced and in its early stages of learning.
So I created a Debian8 server at made is a template, but to much overhead in reconfiguring it to fit the new role was to big.
So I made a clean vm with only an added disk. And it went fine for some month.
But hey theses vm base on the template are all dependent on it even after I have created it..
After a clone of the image I dis coved that it then became cloned|independent – woop woop. So I cloned one more.
After I would like to boot them but, hmmm disk is locked. The logs says that the clone has finish and now has a new UUID both for VM and Disk

logging into the engine
ssh ovirt-engine

changing user to postgres
su – postgress

Enter the postgrel server
psql

okay im not a postgrel kind of a guy
\l # will list the databases

postgres=# \l
skaermbillede-fra-2016-09-21-14-22-11

Connection to database:
postgres=# \c engine
You are now connected to database “engine” as user “postgres”.

Okay how to figure out which disk that have a imagestatus = 2 (locked)

engine=# SELECT image_guid from vm_images_view where imagestatus=2;

skaermbillede-fra-2016-09-21-14-21-57
okay names plaeses

Need the columns in the table

engine=# \d+ vm_images_view

skaermbillede-fra-2016-09-21-14-20-30

engine=# SELECT image_guid, vm_names from vm_images_view where imagestatus=2;

skaermbillede-fra-2016-09-21-14-21-23
Okay 4 locked
I want to find all the information about m
engine=# select * from images where image_guid=’4931fabe-a908-45b6-98ec-fe38cf17a475′;
skaermbillede-fra-2016-09-21-14-21-42
engine=# update images set imagestatus = 1 where image_guid=’4931fabe-a908-45b6-98ec-fe38cf17a475′;
UPDATE 1

Lock on the disk is now removed and vm can be edited and boot up normally

Leave a Reply

Your e-mail address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.