Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to create zones #2

Closed
stratacast opened this issue Nov 11, 2018 · 10 comments

Comments

@stratacast
Copy link

@stratacast stratacast commented Nov 11, 2018

Currently whenever I try to create any zone (standard, lx-brand, bhyve) I get a failed to create error. Here is the debug output:

cf8dd9d --alias lxvm --brand lx
CreateOptions  {
    "brand": "lx",
    "ram": "2gb",
    "debug": true,
    "net": "lx0|192.168.10.56/26|192.168.10.1",
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "alias": "lxvm"
}
network is  [ { physical: 'lx0',
    address: '192.168.10.56',
    netmask: '255.255.255.192',
    gateway: '192.168.10.1' } ]
{
    "brand": "lx",
    "ram": "2gb",
    "debug": true,
    "net": [
        {
            "physical": "lx0",
            "address": "192.168.10.56",
            "netmask": "255.255.255.192",
            "gateway": "192.168.10.1"
        }
    ],
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "zonepath": "/zcage/vms/lxvm",
    "alias": "lxvm"
}
rctl object {
    "max-physical-memory": "2147483648",
    "max-locked-memory": "2147483648",
    "max-swap": "4294967296",
    "cpu-shares": "4096",
    "max-lwps": "3000"
}
spec {
    "zonepath": "/zcage/vms/lxvm",
    "brand": "lx",
    "ip-type": "exclusive",
    "dns-domain": "",
    "resolvers": [
        "8.8.8.8",
        "8.8.8.4"
    ],
    "autoboot": false,
    "debug": true,
    "net": [
        {
            "physical": "lx0",
            "address": "192.168.10.56",
            "netmask": "255.255.255.192",
            "gateway": "192.168.10.1"
        }
    ],
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "alias": "lxvm",
    "rctl": {
        "max-physical-memory": "2147483648",
        "max-locked-memory": "2147483648",
        "max-swap": "4294967296",
        "cpu-shares": "4096",
        "max-lwps": "3000"
    }
}
bhyve undefined
spec2script [ 'create',
  'add attr',
  'set name=kernel-version',
  'set type=string',
  'set value=3.16.0',
  'end',
  ' set zonepath=/zcage/vms/lxvm',
  ' set brand=lx',
  ' 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=false',
  ' set debug=true',
  ' add net ',
  'add property (name=gateway,value="192.168.10.1")',
  'add property (name=netmask,value="255.255.255.192")',
  'add property (name=ips,value="192.168.10.56")',
  'add property (name=primary,value="true")',
  ' set physical=lx0',
  ' end',
  'add rctl',
  'set name=zone.max-physical-memory',
  'add value (priv=privileged,limit=2147483648,action=deny)',
  'end',
  ' add rctl',
  'set name=zone.max-locked-memory',
  'add value (priv=privileged,limit=2147483648,action=deny)',
  'end',
  ' add rctl',
  'set name=zone.max-swap',
  'add value (priv=privileged,limit=4294967296,action=deny)',
  'end',
  ' add rctl',
  'set name=zone.cpu-shares',
  'add value (priv=privileged, limit=4096,action=none)',
  'end',
  'add rctl',
  'set name=zone.max-lwps',
  'add value (priv=privileged,limit=3000,action=deny)',
  'end',
  ' ',
  'verify',
  ' commit',
  '' ]
zone_spec: {
    "zonepath": "/zcage/vms/lxvm",
    "brand": "lx",
    "ip-type": "exclusive",
    "dns-domain": "",
    "resolvers": [
        "8.8.8.8",
        "8.8.8.4"
    ],
    "autoboot": false,
    "debug": true,
    "net": [
        {
            "physical": "lx0",
            "address": "192.168.10.56",
            "netmask": "255.255.255.192",
            "gateway": "192.168.10.1"
        }
    ],
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "alias": "lxvm",
    "rctl": {
        "max-physical-memory": "2147483648",
        "max-locked-memory": "2147483648",
        "max-swap": "4294967296",
        "cpu-shares": "4096",
        "max-lwps": "3000"
    }
}
spec2script: create;add attr;set name=kernel-version;set type=string;set value=3.16.0;end; set zonepath=/zcage/vms/lxvm; set brand=lx; 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=false; set debug=true; add net ;add property (name=gateway,value="192.168.10.1");add property (name=netmask,value="255.255.255.192");add property (name=ips,value="192.168.10.56");add property (name=primary,value="true"); set physical=lx0; end;add rctl;set name=zone.max-physical-memory;add value (priv=privileged,limit=2147483648,action=deny);end; add rctl;set name=zone.max-locked-memory;add value (priv=privileged,limit=2147483648,action=deny);end; add rctl;set name=zone.max-swap;add value (priv=privileged,limit=4294967296,action=deny);end; add rctl;set name=zone.cpu-shares;add value (priv=privileged, limit=4096,action=none);end;add rctl;set name=zone.max-lwps;add value (priv=privileged,limit=3000,action=deny);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 returned  zoneadm: lxvm: No such zone configured
 
Error: Installing zone lxvm
Failed creating VM :  lxvm

I'm a day 1 Illumos-anything user so I'll try my best to help, but I'm guessing there is something wrong in the spec2script section.

I'm using the latest version built from source. The version number shows 1.3.5 despite that.

OmniOS version - omnios-r151028-d3d0427bff

@priyadarshan

This comment has been minimized.

Copy link

@priyadarshan priyadarshan commented Nov 11, 2018

I have the exact same symptoms, on same OmniOS version.

@priyadarshan

This comment has been minimized.

Copy link

@priyadarshan priyadarshan commented Nov 12, 2018

Could it be something to do with OmniOS r151028?

I tried following again the OmniOS Wiki page, which used to work fine, but this time I get error

$ zoneadm -z base install
Sanity Check: Looking for 'entire' incorporation.
ERROR: Unable to locate the incorporation 'entire@11-151028.0:20181102T192919Z' in the preferred publisher 'extra.omnios'.
Use -P to supply a publisher which contains this package.

Still the package is available,

$ pkg list -av entire
FMRI                                                                         IFO
pkg://omnios/entire@11-151028.0:20181102T192919Z                             i--
@stratacast

This comment has been minimized.

Copy link
Author

@stratacast stratacast commented Nov 13, 2018

I'm able to at least get a zone to install currently. I'm testing out bhyve right now...I think my not getting that working manually is my lack of experience. Essentially it all appears to install. Though it seems that despite choosing a bhyve branded zone, it appears to do a sparse zone. I say that because bhyve uses img files IIRC and I'm seeing a FS layout in a root dir. But that aside, I'm not getting that sort of error. I'll have to try a standard zone and an lx-branded zone to see if I get your error

@cneira

This comment has been minimized.

Copy link
Owner

@cneira cneira commented Nov 21, 2018

Hi @stratacast , I'm sorry somehow I miss the email notification for this issue. Could you try on latest zcage and let me know?. Are you installing from source or npm?. Latest changes are only in this repo I'll try to update the npm package today.
Also could you paste your options when trying to create the zone ?

Currently whenever I try to create any zone (standard, lx-brand, bhyve) I get a failed to create error. Here is the debug output:

cf8dd9d --alias lxvm --brand lx
CreateOptions  {
    "brand": "lx",
    "ram": "2gb",
    "debug": true,
    "net": "lx0|192.168.10.56/26|192.168.10.1",
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "alias": "lxvm"
}
network is  [ { physical: 'lx0',
    address: '192.168.10.56',
    netmask: '255.255.255.192',
    gateway: '192.168.10.1' } ]
{
    "brand": "lx",
    "ram": "2gb",
    "debug": true,
    "net": [
        {
            "physical": "lx0",
            "address": "192.168.10.56",
            "netmask": "255.255.255.192",
            "gateway": "192.168.10.1"
        }
    ],
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "zonepath": "/zcage/vms/lxvm",
    "alias": "lxvm"
}
rctl object {
    "max-physical-memory": "2147483648",
    "max-locked-memory": "2147483648",
    "max-swap": "4294967296",
    "cpu-shares": "4096",
    "max-lwps": "3000"
}
spec {
    "zonepath": "/zcage/vms/lxvm",
    "brand": "lx",
    "ip-type": "exclusive",
    "dns-domain": "",
    "resolvers": [
        "8.8.8.8",
        "8.8.8.4"
    ],
    "autoboot": false,
    "debug": true,
    "net": [
        {
            "physical": "lx0",
            "address": "192.168.10.56",
            "netmask": "255.255.255.192",
            "gateway": "192.168.10.1"
        }
    ],
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "alias": "lxvm",
    "rctl": {
        "max-physical-memory": "2147483648",
        "max-locked-memory": "2147483648",
        "max-swap": "4294967296",
        "cpu-shares": "4096",
        "max-lwps": "3000"
    }
}
bhyve undefined
spec2script [ 'create',
  'add attr',
  'set name=kernel-version',
  'set type=string',
  'set value=3.16.0',
  'end',
  ' set zonepath=/zcage/vms/lxvm',
  ' set brand=lx',
  ' 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=false',
  ' set debug=true',
  ' add net ',
  'add property (name=gateway,value="192.168.10.1")',
  'add property (name=netmask,value="255.255.255.192")',
  'add property (name=ips,value="192.168.10.56")',
  'add property (name=primary,value="true")',
  ' set physical=lx0',
  ' end',
  'add rctl',
  'set name=zone.max-physical-memory',
  'add value (priv=privileged,limit=2147483648,action=deny)',
  'end',
  ' add rctl',
  'set name=zone.max-locked-memory',
  'add value (priv=privileged,limit=2147483648,action=deny)',
  'end',
  ' add rctl',
  'set name=zone.max-swap',
  'add value (priv=privileged,limit=4294967296,action=deny)',
  'end',
  ' add rctl',
  'set name=zone.cpu-shares',
  'add value (priv=privileged, limit=4096,action=none)',
  'end',
  'add rctl',
  'set name=zone.max-lwps',
  'add value (priv=privileged,limit=3000,action=deny)',
  'end',
  ' ',
  'verify',
  ' commit',
  '' ]
zone_spec: {
    "zonepath": "/zcage/vms/lxvm",
    "brand": "lx",
    "ip-type": "exclusive",
    "dns-domain": "",
    "resolvers": [
        "8.8.8.8",
        "8.8.8.4"
    ],
    "autoboot": false,
    "debug": true,
    "net": [
        {
            "physical": "lx0",
            "address": "192.168.10.56",
            "netmask": "255.255.255.192",
            "gateway": "192.168.10.1"
        }
    ],
    "with-image": "63d6e664-3f1f-11e8-aef6-a3120cf8dd9d",
    "alias": "lxvm",
    "rctl": {
        "max-physical-memory": "2147483648",
        "max-locked-memory": "2147483648",
        "max-swap": "4294967296",
        "cpu-shares": "4096",
        "max-lwps": "3000"
    }
}
spec2script: create;add attr;set name=kernel-version;set type=string;set value=3.16.0;end; set zonepath=/zcage/vms/lxvm; set brand=lx; 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=false; set debug=true; add net ;add property (name=gateway,value="192.168.10.1");add property (name=netmask,value="255.255.255.192");add property (name=ips,value="192.168.10.56");add property (name=primary,value="true"); set physical=lx0; end;add rctl;set name=zone.max-physical-memory;add value (priv=privileged,limit=2147483648,action=deny);end; add rctl;set name=zone.max-locked-memory;add value (priv=privileged,limit=2147483648,action=deny);end; add rctl;set name=zone.max-swap;add value (priv=privileged,limit=4294967296,action=deny);end; add rctl;set name=zone.cpu-shares;add value (priv=privileged, limit=4096,action=none);end;add rctl;set name=zone.max-lwps;add value (priv=privileged,limit=3000,action=deny);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 returned  zoneadm: lxvm: No such zone configured
 
Error: Installing zone lxvm
Failed creating VM :  lxvm

I'm a day 1 Illumos-anything user so I'll try my best to help, but I'm guessing there is something wrong in the spec2script section.

I'm using the latest version built from source. The version number shows 1.3.5 despite that.

OmniOS version - omnios-r151028-d3d0427bff

@stratacast

This comment has been minimized.

Copy link
Author

@stratacast stratacast commented Nov 28, 2018

Hey! I end up not seeing email notifications well from github either hehe. I'll get to you on this, I think I will be able to try the new zcage tomorrow. I tried both from source and npm when testing when I posted this issue

@cneira

This comment has been minimized.

Copy link
Owner

@cneira cneira commented Nov 29, 2018

@stratacast

This comment has been minimized.

Copy link
Author

@stratacast stratacast commented Dec 6, 2018

Okay I was able to get my testing done, finally got an open evening. Creating sparse and lx branded zones work great, but I can't create bhyve zones. I get this when I run the command

omni@omniosce:~$ /usr/bin/pfexec zcage create --net "bhzone0|192.168.10.58/26|192.168.10.1" --ram 1gb --alias netbsd8 --disk=rpool/bhyve/netbsd8            
Error: Installing zone netbsd8
Failed creating VM :  netbsd8

bhyve is installed, the zone brand for bhyve is installed, and I followed your instructions in your docs.

I built straight from git. Version still shows 1.3.5 but when I build with npm it shows 1.3.7

@cneira

This comment has been minimized.

Copy link
Owner

@cneira cneira commented Dec 7, 2018

Hi @stratacast ,
I just found the problem, actually, there were 2.

  • I have updated the documentation I missed the --brand flag on the bhyve example.
  • The other was fixed by the latest pull request

It should work now. thanks for the patience.

zcage create --net "bhzone0|192.168.10.58/26|192.168.10.1" --ram 1gb --alias netbsd8 --disk=rpool/bhyve/netbsd8

@stratacast

This comment has been minimized.

Copy link
Author

@stratacast stratacast commented Dec 7, 2018

It all works like a charm! Thank you! Is there a package needed to boot operating systems with grub? I know in FreeBSD there's a bhyve-grub sort of package, not sure if that's already included in the zone packages or what, with NetBSD and Ubuntu 18.04 I end up at a shell> prompt

@cneira

This comment has been minimized.

Copy link
Owner

@cneira cneira commented Dec 7, 2018

you need to enter bhyve's boot manager and search for the correct EFI file.
https://redmine.ixsystems.com/issues/25459

@cneira cneira closed this Dec 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.