-
Notifications
You must be signed in to change notification settings - Fork 16
/
iocell.8
2162 lines (1872 loc) · 51.4 KB
/
iocell.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.\" Text automatically generated by txt2man
.TH iocell 8 "16 February 2024" "" "FreeBSD System Manager's Manual"
.SH NAME
\fBiocell \fP- jail manager amalgamating ZFS, VNET and resource limits
\fB
.SH SYNOPSIS
.nf
.fam C
\fBiocell\fP [\fB-v\fP] \fIactivate\fP \fIZPOOL\fP
\fBiocell\fP [\fB-v\fP] \fIcap\fP UUID|TAG
\fBiocell\fP [\fB-v\fP] \fIclean\fP [\fB-f\fP] [\fB-a\fP|\fB-r\fP|\fB-j\fP|\fB-t\fP]
\fBiocell\fP [\fB-v\fP] \fIclone\fP UUID|TAG [UUID|TAG@snapshot] [\fIproperty=value\fP]
\fBiocell\fP [\fB-v\fP] \fIconsole\fP [\fB-f\fP] UUID|TAG
\fBiocell\fP [\fB-v\fP] \fIcreate\fP [\fB-e\fP] [release=[RELEASE|NAME]] [\fIpkglist=file\fP] [\fIproperty=value\fP] [\fIcount=value\fP]
\fBiocell\fP [\fB-v\fP] \fIdeactivate\fP \fIZPOOL\fP
\fBiocell\fP [\fB-v\fP] \fIdefaults\fP
\fBiocell\fP [\fB-v\fP] \fIdestroy\fP [\fB-f\fP] UUID|TAG
\fBiocell\fP [\fB-v\fP] \fIdf\fP
\fBiocell\fP [\fB-v\fP] \fIexec\fP [\fB-u\fP \fIusername\fP | \fB-U\fP \fIusername\fP] UUID|TAG|ALL \fIcommand\fP [\fIarg\fP \.\.\.]
\fBiocell\fP [\fB-v\fP] \fIexport\fP UUID|TAG
\fBiocell\fP [\fB-v\fP] \fIfetch\fP [\fB-p\fP|\fB-P\fP] [\fIrelease=RELEASE\fP | ftphost=ftp.hostname.org |
ftpdir=/dir/ | ftpfiles="base.txz lib32.txz src.txz"]
[ ftplocaldir=/dir/ ] [ \fIcompression=ALGO\fP ]
\fBiocell\fP [\fB-v\fP] \fIget\fP [\fB-r\fP] property|all UUID|TAG
\fBiocell\fP [\fB-v\fP] \fIhelp\fP
\fBiocell\fP [\fB-v\fP] \fIimport\fP \fIUUID\fP [\fIproperty=value\fP]
\fBiocell\fP [\fB-v\fP] \fIinit-host\fP \fIIP\fP \fIZPOOL\fP
\fBiocell\fP [\fB-v\fP] \fIinuse\fP \fIUUID\fP|TAG
\fBiocell\fP [\fB-v\fP] \fIpkg\fP \fITAG\fP \fIpkg_cmd\fP
\fBiocell\fP [\fB-v\fP] \fIlimits\fP [\fIUUID\fP|\fITAG\fP]
\fBiocell\fP [\fB-v\fP] \fIlist\fP [\fB-t\fP|\fB-r\fP|\fB-s\fP jid|uuid|boot|state|tag|type|ip4]
\fBiocell\fP [\fB-v\fP] \fIpromote\fP \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIrcboot\fP
\fBiocell\fP [\fB-v\fP] reboot|restart [\fB-s\fP] \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIrcshutdown\fP
\fBiocell\fP [\fB-v\fP] \fIreset\fP \fIUUID\fP|\fITAG\fP|ALL
\fBiocell\fP [\fB-v\fP] \fIrollback\fP \fIUUID\fP|\fITAG\fP@snapshotname
\fBiocell\fP [\fB-v\fP] \fIruntime\fP \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIsend\fP [\fB-c\fP|\fB-i\fP|\fB-I\fP|\fB-h\fP|\fB-u\fP|\fB-m\fP] \fIPOOL\fP
\fBiocell\fP [\fB-v\fP] \fIset\fP \fIproperty=value\fP [\fIproperty=value\fP] \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIsnaplist\fP \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIsnapmount\fP \fIUUID\fP|\fITAG\fP@snapshotname \fIDESTINATION\fP
\fBiocell\fP [\fB-v\fP] \fIsnapremove\fP \fIUUID\fP|\fITAG\fP@snapshotname|ALL
\fBiocell\fP [\fB-v\fP] snapshot|snap [\fB-f\fP|\fB-r\fP] \fIUUID\fP|\fITAG\fP [\fIUUID\fP|\fITAG\fP@snapshotname]
\fBiocell\fP [\fB-v\fP] \fIsnapumount\fP \fIUUID\fP|\fITAG\fP@snapshotname
\fBiocell\fP [\fB-v\fP] \fIstart\fP [\fB-f\fP] \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIstop\fP \fIUUID\fP|\fITAG\fP|ALL
\fBiocell\fP [\fB-v\fP] \fIuncap\fP \fIUUID\fP|\fITAG\fP
\fBiocell\fP [\fB-v\fP] \fIupdate\fP [\fB-p\fP|\fB-P\fP] \fIUUID\fP|\fITAG\fP|RELEASE
\fBiocell\fP [\fB-v\fP] \fIupgrade\fP \fIUUID\fP|\fITAG\fP [\fIrelease=RELEASE\fP]
\fBiocell\fP [\fB-v\fP] \fIversion\fP | --\fIversion\fP
.fam T
.fi
.fam T
.fi
.SH DESCRIPTION
\fBiocell\fP is a system administration tool for jails designed to simplify
jail management tasks. It abstracts away the management of ZFS backed jails
running VNET or shared \fIIP\fP networking with optional support for resource
\fIlimits\fP.
.PP
Both, shared \fIIP\fP based jails and VNET enabled jails are supported.
.PP
Each jail has a unique ID (\fIUUID\fP) automatically generated at creation time.
Using the \fIUUID\fP as a jail identifier means that a jail can be replicated in a
distributed environment with greater flexibility. This also eliminates
potential naming clashes on large scale deployments and helps reduce
operator error.
.PP
You can use either the full \fIUUID\fP or a jail's \fITAG\fP with every operation.
.PP
To ease jail identification a \fITAG\fP field is included in \fIlist\fP mode which can
be \fIset\fP to any string (hostname, label, note, etc.). By default if unset the
\fITAG\fP field contains the creation date and time stamp.
.PP
Properties are stored inside ZFS custom fields. This eliminates the need for
any configuration files and jails can be easily moved with ZFS \fIsend\fP and
receive preserving all of their properties automatically.
.PP
\fBiocell\fP relies on ZFS and at least one ZFS pool must be present on the host
system. To enable all the features \fBiocell\fP supports, consider the following
optional kernel options and system requirements:
.RS
.TP
.B
o
FreeBSD 13.2-RELEASE amd64 or higher
.TP
.B
o
Kernel compiled with:
.PP
.nf
.fam C
options VIMAGE
options RACCT
options RCTL
.fam T
.fi
.RE
Calling \fBiocell\fP with the \fB-v\fP switch before a \fIcommand\fP will allow you to see the
how the shell is running each of the commands. It's very verbose.
.SH SUBCOMMANDS
\fIactivate\fP \fIZPOOL\fP
.PP
.nf
.fam C
Intended for automation tools. The pool can be activated for iocell jails
without requiring user input.
.fam T
.fi
\fIcap\fP \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Reapply resource limits on jail while it is running.
.fam T
.fi
\fIclean\fP [\fB-f\fP] [\fB-a\fP|\fB-r\fP|\fB-j\fP|\fB-t\fP]
.PP
.nf
.fam C
This removes the ZFS datasets associated with the flag called. The -a flag
will destroy everything associated with iocell. The -r flag will destroy
all RELEASEs that have been fetched. Basejails rely on these to exist,
so be sure you don't use this flag if you have any. The -j flag will
destroy the jails dataset. The -t flag will destroy the templates dataset.
Same warning applies here as with cleaning the RELEASE dataset.
.fam T
.fi
\fIclone\fP \fIUUID\fP|\fITAG\fP [\fIUUID\fP|\fITAG\fP@snapshot] [\fIproperty=value\fP]
.PP
.nf
.fam C
Clone jail identified by UUID (ZFS clone). All properties will be reset on
the clone, defaults can be overridden by specifying properties on the fly.
Custom point-in-time snapshots can be used as a source for cloning in the
form of UUID@snapshot or TAG@snapshot.
Examples:
Clone the current state of the jail:
iocell clone UUID tag=www02
Clone a jail from a custom snapshot (snapshot taken previously):
iocell clone UUID@snapshotname tag=www02
.fam T
.fi
\fIconsole\fP [\fB-f\fP] \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Execute login to have a shell inside the jail. If the -f flag is specified,
and the jail is not running it will be started for the console command.
.fam T
.fi
\fIcreate\fP [\fB-e\fP] [base=[RELEASE|NAME]] [\fIproperty=value\fP] [\fIproperty=value\fP] [\fIcount=value\fP]
.PP
.nf
.fam C
By default create will deploy a new jail based on the host operating
system's release. This can be changed by specifying the base option.
By default a basejail is created that has a common shared base.
The -e switch will create an empty jail which can be used for unsupported
or custom jails.
Example: iocell create tag=www01 pkglist=$HOME/my-pkgs.txt
iocell create tag=mybasejail
iocell create tag=mybasejail base=10.2-RELEASE
iocell create tag=mycustombasejail base=nginx_postgres
By default only one jail will be created, but if you specify count=NUMBER,
then that many jails will be created.
Example: iocell create tag="mybasejail" host_hostname="mybasejail" count=10
This will create 10 jails with the tag mybasejail_{1-10}. The tag and
hostname will be incremented up with the number of jails you wish to create.
.fam T
.fi
\fIdeactivate\fP \fIZPOOL\fP
.PP
.nf
.fam C
Remove the comment that iocell uses to locate a usable pool.
.fam T
.fi
\fIdefaults\fP
.PP
.nf
.fam C
Display all defaults set in the default dataset.
.fam T
.fi
\fIdestroy\fP [\fB-f\fP] \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Destroy given jail. This is irreversible, use with caution. If the jail is
running destroy action will fail.
With -f the jail will be destroyed without confirmation.
.fam T
.fi
\fIdf\fP
.PP
.nf
.fam C
List disk space related information. Available fields:
CRT - compression ratio
RES - reserved space
QTA - disk quota
USE - used space
AVA - available space
TAG - jail name
.fam T
.fi
\fIexec\fP [\fB-u\fP \fIusername\fP | \fB-U\fP \fIusername\fP] \fIUUID\fP|\fITAG\fP|ALL \fIcommand\fP [\fIarg\fP \.\.\.]
.PP
.nf
.fam C
Execute command inside the jail. This is simply an iocell UUID/tag wrapper
for jexec(8).
.fam T
.fi
\fIexport\fP \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Export a complete jail. An archive file is created in /iocell/images with
SHA256 checksum. Jail must be in stopped state before exporting.
.fam T
.fi
\fIfetch\fP [\fB-p\fP|\fB-P\fP] [\fIrelease=RELEASE\fP | ftphost=ftp.hostname.org |
ftpdir=/dir/ | ftpfiles="base.txz lib32.txz src.txz"]
[ ftplocaldir=/dir/ ] [ \fIcompression=ALGO\fP ]
.RS
.PP
Used for downloading and updating/patching releases.
.PP
\fIfetch\fP must be executed as the first \fIcommand\fP on a pristine system. By
default \fIfetch\fP will download the host node's RELEASE for deployment. If
other releases are required, this can be changed by supplying the
required release property or just selecting the appropriate RELEASE from
the menu \fIlist\fP.
.PP
Example: \fBiocell\fP \fIfetch\fP release=13.2-RELEASE
.PP
\fIfetch\fP can also used to \fIupdate\fP already downloaded releases. To \fIupdate\fP a local
release already present in \fBiocell\fP (\fBiocell\fP \fIlist\fP \fB-r\fP) run:
.PP
.nf
.fam C
iocell fetch release=13.2-RELEASE
.fam T
.fi
This example will apply latest patches to 13.2-RELEASE base.
Newly created jails or basejails will automatically have the latest
updates applied.
.PP
Specifying \fB-p\fP or \fB-P\fP to \fIfetch\fP will have it also \fIfetch\fP a ports tree
that all basejails will share with that base.
.PP
compression: Compression is lz4 by default; see \fBzfs\fP(8) for the \fIlist\fP of
compression algorithms available.
.PP
ftplocaldir: Specifying ftplocaldir=/dev/ will \fIfetch\fP release tar files from a
local system directory. This is useful when a user wants to use a custom build
release or use \fBiocell\fP offline.
.PP
Example: \fIfetch\fP release=13.2-RELEASE ftplocaldir=/fakeftp/release/13.2-RELEASE
.RE
.PP
\fIget\fP [\fB-r\fP] property|all \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Get named property or if "all" keyword is specified dump all properties
known to iocell.
To display whether resource limits are enforced for a jail:
iocell get rlimits UUID|TAG
iocell get -r rlimits
iocell get all UUID|TAG
.fam T
.fi
\fIhelp\fP
.PP
.nf
.fam C
This help file you are reading.
.fam T
.fi
\fIimport\fP \fIUUID\fP [\fIproperty=value\fP]
.PP
.nf
.fam C
Import full jail images or differential packages. Images need to be
present in /iocell/images along with checksum files. You can use short
UUIDs - do not specify the full filename only the UUID. These jails
become what we call "thickjails" and are not supported for all operations.
.fam T
.fi
\fIinit-host\fP \fIIP\fP \fIZPOOL\fP
.PP
.nf
.fam C
Initialize a remote host for iocell. iocell will send all required ZFS
filesystems over the network to the host. This requires SSH working keys
installed for root.
.fam T
.fi
\fIinuse\fP [\fIUUID\fP|\fITAG\fP]
.PP
.nf
.fam C
Display consumed resources for a jail. Without UUID or TAG dump all
resources for all running jails in a comma delimited form.
.fam T
.fi
\fIpkg\fP \fITAG\fP \fIpkg_cmd\fP
.PP
.nf
.fam C
A convinience wrapper for pkg to manage your jails. Converts the given tag
to the JID of a running jail and executes `pkg -j JID pkg_cmd`.
.fam T
.fi
\fIlimits\fP [\fIUUID\fP|\fITAG\fP]
.PP
.nf
.fam C
Display active resource limits for a jail or all jails. With no UUID
supplied display all limits active for all jails.
.fam T
.fi
\fIlist\fP [\fB-t\fP|\fB-r\fP]
.PP
.nf
.fam C
List all jails, if -t is specified list only templates,
with -r list downloaded releases.
Non iocell jails will be listed only if the jail is running.
.fam T
.fi
\fIpromote\fP \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Promote a cloned jail to a fully independent copy. For more details please
read zfs(8).
.fam T
.fi
\fIrcboot\fP
.PP
.nf
.fam C
Start all jails with "boot" property set to "on". Intended for boot time
execution. Jails will be started in an ordered fashion based on their
"priority" property.
.fam T
.fi
reboot \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Fully stops the jail with `iocell stop` and, upon success, restarts it with
`iocell start`. If `-s` is specified it will instead do a soft restart
on the jail. The soft method will restart the jail without destroying
the jail's networking or the jail process itself. All processes are
gracefully restarted inside the jail. This is useful for quick and graceful
restarts.
.fam T
.fi
\fIrcshutdown\fP
.PP
.nf
.fam C
Stop all jails with "boot" property set to "on". Intended for full host
shutdown.
Jails will be stopped in an ordered fashion based on their "priority"
property.
.fam T
.fi
\fIreset\fP \fIUUID\fP|\fITAG\fP|ALL
.PP
.nf
.fam C
This will reset a jail's properties back to the defaults.
It reads from the properties set on the "default" dataset. TAG, UUID and
generated vnet mac addresses are carried forward.
Those will retain their values, even if you reset the jail.
You can also reset every jail to the default properties by using the
keyword "ALL".
.fam T
.fi
restart \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Soft restart jail. Soft method will restart the jail without destroying
the jail's networking and the jail process itself. All processes are
gracefully restarted inside the jail. Useful for quick and graceful
restarts.
.fam T
.fi
\fIrollback\fP \fIUUID\fP|\fITAG\fP@snapshotname
.PP
.nf
.fam C
Rollback to an existing snapshot. Any intermediate snapshots will be
destroyed. For more information on this functionality please read zfs(8).
.fam T
.fi
\fIruntime\fP \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Show runtime configuration of a jail. Useful for debugging.
.fam T
.fi
\fIsend\fP [\fB-c\fP|\fB-i\fP|\fB-I\fP|\fB-h\fP|\fB-u\fP|\fB-m\fP] \fIPOOL\fP
.PP
.nf
.fam C
Will take a recursive snapshot of the POOL/iocell dataset and send it to
the specified pool. Supports remote, incremental and movement operations.
Moving (-m) is only available for local operations. Remote (-r) requires a
user (-u) and a host (-h) to be specified. It also requires publickey
authentication. If using incremental (-i) or Incremental (-I) be sure to
supply the flag for each snapshot.
If clean (-c) is provided, it will remove all snapshots from both the
source and destination pools. This cannot be used in combination with
incremental (-i) or Incremental (-i).
Local Example: iocell send newpool
Incremental Example: iocell send -i oldpool/iocell@snap1 -i oldpool/iocell@snap2 newpool
Remote Example: iocell send -r -u root -h some.host newpool
The received pool is not mounted if received locally, but is mounted if
received remotely.
.fam T
.fi
\fIset\fP \fIproperty=value\fP [\fIproperty=value\fP] \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Set one or more properties to the supplied value.
.fam T
.fi
\fIsnaplist\fP \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
List all snapshots belonging to jail.
.nf
.fam C
NAME - snapshot name
CREATED - creation time
RSIZE - referenced size
USED - used space
.fam T
.fi
\fIsnapmount\fP \fIUUID\fP|\fITAG\fP@snapshotname \fIDESTINATION\fP
.PP
.nf
.fam C
This will mount the specified jail's snapshot on the location given.
.fam T
.fi
\fIsnapremove\fP \fIUUID\fP|\fITAG\fP@snapshotname|ALL
.PP
.nf
.fam C
Destroy specified jail snapshot. If the keyword ALL is specified all
snapshots will be destroyed for the jail.
.fam T
.fi
snapshot|snap [\fB-f\fP|\fB-r\fP] \fIUUID\fP|\fITAG\fP [\fIUUID\fP|\fITAG\fP@snapshotname]
.PP
.nf
.fam C
Create a ZFS snapshot for jail. If the -r flag is specified it will by
recursively snapshot POOL/iocell/jails/UUID. Otherwise it will only snapshot
POOL/iocell/jails/UUID/root. If no snapshot name is specified defaults
to auto snapshot name based on current date and time.
The -f flag is to bypass the interactive question if you have a running
database in the jail. Make sure to pass -f on it's own and first before any
other flag like -r.
Example: iocell snapshot -f -r JAIL
.fam T
.fi
\fIsnapumount\fP \fIUUID\fP|\fITAG\fP@snapshotname
.PP
.nf
.fam C
Will unmount the specified jail's snapshot.
.fam T
.fi
\fIstart\fP [\fB-f\fP] \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Start jail identified by UUID or TAG. If the -f switch is supplied, it will
force start a template for editing. This flag does not apply to normal
jails.
.fam T
.fi
\fIstop\fP \fIUUID\fP|\fITAG\fP|ALL
.PP
.nf
.fam C
Stop jail identified by UUID or TAG. If ALL is specified, it will stop all
jails.
.fam T
.fi
\fIuncap\fP \fIUUID\fP|\fITAG\fP
.PP
.nf
.fam C
Release all resource limits, disable limits on the fly.
.fam T
.fi
\fIupdate\fP [\fB-p\fP|\fB-P\fP] \fIUUID\fP|\fITAG\fP|RELEASE
.PP
.nf
.fam C
Will reclone the jail if it is a basejail, otherwise it updates the jail
to the latest patch level. A back-out snapshot is created to allow
safe update/rollback.
If -p or -P along with a RELEASE are specified instead of a jail, it will
update that RELEASEs shared ports tree.
.fam T
.fi
\fIupgrade\fP \fIUUID\fP|\fITAG\fP [\fIrelease=RELEASE\fP]
.PP
.nf
.fam C
By default this will upgrade jail RELEASE to match the host's RELEASE
unless another RELEASE is specified with the "release" property.
Please note: The upgrade process for basejails is done by setting the jail's
"release" property to the required new RELEASE and then merging /etc.
If you wish to do this yourself without having /etc merged do:
iocell set release=10.1-RELEASE UUID|TAG
For this the RELEASE must be locally available. The basejail
will re-clone its filesystems from the new release at next jail start.
WARNING: Cloned jails (deprecated) [-c] are not supported for upgrades.
Please use thick (deprecated) [-t] or our standard basejails for
this feature.
.fam T
.fi
\fIversion\fP | --\fIversion\fP
.PP
.nf
.fam C
List version number.
.fam T
.fi
.SH PROPERTIES
For more information on properties please check the relevant man page which
is noted under each property in the form of "Source: manpage". Source "local"
marks \fBiocell\fP specific properties.
.PP
pkglist=none | path-to-file
.PP
.nf
.fam C
A text file containing one package per line. These will be auto installed
when a jail is created. Works only in combination with the create
subcommand.
Default: none
Source: local
.fam T
.fi
vnet=on | off
.PP
.nf
.fam C
This controls whether to start the jail with VNET or a shared IP
configuration. Default is to auto-guess from a sysctl. If you don't
need a fully virtualized per jail network stack set it to off.
Default: auto-guess
Source: local
.fam T
.fi
bpf=on | off
.PP
.nf
.fam C
This controls whether to start the jail with BPF devices enabled.
Default is off.
Default: off
Source: local
.fam T
.fi
dhcp=on | off
.PP
.nf
.fam C
This controls whether to start the jail with DHCP.
Default is off, but if you want it on, vnet and bpf are required.
Default: off
Source: local
.fam T
.fi
ip4_addr="interface|ip-address/netmask"
.PP
.nf
.fam C
The IPv4 address for VNET and shared IP jails.
Form is: interface|ip-address/netmask
Multiple interfaces:
"interface|ip-address/netmask,interface|ip-address/netmask"
For shared IP jails if an interface is given before
the IP address, an alias for the address will be added to that
interface, as it is with the interface parameter. If the DEFAULT
tag is used instead of an interface, the interface will be
automatically assigned based upon the system's default interface.
If a netmask in either dotted-quad or CIDR form is given after IP
address, it will be used when adding the IP alias.
If the AUTOIP4 tag is used in place of an ip-address, the IP address
will be automatically assigned at first start of the jail. This
requires that the ip4_autostart and ip4_autoend variables are set on
the 'default' property source. If used, the IP4 address will be set
to the first available based upon the given range and already created
jails.
Example:
# iocell set ip4_autostart="100" default
# iocell set ip4_autoend="150" default
# iocell set ip4_autosubnet="24" default
This will result in the automatic IPv4 address being assigned in the
base range of the default network interface. I.E. if the local default
NIC is set to 192.168.0.XXX, then the new address will be
192.168.0.[100-150]/24
For VNET jails the interface will be configured with the IP addresses
listed.
Example: "vnet0|192.168.0.10/24,vnet1|10.1.1.10/24"
This would configure interfaces vnet0 and vnet1 in a VNET jail. In this
case no network configuration is necessary in the jail's rc.conf file.
Default: none
Source: jail(8)
.fam T
.fi
ip4_saddrsel=1 | 0
.PP
.nf
.fam C
Only takes effect when vnet=off.
A boolean option to change the formerly mentioned behaviour and
disable IPv4 source address selection for the prison in favour of
the primary IPv4 address of the jail. Source address selection
is enabled by default for all jails and the ip4_nosaddrsel
settting of a parent jail is not inherited for any child jails.
Default: 1
Source: jail(8)
.fam T
.fi
ip4=new | disable | inherit
.PP
.nf
.fam C
Only takes effect when vnet=off.
Control the availability of IPv4 addresses. Possible values are
"inherit" to allow unrestricted access to all system addresses,
"new" to restrict addresses via ip4.addr above, and "disable" to
stop the jail from using IPv4 entirely. Setting the ip4.addr
parameter implies a value of "new".
Default: new
Source: jail(8)
.fam T
.fi
createbridge=on | off
.PP
.nf
.fam C
Controls whether default bridge0 and bridge1 will be created
on jails's start.
Default: on
.fam T
.fi
keepbridge=on | off
.PP
.nf
.fam C
Controls whether bridges bridge0 and bridge1 will be destroyed
on jail's shutdown.
Default: off
.fam T
.fi
defaultrouter=none | ipaddress
.PP
.nf
.fam C
Setting this property to anything other than none will try to configure a
default route inside a VNET jail.
.fam T
.fi
defaultrouter6=none | ip6address
.PP
.nf
.fam C
Setting this property to anything other than none will try to configure a
default IPv6 route inside a VNET jail.
.fam T
.fi
resolver=none | nameserver \fIIP\fP;nameserver \fIIP\fP;search domain.local
.PP
.nf
.fam C
Sets the jail's resolver (resolv.conf). Fields must be ; delimited
which are translated to newlines in resolv.conf.
If the resolver is set to none (default) the jail will inherit
the hosts resolv.conf file.
.fam T
.fi
ip6.addr, ip6.saddrsel, ip6
.PP
.nf
.fam C
A set of IPv6 options for the prison, the counterparts to
ip4.addr, ip4.saddrsel and ip4 above.
.fam T
.fi
interfaces=vnet0:bridge0,vnet1:bridge1 | vnet0:bridge0
.PP
.nf
.fam C
By default there are two interfaces specified with their bridge
association. Up to ten interfaces are supported. Interface configurations
are separated by commas. Format is interface:bridge, where left value is
the virtual VNET interface name, right value is the bridge name where the
virtual interface should be attached.
Default: vnet0:bridge0,vnet1:bridge1
Source: local
.fam T
.fi
host_domainname="NIS domainname"
.PP
.nf
.fam C
The NIS domainname of the jail.
Default: none
Source: jail(8)
.fam T
.fi
host_hostname=\fIUUID\fP
.PP
.nf
.fam C
The hostname of the jail.
Default: UUID
Source: jail(8)
.fam T
.fi
exec_fib=0 | 1 ..
.PP
.nf
.fam C
The FIB (routing table) to set when running commands inside the jail.
Default: 0
Source: jail(8)
.fam T
.fi
devfs_ruleset=4 | 0 ..
.PP
.nf
.fam C
The number of the devfs ruleset that is enforced for mounting
devfs in this jail. A value of zero (default) means no ruleset
is enforced. Descendant jails inherit the parent jail's devfs
ruleset enforcement. Mounting devfs inside a jail is possible
only if the allow_mount and allow_mount_devfs permissions are
effective and enforce_statfs is set to a value lower than 2.
Devfs rules and rulesets cannot be viewed or modified from inside
a jail.
NOTE: It is important that only appropriate device nodes in devfs
be exposed to a jail; access to disk devices in the jail may permit
processes in the jail to bypass the jail sandboxing by modifying
files outside of the jail. See devfs(8) for information on
how to use devfs rules to limit access to entries in the per-jail
devfs. A simple devfs ruleset for jails is available as ruleset
#4 in /etc/defaults/devfs.rules
Default: 4
Source: jail(8)
.fam T
.fi
mount_devfs=1 | 0
.PP
.nf
.fam C
Mount a devfs(5) filesystem on the chrooted /dev directory, and
apply the ruleset in the devfs_ruleset parameter (or a default of
ruleset 4: devfsrules_jail) to restrict the devices visible
inside the jail.
Default: 1
Source: jail(8)
.fam T
.fi
exec_start="/bin/sh /etc/rc"
.PP
.nf
.fam C
Command(s) to run in the prison environment when a jail is created.
A typical command to run is "sh /etc/rc".
Default: /bin/sh /etc/rc
Source: jail(8)
.fam T
.fi
exec_stop="/bin/sh /etc/rc.shutdown"
.PP
.nf
.fam C
Command(s) to run in the prison environment before a jail is
removed, and after any exec_prestop commands have completed.
A typical command to run is "sh /etc/rc.shutdown".
Default: /bin/sh /etc/rc.shutdown
Source: jail(8)
.fam T
.fi
exec_prestart="/usr/bin/true"
.PP
.nf
.fam C
Command(s) to run in the system environment before a jail is started.
Default: /usr/bin/true
Source: jail(8)
.fam T
.fi
exec_prestop="/usr/bin/true"
.PP
.nf
.fam C
Command(s) to run in the system environment before a jail is stopped.
Default: /usr/bin/true
Source: jail(8)
.fam T
.fi
exec_poststop="/usr/bin/true"
.PP
.nf
.fam C
Command(s) to run in the system environment after a jail is stopped.
Default: /usr/bin/true
Source: jail(8)
.fam T
.fi
exec_poststart="/usr/bin/true"
.PP
.nf
.fam C
Command(s) to run in the system environment after a jail is started,
and after any exec_start commands have completed.
Default: /usr/bin/true
Source: jail(8)
.fam T
.fi
exec_clean=1 | 0
.PP
.nf
.fam C
Run commands in a clean environment. The environment is discarded
except for HOME, SHELL, TERM and USER. HOME and SHELL are
set to the target login's default values. USER is set to the
target login. TERM is imported from the current environment.
The environment variables from the login class capability database
for the target login are also set.
Default: 1
Source: jail(8)
.fam T
.fi
exec_timeout=60 | 30 ..
.PP
.nf
.fam C
The maximum amount of time to wait for a command to complete. If
a command is still running after this many seconds have passed,
the jail will be terminated.
Default: 60
Source: jail(8)
.fam T
.fi
stop_timeout=30 | 60 ..