1

Today I'm trying to create a VM using smartos.

I built this config file (called router.json):

{
"alias": "router",
"hostname": "router",
"brand": "joyent",
"max_physical_memory": 256,
"image_uuid": "088b97b0-e1a1-11e5-b895-9baa2086eb33",
"quota": 10,
"nics": [
    {
        "nic_tag": "admin",
        "ip": "dhcp",
        "allow_ip_spoofing": "1",
        "primary": "1"
    },
    {
        "nic_tag": "stub0",
        "ip": "10.0.0.1",
        "netmask": "255.255.255.0",
        "allow_ip_spoofing": "1",
        "gateway": "10.0.0.1"
    }
]

The ran this command:

# vmadm validate create -f router.json
VALID 'create' payload for joyent brand VMs.

But I still have an error when I try to create the VM:

# vmadm create -f router.json
provisioning dataset 088b97b0-e1a1-11e5-b895-9baa2086eb33 with brand joyent is not supported

Anyone have an idea? Thanks a lot.

Celi28
  • 101
  • 13

1 Answers1

2

You are missing a closing curly brace '}' on the JSON payload above, which I assume is just a copy/paste error.

After fixing the JSON, I get the following:

[root@smartos ~]# vmadm validate create -f router.json
{
  "bad_values": [
    "image_uuid"
  ],
  "bad_properties": [],
  "missing_properties": []
}

Have you imported that image yet?

[root@smartos ~]# imgadm import 088b97b0-e1a1-11e5-b895-9baa2086eb33

After importing I get:

[root@smartos ~]# vmadm validate create -f router.json
VALID 'create' payload for joyent brand VMs.
[root@smartos ~]# vmadm create -f router.json
Invalid nic tag "stub0"

Of course, I don't have an etherstub NIC setup yet.

[root@smartos ~]# nictagadm add -l stub0

Then I can create the instance with your payload:

[root@smartos ~]# vmadm create -f router.json
Successfully created VM 53c2648c-d963-62b6-a9dd-e0b9809355d0

If you still are having issue can you provide the version you're using?

[root@smartos ~]# uname -a
SunOS smartos 5.11 joyent_20170413T062226Z i86pc i386 i86pc