I have been tasked with migrating multiple VMware virtual machines to Openstack without rebooting them. We currently use the VMwareVCDriver to allow Openstack to manage the virtual machines. The issue I'm facing is getting Openstack to recognize the new VM's after migrating them to VMware. I am trying to remedy this problem by using sql injection to populate the Openstack database.
Sample SQL insert:
INSERT INTO instances(created_at,updated_at,deleted_at,user_id,project_id,image_ref,kernel_id,ramdisk_id,launch_index,key_name,key_data,power_state,vm_state,memory_mb,vcpus,hostname,host,user_data,reservation_id,scheduled_at,launched_at,terminated_at,display_name,display_description,availability_zone,locked,os_type,launched_on,instance_type_id,vm_mode,uuid,architecture,root_device_name,access_ip_v4,access_ip_v6,task_state,default_ephemeral_device,default_swap_device,progress,auto_disk_config,shutdown_terminate,disable_terminate,root_gb,ephemeral_gb,cell_name,node,deleted,locked_by,cleaned,ephemeral_key_uuid) VALUES
('2017-08-10 16:43:45','2017-08-10 12:41:10','NULL','e3612a55e2854b1092xxxxxxxxxxxxxxx','ce86e191cf854cb2a26bxxxxxxxxxxxxxxx','7436e749-56fc-xxxxxxxxxxxxxxx','NULL','NULL','0','NULL','NULL','1','shutdown','4096','1','servername','compute','NULL','r-ih3jv02l','NULL','2016-06-16 16:44:15','NULL','a',servername','A','0','NULL','compute','1000','NULL','2532a9e0-3cd3-4eef-b6bb-xxxxxxxxxxxxxxx','NULL','/dev/sda','NULL','NULL','NULL','NULL','NULL','1','0','0','0','100','0','NULL','xxxxx(lab)','0','NULL','0','NULL');
Errors:
[root@controller ~]# nova show 2532a9e0-3cd3-4eef-b6bbxxxxxxxxxxxxxxx ERROR (ClientException): The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-6cf5160d-1748-41dc-acd2-74db7fc9df94)