Closed bhechinger closed 4 years ago
@bhechinger I'll take a look.
@bhechinger I just tested and is working on my side :
eirac@dazzler:~/zcage$ ./zcage list
UUID TYPE STATE RAM ALIAS CREATED
d1e4d266-da1f-6f02-e2e7-cbb9a4a3f45e LX running 1024M nexus3
neirac@dazzler:~/zcage$ zlogin nexus3
zlogin: You lack sufficient privilege to run this command (all privs required)
neirac@dazzler:~/zcage$ pfexec zlogin nexus3
[Connected to zone 'nexus3' pts/3]
Last login: Wed Dec 4 10:29:45 from zone:global
[root@nexus3 ~]#
Try running with debug
$ zcage create --debug --net "nexus3|10.42.2.25/24|10.42.2.252" --docker sonatype/nexus3 latest --alias nexus3 --brand lx
Here is the output with debugging:
wonko@basket:~/lx_images$ zcage create --debug --net "nexus3|10.42.2.25/24|10.42.2.252" --docker sonatype/nexus3 latest --alias nexus3 --brand lx
CreateOptions {
"brand": "lx",
"ram": "1gb",
"quota": "10G",
"debug": true,
"net": [
"nexus3|10.42.2.25/24|10.42.2.252"
],
"docker": [
"sonatype/nexus3",
"latest"
],
"alias": "nexus3"
}
return rc = true
[ 'nexus3|10.42.2.25/24|10.42.2.252' ]
network is [ { physical: 'nexus3',
address: '10.42.2.25',
netmask: '255.255.255.0',
gateway: '10.42.2.252' } ]
addrctl for undefined {
"brand": "lx",
"ram": "1gb",
"quota": "10G",
"debug": true,
"net": [
{
"physical": "nexus3",
"address": "10.42.2.25",
"netmask": "255.255.255.0",
"gateway": "10.42.2.252"
}
],
"docker": [
"sonatype/nexus3",
"latest"
],
"zonepath": "/zcage/vms/nexus3",
"alias": "nexus3"
}
rctl object {
"max-physical-memory": "1073741824",
"max-locked-memory": "1073741824",
"max-swap": "2147483648",
"cpu-shares": "2048",
"max-lwps": "3000",
"quota": "10G"
}
createOptions: {
"brand": "lx",
"debug": true,
"net": [
{
"physical": "nexus3",
"address": "10.42.2.25",
"netmask": "255.255.255.0",
"gateway": "10.42.2.252"
}
],
"docker": [
"sonatype/nexus3",
"latest"
],
"zonepath": "/zcage/vms/nexus3",
"alias": "nexus3",
"rctl": {
"max-physical-memory": "1073741824",
"max-locked-memory": "1073741824",
"max-swap": "2147483648",
"cpu-shares": "2048",
"max-lwps": "3000",
"quota": "10G"
}
}
spec {
"zonepath": "/zcage/vms/nexus3",
"brand": "lx",
"ip-type": "exclusive",
"dns-domain": "",
"resolvers": [
"8.8.8.8",
"8.8.8.4"
],
"autoboot": false,
"debug": true,
"net": [
{
"physical": "nexus3",
"address": "10.42.2.25",
"netmask": "255.255.255.0",
"gateway": "10.42.2.252"
}
],
"docker": [
"sonatype/nexus3",
"latest"
],
"alias": "nexus3",
"rctl": {
"max-physical-memory": "1073741824",
"max-locked-memory": "1073741824",
"max-swap": "2147483648",
"cpu-shares": "2048",
"max-lwps": "3000",
"quota": "10G"
}
}
VM undefined
spec2script [ 'create',
'add attr',
'set name=kernel-version',
'set type=string',
'set value=3.16.0',
'end',
' set zonepath=/zcage/vms/nexus3',
' 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',
' add net ',
'set physical=nexus3',
'set allowed-address=10.42.2.25/24',
'',
'set defrouter=10.42.2.252',
' end',
'add rctl',
'set name=zone.max-physical-memory',
'add value (priv=privileged,limit=1073741824,action=deny)',
'end',
' add rctl',
'set name=zone.max-locked-memory',
'add value (priv=privileged,limit=1073741824,action=deny)',
'end',
' add rctl',
'set name=zone.max-swap',
'add value (priv=privileged,limit=2147483648,action=deny)',
'end',
' set cpu-shares=2048',
'add rctl',
'set name=zone.max-lwps',
'add value (priv=privileged,limit=3000,action=deny)',
'end',
' add attr',
' set name=quota',
'set type=string',
' set value=10G',
'end',
'',
'verify',
' commit',
'' ]
zone_spec: {
"zonepath": "/zcage/vms/nexus3",
"brand": "lx",
"ip-type": "exclusive",
"dns-domain": "",
"resolvers": [
"8.8.8.8",
"8.8.8.4"
],
"autoboot": false,
"debug": true,
"net": [
{
"physical": "nexus3",
"address": "10.42.2.25",
"netmask": "255.255.255.0",
"gateway": "10.42.2.252"
}
],
"docker": [
"sonatype/nexus3",
"latest"
],
"alias": "nexus3",
"rctl": {
"max-physical-memory": "1073741824",
"max-locked-memory": "1073741824",
"max-swap": "2147483648",
"cpu-shares": "2048",
"max-lwps": "3000",
"quota": "10G"
}
}
spec2script: create;add attr;set name=kernel-version;set type=string;set value=3.16.0;end; set zonepath=/zcage/vms/nexus3; 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; add net ;set physical=nexus3;set allowed-address=10.42.2.25/24;;set defrouter=10.42.2.252; end;add rctl;set name=zone.max-physical-memory;add value (priv=privileged,limit=1073741824,action=deny);end; add rctl;set name=zone.max-locked-memory;add value (priv=privileged,limit=1073741824,action=deny);end; add rctl;set name=zone.max-swap;add value (priv=privileged,limit=2147483648,action=deny);end; set cpu-shares=2048;add rctl;set name=zone.max-lwps;add value (priv=privileged,limit=3000,action=deny);end; add attr; set name=quota;set type=string; set value=10G;end;;verify; commit;
configuring zone
docker tags installing [ 'sonatype/nexus3', 'latest' ]
docker image pulled: /zcage/images/docker-nexus3-latest-6f5541a1-5751-695a-a3cc-986aa71bf283.gz
zoneadm: install returned A ZFS file system has been created for this zone.
Setting quota=10G on dataset tank/zcage/vms/nexus3
setting zfs quota
Adding metadata: add attr; set type=string;set name=CreatedAt;set value=2019-12-04T17:55:45.830Z;end;verify;commit
Adding metadata: add attr; set type=string;set name=UpdatedAt;set value=2019-12-04T17:55:45.928Z;end;verify;commit
nexus3 created [OK]
nexus3 started [OK]
starting zone
But I get nothing on the console:
wonko@basket:~/lx_images$ pfexec zlogin nexus3
[Connected to zone 'nexus3' pts/4]
login: timed out after 60 seconds
[Connection to zone 'nexus3' pts/4 closed]
wonko@basket:$ uname -a
SunOS basket 5.11 omnios-r151032-702376803e i86pc i386 i86pc illumos
In case this ends up being version specific.
@bhechinger Is 10.42.2.252 your gateway? I'm unable to reproduce your issue.
Yes it is.
@bhechinger
Have you tried this again? could you pull master I just tried using your exact arguments and I'm able to login into the zone.
Ok, it works now. You must have tweaked something along the way. Woo!
Running this command:
zcage create --net "nexus3|10.42.2.25/24|10.42.2.252" --docker sonatype/nexus3 latest --alias nexus3 --brand lx
Creates a zone that doesn't completely start. It very quickly gets to that last part and then it hangs.