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
changing user to postgres
su – postgress
Enter the postgrel server
okay im not a postgrel kind of a guy
\l # will list the databases
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;
Need the columns in the table
engine=# \d+ vm_images_view
engine=# SELECT image_guid, vm_names from vm_images_view where imagestatus=2;
Okay 4 locked
I want to find all the information about m
engine=# select * from images where image_guid=’4931fabe-a908-45b6-98ec-fe38cf17a475′;
engine=# update images set imagestatus = 1 where image_guid=’4931fabe-a908-45b6-98ec-fe38cf17a475′;
Lock on the disk is now removed and vm can be edited and boot up normally