Bug 808870 - Cloning VM from a snapshot created without NIC devices
Summary: Cloning VM from a snapshot created without NIC devices
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-core
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Moti Asayag
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-01 11:31 UTC by Avihai Shoham
Modified: 2012-12-17 07:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-17 07:49:13 UTC
oVirt Team: ---
Embargoed:


Attachments (Terms of Use)

Description Avihai Shoham 2012-04-01 11:31:20 UTC
using UI - a VM which will clone  from a snapshot will be  crated  without a NIC device , although the snapshot has .

looking into vm_device table the cloned VM has NICs devices, but when i looked in  vm_interface the entries are empty. 





engine=# SELECT * from vm_device where vm_id = '408ce236-acd6-4754-ad3a-93ca04ea3044';
              device_id               |                vm_id                 |    type    |    device     |                           address                            | boot_order |                  spec_params                  | is_ma
naged | is_plugged | is_readonly
--------------------------------------+--------------------------------------+------------+---------------+--------------------------------------------------------------+------------+-----------------------------------------------+------
------+------------+-------------
 7f14fe5d-969a-43fc-b4d4-2c883be9d341 | 408ce236-acd6-4754-ad3a-93ca04ea3044 | interface  | bridge        | {bus=0x00, domain=0x0000, type=pci, slot=0x05, function=0x0} |          1 | deviceId=7f14fe5d-969a-43fc-b4d4-2c883be9d341 | t    
      | t          | f
 f17d0a23-47fb-45a0-9a02-d0ff88f94187 | 408ce236-acd6-4754-ad3a-93ca04ea3044 | disk       | disk          | {bus=0x00, domain=0x0000, type=pci, slot=0x07, function=0x0} |          0 | deviceId=f17d0a23-47fb-45a0-9a02-d0ff88f94187 | t    
      | t          | f
 60d3b5bc-1587-4d62-ace0-422e30323fee | 408ce236-acd6-4754-ad3a-93ca04ea3044 | interface  | bridge        | {bus=0x00, domain=0x0000, type=pci, slot=0x03, function=0x0} |          2 | deviceId=60d3b5bc-1587-4d62-ace0-422e30323fee | t    
      | t          | f
 924b253d-3d0e-4946-a707-5d71d1971f68 | 408ce236-acd6-4754-ad3a-93ca04ea3044 | controller | virtio-serial | {bus=0x00, domain=0x0000, type=pci, slot=0x06, function=0x0} |          0 | deviceId=924b253d-3d0e-4946-a707-5d71d1971f68 | f    
      | t          | f
 1c20baf1-9413-4c48-9996-74047b392174 | 408ce236-acd6-4754-ad3a-93ca04ea3044 | channel    | unix          | {port=1, bus=0, controller=0, type=virtio-serial}            |          0 | deviceId=1c20baf1-9413-4c48-9996-74047b392174 | f    
      | t          | f
 9a41f39d-ee70-4680-8cfa-86c62533b6a5 | 408ce236-acd6-4754-ad3a-93ca04ea3044 | channel    | spicevmc      | {port=2, bus=0, controller=0, type=virtio-serial}            |          0 | deviceId=9a41f39d-ee70-4680-8cfa-86c62533b6a5 | f    
      | t          | f
 5ee7ffdc-d872-4595-9495-b3506ee2b0ed | 408ce236-acd6-4754-ad3a-93ca04ea3044 | interface  | bridge        | {bus=0x00, domain=0x0000, type=pci, slot=0x04, function=0x0} |          3 | deviceId=5ee7ffdc-d872-4595-9495-b3506ee2b0ed | t    
      | t          | f
(7 rows)



engine=# SELECT * from vm_interface  where id = '5ee7ffdc-d872-4595-9495-b3506ee2b0ed';
 id | network_name | vm_guid | vmt_guid | mac_addr | name | speed | type | _create_date | _update_date
----+--------------+---------+----------+----------+------+-------+------+--------------+--------------
(0 rows)

Comment 1 Yair Zaslavsky 2012-04-01 12:37:29 UTC
Suggested patch for fix -

http://gerrit.ovirt.org/#change,3232

Comment 3 Yair Zaslavsky 2012-04-24 07:58:56 UTC
Moti, please check this issue - it might relate to what you told about missing interfaces at AddVmFromTemplate

Comment 4 Avihai Shoham 2012-04-24 10:21:19 UTC
reproduced with lase devel commit 44d9e6aa26c8eea104536e1861f5ec0f9ad3c421

Comment 5 Moti Asayag 2012-04-24 14:57:44 UTC
Problem introduced for several scenarios:
* Create Vm from Snapshot
* Create VM template

The origin of this regression is due to the following patch
http://gerrit.ovirt.org/#change,3456

That patch added the vm_device table to the vm_interfaces_view, however, at that point of time in create vm, interfaces are created, but no vm devices for them, therefore searching the interfaces on the view will return an empty result and no vm_device will be created for those interfaces.

Comment 6 Moti Asayag 2012-04-29 09:08:08 UTC
http://gerrit.ovirt.org/#change,3947

Comment 7 Avihai Shoham 2012-05-06 07:09:48 UTC
fixed
verified on last dev hash commit b27eef27132cd152d58b6503324a9248374864ab


Note You need to log in before you can comment on or make changes to this bug.