TritonDataCenter / smartos-live

For more information, please see http://smartos.org/ For any questions that aren't answered there, please join the SmartOS discussion list: https://smartos.topicbox.com/groups/smartos-discuss
1.58k stars 248 forks source link

Creating VM and returning Error #72

Closed Licenser closed 2 years ago

Licenser commented 12 years ago

I am not 100% certain if this is a bug or purpose: if I create a VM with a nic tagged as external but no external net is defined VM.create neutrons an error but still creates the VM, this behavior seems wrong to me, since it can lead to accidentally creating multiple VMs.

Regards, Heinz

travispaul commented 2 years ago

I'm not sure when this was fixed but, vmadm will no longer allow you to add an invalid nic_tag:

[root@smartos ~]# json -f manifest.json 'nics[0].nic_tag'
external

[root@smartos ~]# nictagadm list
NAME           MACADDRESS         LINK           TYPE
admin          be:ef:be:ef:be:ef  e1000g0        normal

[root@smartos ~]# vmadm create -f manifest.json
Invalid nic tag "external"

There's nothing special about "external" in this context. It checks for any invalid nic tag:

[root@smartos ~]# json -f manifest2.json 'nics[0].nic_tag'
poptart

[root@tc2 ~]# vmadm create -f manifest2.json
Invalid nic tag "poptart"

I'm going to go ahead and close this issue, if you're able to reproduce another way or if I'm mistaken please reopen.