shwstppr commented on PR #8500:
URL: https://github.com/apache/cloudstack/pull/8500#issuecomment-1888852070
Tested KVM VM import with advanced zone,
Macchinina template:
```
(localcloud) 🐱 > list unmanagedinstances
clusterid=ce0c004e-4b53-4f01-b6a4-6ee5328f42a4
{
"count": 1,
"unmanagedinstance": [
{
"clusterid": "ce0c004e-4b53-4f01-b6a4-6ee5328f42a4",
"clustername": "p1-c1",
"cpucorepersocket": -1,
"cpunumber": 1,
"cpuspeed": 250,
"disk": [
{
"capacity": 52428800,
"controller": "ide",
"datastorehost": "10.1.32.4",
"datastorename":
"/acs/primary/pr8425-t6910-kvm-rocky8/pr8425-t6910-kvm-rocky8-kvm-pri2",
"datastorepath":
"/acs/primary/pr8425-t6910-kvm-rocky8/pr8425-t6910-kvm-rocky8-kvm-pri2",
"datastoretype": "file",
"id": "0",
"imagepath":
"/mnt/72ddc5a4-8316-3f87-8c50-fcce882334b3/23153737-cbec-42a0-ae7e-ba6158ddd4b5",
"label": "hda",
"position": 0
}
],
"hostid": "630c3418-62cd-463a-bbb3-18f4c86e7164",
"hostname": "pr8425-t6910-kvm-rocky8-kvm1",
"memory": 512,
"name": "i-2-3-VM",
"nic": [
{
"adaptertype": "e1000",
"id": "0",
"macaddress": "02:01:00:cc:00:01",
"networkname": "vnet6",
"vlanid": -1
}
],
"powerstate": "PowerOn"
}
]
}
(localcloud) 🐱 > import unmanagedinstance name=i-2-3-VM
clusterid=ce0c004e-4b53-4f01-b6a4-6ee5328f42a4 displayname=test1
zoneid=20e518a8-f066-4f4b-837a-db5bf7284093 importsource=unmanaged
hypervisor=kvm host= username= password= diskpath= temppath=
serviceofferingid=f13d82f9-1725-498d-892c-153ec31a5c5a
templateid=f577aca5-600c-4f0e-9cc6-d2963d84dfa7 nicnetworklist[0].nic=0
nicnetworklist[0].network=eb61e9e8-5f01-489d-ad32-3072d6ccc33a
{
"virtualmachine": {
"account": "admin",
"affinitygroup": [],
"cpunumber": 1,
"cpuspeed": 500,
"created": "2024-01-12T10:35:39+0000",
"details": {
"deployvm": "true",
"kvm.vnc.password": "zGpeTD0MXvLWYVgnyLobIF",
"nicAdapter": "e1000",
"rootDiskController": "ide",
"rootdisksize": "1"
},
"displayname": "test1",
"displayvm": true,
"domain": "ROOT",
"domainid": "2d6ea5ef-aa36-11ee-8314-1e008b000ca5",
"guestosid": "2d7e1188-aa36-11ee-8314-1e008b000ca5",
"haenable": false,
"hasannotations": false,
"hostcontrolstate": "Enabled",
"hostid": "630c3418-62cd-463a-bbb3-18f4c86e7164",
"hostname": "pr8425-t6910-kvm-rocky8-kvm1",
"hypervisor": "KVM",
"id": "16f72e81-6cdd-4610-9ef8-f6758c4b413e",
"instancename": "i-2-3-VM",
"isdynamicallyscalable": false,
"memory": 512,
"name": "test1",
"nic": [
{
"broadcasturi": "vlan://1472",
"deviceid": "0",
"extradhcpoption": [],
"id": "eaee530c-97c4-46db-9b07-e13be320ede3",
"isdefault": true,
"isolationuri": "vlan://1472",
"macaddress": "02:01:00:cc:00:01",
"networkid": "eb61e9e8-5f01-489d-ad32-3072d6ccc33a",
"networkname": "l2",
"secondaryip": [],
"traffictype": "Guest",
"type": "L2"
}
],
"osdisplayname": "Other Linux (64-bit)",
"ostypeid": "2d7e1188-aa36-11ee-8314-1e008b000ca5",
"passwordenabled": false,
"pooltype": "NetworkFilesystem",
"receivedbytes": 0,
"rootdeviceid": 0,
"rootdevicetype": "ROOT",
"securitygroup": [],
"sentbytes": 0,
"serviceofferingid": "f13d82f9-1725-498d-892c-153ec31a5c5a",
"serviceofferingname": "Small Instance",
"state": "Running",
"tags": [],
"templatedisplaytext": "macc-kvm",
"templateid": "f577aca5-600c-4f0e-9cc6-d2963d84dfa7",
"templatename": "macc-kvm",
"templatetype": "USER",
"userid": "4dfdc621-aa36-11ee-8314-1e008b000ca5",
"username": "admin",
"zoneid": "20e518a8-f066-4f4b-837a-db5bf7284093",
"zonename": "pr8425-t6910-kvm-rocky8"
}
}
(localcloud) 🐱 > list volumes
virtualmachineid=16f72e81-6cdd-4610-9ef8-f6758c4b413e filter=id,name,type,size,
{
"count": 1,
"volume": [
{
"id": "7c3efe6e-5b52-4e03-aba0-28cb419fa6b0",
"name": "ROOT-7",
"size": 52428800,
"type": "ROOT"
}
]
}
```
Default template VM with two disks,
```
(localcloud) 🐱 > list unmanagedinstances
clusterid=ce0c004e-4b53-4f01-b6a4-6ee5328f42a4
{
"count": 1,
"unmanagedinstance": [
{
"clusterid": "ce0c004e-4b53-4f01-b6a4-6ee5328f42a4",
"clustername": "p1-c1",
"cpucorepersocket": -1,
"cpunumber": 1,
"cpuspeed": 250,
"disk": [
{
"capacity": 8589934592,
"controller": "virtio",
"datastorehost": "10.1.32.4",
"datastorename":
"/acs/primary/pr8425-t6910-kvm-rocky8/pr8425-t6910-kvm-rocky8-kvm-pri2",
"datastorepath":
"/acs/primary/pr8425-t6910-kvm-rocky8/pr8425-t6910-kvm-rocky8-kvm-pri2",
"datastoretype": "file",
"id": "0",
"imagepath":
"/mnt/72ddc5a4-8316-3f87-8c50-fcce882334b3/aff5a4a2-20af-4a0a-9123-b862a9f62e4f",
"label": "vda",
"position": 0
},
{
"capacity": 21474836480,
"controller": "virtio",
"datastorehost": "10.1.32.4",
"datastorename":
"/acs/primary/pr8425-t6910-kvm-rocky8/pr8425-t6910-kvm-rocky8-kvm-pri2",
"datastorepath":
"/acs/primary/pr8425-t6910-kvm-rocky8/pr8425-t6910-kvm-rocky8-kvm-pri2",
"datastoretype": "file",
"id": "1",
"imagepath":
"/mnt/72ddc5a4-8316-3f87-8c50-fcce882334b3/5cc83bcc-3547-44af-831c-c27bf7a470ff",
"label": "vdb",
"position": 1
}
],
"hostid": "630c3418-62cd-463a-bbb3-18f4c86e7164",
"hostname": "pr8425-t6910-kvm-rocky8-kvm1",
"memory": 512,
"name": "i-2-5-VM",
"nic": [
{
"adaptertype": "virtio",
"id": "0",
"macaddress": "02:01:00:cc:00:02",
"networkname": "vnet7",
"vlanid": -1
}
],
"powerstate": "PowerOn"
}
]
}
(localcloud) 🐱 > import unmanagedinstance name=i-2-5-VM
clusterid=ce0c004e-4b53-4f01-b6a4-6ee5328f42a4 displayname=test2
zoneid=20e518a8-f066-4f4b-837a-db5bf7284093 importsource=unmanaged
hypervisor=kvm host= username= password= diskpath= temppath=
serviceofferingid=f13d82f9-1725-498d-892c-153ec31a5c5a
templateid=2d72d040-aa36-11ee-8314-1e008b000ca5 datadiskofferinglist[0].disk=1
datadiskofferinglist[0].diskOffering=7bfb5e7b-2be1-4dcf-b3be-a08469db32f9
nicnetworklist[0].nic=0
nicnetworklist[0].network=eb61e9e8-5f01-489d-ad32-3072d6ccc33a
{
"virtualmachine": {
"account": "admin",
"affinitygroup": [],
"cpunumber": 1,
"cpuspeed": 500,
"created": "2024-01-12T10:38:01+0000",
"details": {
"dataDiskController": "virtio",
"deployvm": "true",
"kvm.vnc.password": "YoYDYQX1oXNpWImTVpiUQy",
"nicAdapter": "virtio",
"rootDiskController": "virtio"
},
"diskofferingid": "7bfb5e7b-2be1-4dcf-b3be-a08469db32f9",
"diskofferingname": "Custom",
"displayname": "test2",
"displayvm": true,
"domain": "ROOT",
"domainid": "2d6ea5ef-aa36-11ee-8314-1e008b000ca5",
"guestosid": "2d7f57b9-aa36-11ee-8314-1e008b000ca5",
"haenable": false,
"hasannotations": false,
"hostcontrolstate": "Enabled",
"hostid": "630c3418-62cd-463a-bbb3-18f4c86e7164",
"hostname": "pr8425-t6910-kvm-rocky8-kvm1",
"hypervisor": "KVM",
"id": "8efe0bee-3b68-455a-991e-7cccef0bdb7d",
"instancename": "i-2-5-VM",
"isdynamicallyscalable": false,
"memory": 512,
"name": "test2",
"nic": [
{
"broadcasturi": "vlan://1472",
"deviceid": "0",
"extradhcpoption": [],
"id": "cf41ca45-4dbd-4c9b-aecc-7d16d649a073",
"isdefault": true,
"isolationuri": "vlan://1472",
"macaddress": "02:01:00:cc:00:02",
"networkid": "eb61e9e8-5f01-489d-ad32-3072d6ccc33a",
"networkname": "l2",
"secondaryip": [],
"traffictype": "Guest",
"type": "L2"
}
],
"osdisplayname": "CentOS 5.5 (64-bit)",
"ostypeid": "2d7f57b9-aa36-11ee-8314-1e008b000ca5",
"passwordenabled": false,
"pooltype": "NetworkFilesystem",
"receivedbytes": 0,
"rootdeviceid": 0,
"rootdevicetype": "ROOT",
"securitygroup": [],
"sentbytes": 0,
"serviceofferingid": "f13d82f9-1725-498d-892c-153ec31a5c5a",
"serviceofferingname": "Small Instance",
"state": "Running",
"tags": [],
"templatedisplaytext": "CentOS 5.5(64-bit) no GUI (KVM)",
"templateid": "2d72d040-aa36-11ee-8314-1e008b000ca5",
"templatename": "CentOS 5.5(64-bit) no GUI (KVM)",
"templatetype": "BUILTIN",
"userid": "4dfdc621-aa36-11ee-8314-1e008b000ca5",
"username": "admin",
"zoneid": "20e518a8-f066-4f4b-837a-db5bf7284093",
"zonename": "pr8425-t6910-kvm-rocky8"
}
}
(localcloud) 🐱 > list volumes
virtualmachineid=8efe0bee-3b68-455a-991e-7cccef0bdb7d filter=id,name,type,size,
{
"count": 2,
"volume": [
{
"id": "9c46d1d5-daf1-4530-aa4d-fef3ac6a42ac",
"name": "ROOT-9",
"size": 8589934592,
"type": "ROOT"
},
{
"id": "04809d8a-f7b9-4745-b91b-c734424fc901",
"name": "DATA-9-1",
"size": 21474836480,
"type": "DATADISK"
}
]
}
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]