vimage: "Error: unknown parameter: vnet"

Hello,

I trying to play with vimage but I found something strange. I don't know whether it is a bug.

This is what I have done step by step
1. Kernel recompiled with "options VIMAGE"

Code:
vi cd /usr/src/sys/i386/conf/GENERIC
/usr/sbin/config GENERIC
cd ../compile/GENERIC
make cleandepend && make depend

2. After restart, vimage is installed
Code:
cd /usr/src/tools/tools/vimage
make
make install

3. I tried to create a virtual image as explained in man page, but error occurs

Code:
vimage -c n0
Error: unknown parameter: vnet

4. I found a function call in the code named jail_setv ( line 255)
Code:
jail_setv( JAIL_CREATE,
"name", argv[0],
"vnet", NULL,
"host", NULL,
"persist", NULL,
"allow.raw_sockets", "true",
"allow.socket_af", "true",
"allow.mount", "true",
NULL)

From man page of jai_setv I understood that that parameters after first argument are set via jail_set method. In man page of jail(8) possible parameters are given. name, host, persist, allow.raw_sockets, allow.socket_af and allow.mount are listed in jail(8) but vnet is not defined. I think this is the reason for the error.

5. I commented out vnet related line ( line 257 ) and recompiled vimage. After small modification, error disappers.
Code:
vimage -c n0

6. But this time vimage -l command does not return anything.
Code:
vimage -l

on the other hand jls command returns some rows

Code:
JID IP Adress    Hostname    Path
  1 -                        /


Is it a bug or I am doing something wrong?

best regards
yavuz
 
yavuzg said:
Hello,
Code:
vi cd /usr/src/sys/i386/conf/GENERIC
/usr/sbin/config GENERIC
cd ../compile/GENERIC
make cleandepend && make depend

Problem solved executing below commands after make depend
Code:
make && make install
 
Please use the preferred way to build/install a kernel:

Code:
cd /usr/src
make buildkernel
make installkernel

Do NOT modify the GENERIC config file. Create a copy of it with a different name and use that. Also change the ident line in the config to reflect the name of the config.
 
Back
Top