cneira / zcage

illumos zone manager
Mozilla Public License 2.0
38 stars 5 forks source link

Get an error trying to create a bhyve branded zone #36

Closed bhechinger closed 4 years ago

bhechinger commented 4 years ago
wonko@basket:~/lx_images$ pfexec zcage create --debug --brand bhyve --net "k3os0|10.52.100.10/24|10.52.100.1" --cpu 4 --ram 8gb  --alias k3os0 --disk tank/k3os0 --autoboot true
CreateOptions  {
    "_unknown": [
        "true"
    ],
    "brand": "bhyve",
    "ram": "8gb",
    "quota": "10G",
    "debug": true,
    "net": [
        "k3os0|10.52.100.10/24|10.52.100.1"
    ],
    "cpu": "4",
    "alias": "k3os0",
    "disk": "tank/k3os0",
    "autoboot": true
}
return rc =  true
[ 'k3os0|10.52.100.10/24|10.52.100.1' ]
network is  [ { physical: 'k3os0',
    address: '10.52.100.10',
    netmask: '255.255.255.0',
    gateway: '10.52.100.1' } ]
addrctl for undefined {
    "_unknown": [
        "true"
    ],
    "brand": "bhyve",
    "ram": "8gb",
    "quota": "10G",
    "debug": true,
    "net": [
        {
            "physical": "k3os0",
            "address": "10.52.100.10",
            "netmask": "255.255.255.0",
            "gateway": "10.52.100.1"
        }
    ],
    "cpu": "4",
    "disk": "tank/k3os0",
    "autoboot": true,
    "zonepath": "/zcage/vms/k3os0",
    "alias": "k3os0"
}
rctl object {
    "quota": "10G",
    "autoboot": true,
    "vm_ram": "8G"
}
vm data {
    "ram": "8gb",
    "vcpus": "4",
    "disk": "tank/k3os0",
    "bootdisk": "tank/k3os0"
}
createOptions:  {
    "_unknown": [
        "true"
    ],
    "brand": "bhyve",
    "debug": true,
    "net": [
        {
            "physical": "k3os0",
            "address": "10.52.100.10",
            "netmask": "255.255.255.0",
            "gateway": "10.52.100.1"
        }
    ],
    "autoboot": true,
    "zonepath": "/zcage/vms/k3os0",
    "alias": "k3os0",
    "rctl": {
        "quota": "10G",
        "autoboot": true,
        "vm_ram": "8G"
    },
    "vm_metadata": {
        "ram": "8gb",
        "vcpus": "4",
        "disk": "tank/k3os0",
        "bootdisk": "tank/k3os0"
    }
}
spec {
    "zonepath": "/zcage/vms/k3os0",
    "brand": "bhyve",
    "ip-type": "exclusive",
    "dns-domain": "",
    "resolvers": [
        "8.8.8.8",
        "8.8.8.4"
    ],
    "autoboot": true,
    "_unknown": [
        "true"
    ],
    "debug": true,
    "net": [
        {
            "physical": "k3os0",
            "address": "10.52.100.10",
            "netmask": "255.255.255.0",
            "gateway": "10.52.100.1"
        }
    ],
    "alias": "k3os0",
    "rctl": {
        "quota": "10G",
        "autoboot": true,
        "vm_ram": "8G"
    },
    "vm_metadata": {
        "acpi": "on",
        "netif": "virtio-net-viona",
        "type": "generic",
        "vcpus": "4",
        "ram": "8gb",
        "bootrom": "BHYVE_RELEASE_CSM",
        "hostbridge": "intel",
        "vnc": "unix=/tmp/bd5f9856-6e45-41db-8480-343694779432.vnc",
        "disk": "tank/k3os0",
        "bootdisk": "tank/k3os0"
    }
}
VM {
    "acpi": "on",
    "netif": "virtio-net-viona",
    "type": "generic",
    "vcpus": "4",
    "ram": "8gb",
    "bootrom": "BHYVE_RELEASE_CSM",
    "hostbridge": "intel",
    "vnc": "unix=/tmp/bd5f9856-6e45-41db-8480-343694779432.vnc",
    "disk": "tank/k3os0",
    "bootdisk": "tank/k3os0"
}
spec2script [ 'create',
  ' set zonepath=/zcage/vms/k3os0',
  ' set brand=bhyve',
  ' set ip-type=exclusive',
  'add attr',
  'set name=resolvers',
  'set type=string',
  'set value=8.8.8.8,8.8.8.4',
  'end',
  ' set autoboot=true',
  ' set _unknown=true',
  ' add net ',
  'set physical=k3os0',
  'set allowed-address=10.52.100.10/24',
  '',
  'set defrouter=10.52.100.1',
  ' end',
  'add attr',
  ' set name=quota',
  'set type=string',
  ' set value=10G',
  'end',
  'add attr',
  ' set type=string',
  'set name=vcpus',
  ' set value="4" ',
  'end',
  'add attr',
  ' set type=string',
  'set name=ram',
  ' set value="8gb" ',
  'end',
  'add attr',
  ' set type=string',
  'set name=bootrom',
  ' set value="BHYVE_RELEASE_CSM" ',
  'end',
  'add attr',
  ' set type=string',
  'set name=hostbridge',
  ' set value="intel" ',
  'end',
  'add attr',
  ' set type=string',
  'set name=vnc',
  ' set value="unix=/tmp/bd5f9856-6e45-41db-8480-343694779432.vnc" ',
  'end',
  'add attr',
  ' set type=string',
  'set name=vnc-port',
  'set value=5958',
  'end',
  '',
  'add device',
  ' set match=/dev/zvol/rdsk/tank/k3os0 ',
  ' end',
  'add attr',
  ' set type=string',
  'set name=bootdisk',
  ' set value="tank/k3os0" ',
  'end',
  '',
  'verify',
  ' commit',
  '' ]
zone_spec: {
    "zonepath": "/zcage/vms/k3os0",
    "brand": "bhyve",
    "ip-type": "exclusive",
    "dns-domain": "",
    "resolvers": [
        "8.8.8.8",
        "8.8.8.4"
    ],
    "autoboot": true,
    "_unknown": [
        "true"
    ],
    "debug": true,
    "net": [
        {
            "physical": "k3os0",
            "address": "10.52.100.10",
            "netmask": "255.255.255.0",
            "gateway": "10.52.100.1"
        }
    ],
    "alias": "k3os0",
    "rctl": {
        "quota": "10G",
        "autoboot": true,
        "vm_ram": "8G"
    },
    "vm_metadata": {
        "acpi": "on",
        "netif": "virtio-net-viona",
        "type": "generic",
        "vcpus": "4",
        "ram": "8gb",
        "bootrom": "BHYVE_RELEASE_CSM",
        "hostbridge": "intel",
        "vnc": "unix=/tmp/bd5f9856-6e45-41db-8480-343694779432.vnc",
        "disk": "tank/k3os0",
        "bootdisk": "tank/k3os0"
    }
}
spec2script: create; set zonepath=/zcage/vms/k3os0; set brand=bhyve; set ip-type=exclusive;add attr;set name=resolvers;set type=string;set value=8.8.8.8,8.8.8.4;end; set autoboot=true; set _unknown=true; add net ;set physical=k3os0;set allowed-address=10.52.100.10/24;;set defrouter=10.52.100.1; end;add attr; set name=quota;set type=string; set value=10G;end;add attr; set type=string;set name=vcpus; set value="4" ;end;add attr; set type=string;set name=ram; set value="8gb" ;end;add attr; set type=string;set name=bootrom; set value="BHYVE_RELEASE_CSM" ;end;add attr; set type=string;set name=hostbridge; set value="intel" ;end;add attr; set type=string;set name=vnc; set value="unix=/tmp/bd5f9856-6e45-41db-8480-343694779432.vnc" ;end;add attr; set type=string;set name=vnc-port;set value=5958;end;;add device; set match=/dev/zvol/rdsk/tank/k3os0 ; end;add attr; set type=string;set name=bootdisk; set value="tank/k3os0" ;end;;verify; commit;
configuring zone  syntax error at '='
Commands:

add <resource-type>
    (global scope)
add <property-name> <property-value>
    (resource scope)
cancel
clear <property-name>
commit
create [-F] [ -a <path> | -b | -t <template> ]
delete [-F]
end
exit [-F]
export [-f output-file]
help [commands] [syntax] [usage] [<command-name>]
info [<resource-type> [property-name=property-value]*]
remove [-F] <resource-type> [ <property-name>=<property-value> ]*
    (global scope)
remove <property-name> <property-value>
    (resource scope)
revert [-F]
select <resource-type> { <property-name>=<property-value> }
set <property-name>=<property-value>
verify
Assertion failed: num_unclaimed_tokens == 0, file zonecfg_lex.l, line 435

installing  k3os0
Error installing  zoneadm: k3os0: No such zone configured

Error: Installing zone k3os0
Failed creating zone:  k3os0
cneira commented 4 years ago

@bhechinger there is an issue with --autoboot flag, I'll need to take a look at that. As we spoke it works omitting that flag.

cneira commented 4 years ago

@bhechinger now it should work, my apologies for the inconvenience, something must have changed in firmware releases.