You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/12/07 06:59:59 UTC

[GitHub] [cloudstack] borisstoyanov opened a new issue, #6951: import a VM only adds 1st NIC

borisstoyanov opened a new issue, #6951:
URL: https://github.com/apache/cloudstack/issues/6951

   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and main branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   VM ingestion
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main branch.
   -->
   
   ~~~
   4.17.1
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, advanced networking, etc.  N/A otherwise
   -->
   VMware
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   When importing an unmanaged VM it only adds the first NIC, if the VM has more than one it will end up only with one in CloudStack
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   1. Create a VM with 3 networks
   2. Unmanage the VM
   3. Import the VM with auto networking selection
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   all 3 nics are configured 
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   just 1. 
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] rohityadavcloud commented on issue #6951: import a VM only adds 1st NIC

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on issue #6951:
URL: https://github.com/apache/cloudstack/issues/6951#issuecomment-1343020839

   Fixed in https://github.com/apache/cloudstack/pull/6953


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] shwstppr commented on issue #6951: import a VM only adds 1st NIC

Posted by GitBox <gi...@apache.org>.
shwstppr commented on issue #6951:
URL: https://github.com/apache/cloudstack/issues/6951#issuecomment-1340842900

   Investigated this. Imported VMs doesn't set deviceIds for imported NICs and they always remain `0`
   ```
   > select id,uuid,device_id from nics where instance_id=32;
   +----+--------------------------------------+-----------+
   | id | uuid                                 | device_id |
   +----+--------------------------------------+-----------+
   | 80 | dfe56e48-e1b6-4464-b29b-1f726d9e335f |         0 |
   | 81 | ce94fb42-771d-4513-a6a2-6a28b199656f |         0 |
   | 82 | ba7636b2-bac2-412b-b12a-14f4482244b3 |         0 |
   +----+--------------------------------------+-----------+
   ```
   While all nics are imported fine they are not returned by the listVirtualMachines API. listNics API return them correctly,
   ```
   (localcloud) 🐱 > list virtualmachines id=f9a33062-9554-4129-bf53-567b02a2d6af 
   {
     "count": 1,
     "virtualmachine": [
       {
         "account": "admin",
         "affinitygroup": [],
         "cpunumber": 1,
         "cpuspeed": 500,
         "cpuused": "7%",
         "created": "2022-12-07T11:27:35+0000",
         "details": {
           "dataDiskController": "osdefault",
           "deployvm": "true",
           "nicAdapter": "E1000",
           "rootDiskController": "ide"
         },
         "diskioread": 0,
         "diskiowrite": 0,
         "diskkbsread": 0,
         "diskkbswrite": 0,
         "displayname": "gsgdsg",
         "displayvm": true,
         "domain": "ROOT",
         "domainid": "28dd0d34-6c84-11ed-8ab8-1e00480000ff",
         "guestosid": "28e2ad5a-6c84-11ed-8ab8-1e00480000ff",
         "haenable": false,
         "hasannotations": false,
         "hostid": "570210ef-977d-4889-bd52-96b95b0e1658",
         "hostname": "10.0.34.63",
         "hypervisor": "VMware",
         "id": "f9a33062-9554-4129-bf53-567b02a2d6af",
         "instancename": "i-2-29-VM",
         "isdynamicallyscalable": false,
         "memory": 512,
         "memoryintfreekbs": 519168,
         "memorykbs": 524288,
         "memorytargetkbs": 524288,
         "name": "i-2-29-VM",
         "networkkbsread": 0,
         "networkkbswrite": 0,
         "nic": [
           {
             "broadcasturi": "vlan://1224",
             "deviceid": "0",
             "extradhcpoption": [],
             "id": "a31136c7-ab39-4870-98af-7da2328ccab9",
             "isdefault": true,
             "isolationuri": "vlan://1224",
             "macaddress": "02:00:18:e1:00:01",
             "networkid": "3b0ba2a6-f8a6-4bd7-aca0-397209e2e4f9",
             "networkname": "l2-1",
             "secondaryip": [],
             "traffictype": "Guest",
             "type": "L2"
           }
         ],
         "osdisplayname": "CentOS 5.0 (64-bit)",
         "ostypeid": "28e2ad5a-6c84-11ed-8ab8-1e00480000ff",
         "passwordenabled": false,
         "pooltype": "NetworkFilesystem",
         "receivedbytes": 0,
         "rootdeviceid": 0,
         "rootdevicetype": "ROOT",
         "securitygroup": [],
         "sentbytes": 0,
         "serviceofferingid": "24a0a582-723f-4f75-972f-e759347f08e9",
         "serviceofferingname": "Small Instance",
         "state": "Running",
         "tags": [],
         "templatedisplaytext": "VM Import Default Template",
         "templateid": "d8e4e63c-bbe7-4367-9a12-b14f2f01b062",
         "templatename": "system-default-vm-import-dummy-template.iso",
         "userid": "3ef79458-6c84-11ed-8ab8-1e00480000ff",
         "username": "admin",
         "zoneid": "2e2b5e15-b08e-4d62-9288-312a8f7f21e8",
         "zonename": "ref-trl-3847-v-M7-abhishek-kumar"
       }
     ]
   }
   (localcloud) 🐱 > list nics virtualmachineid=f9a33062-9554-4129-bf53-567b02a2d6af 
   {
     "count": 3,
     "nic": [
       {
         "broadcasturi": "vlan://1224",
         "deviceid": "0",
         "extradhcpoption": [],
         "id": "a31136c7-ab39-4870-98af-7da2328ccab9",
         "isdefault": true,
         "isolationuri": "vlan://1224",
         "macaddress": "02:00:18:e1:00:01",
         "networkid": "3b0ba2a6-f8a6-4bd7-aca0-397209e2e4f9",
         "networkname": "l2-1",
         "traffictype": "Guest",
         "type": "L2",
         "virtualmachineid": "f9a33062-9554-4129-bf53-567b02a2d6af"
       },
       {
         "broadcasturi": "vlan://1221",
         "deviceid": "0",
         "extradhcpoption": [],
         "gateway": "10.1.1.1",
         "id": "562ea186-2c91-41ba-838c-ca276e7887e5",
         "ipaddress": "10.1.1.193",
         "isdefault": false,
         "isolationuri": "vlan://1221",
         "macaddress": "02:00:31:05:00:05",
         "netmask": "255.255.255.0",
         "networkid": "b88d9ada-7673-419b-bafe-76eafffb51e8",
         "networkname": "Isolated1",
         "traffictype": "Guest",
         "type": "Isolated",
         "virtualmachineid": "f9a33062-9554-4129-bf53-567b02a2d6af"
       },
       {
         "broadcasturi": "vlan://1228",
         "deviceid": "0",
         "extradhcpoption": [],
         "gateway": "10.1.1.1",
         "id": "0e241072-5f72-4e5b-8165-106624dd01ba",
         "ipaddress": "10.1.1.197",
         "isdefault": false,
         "isolationuri": "vlan://1228",
         "macaddress": "02:00:13:4e:00:11",
         "netmask": "255.255.255.0",
         "networkid": "dcca7280-f9af-4f20-b925-67928d9294b3",
         "networkname": "dsgfds",
         "traffictype": "Guest",
         "type": "Isolated",
         "virtualmachineid": "f9a33062-9554-4129-bf53-567b02a2d6af"
       }
     ]
   }
   ```
   Drafted a PR which adds deviceid for nics of imported VM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] rohityadavcloud closed issue #6951: import a VM only adds 1st NIC

Posted by GitBox <gi...@apache.org>.
rohityadavcloud closed issue #6951: import a VM only adds 1st NIC
URL: https://github.com/apache/cloudstack/issues/6951


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [cloudstack] rohityadavcloud commented on issue #6951: import a VM only adds 1st NIC

Posted by GitBox <gi...@apache.org>.
rohityadavcloud commented on issue #6951:
URL: https://github.com/apache/cloudstack/issues/6951#issuecomment-1343021492

   @borisstoyanov I realised just after merging this hasn't been manually tested by you or @vladimirpetrov but I see testing from @shwstppr, pl re-open if this should require another round of testing 🙏 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org