Win 10 virtual machine TrueNAS

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Weird. Can you set a static IP address like you did with that 11.2 jail? You can use the UI or iocage whichever you prefer.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Weird. Can you set a static IP address like you did with that 11.2 jail? You can use the UI or iocage whichever you prefer.
here is what im getting

ERROR:


[b'jexec: execvp: /bin/sh: No such file or directory\n', b'']





Refusing to start mycloud: exec_start failed


root@NASServer[~]# iocage start mycloud


No default gateway found for ipv6.


* Starting mycloud


+ Started OK


+ Using devfs_ruleset: 1000 (iocage generated default)


+ Configuring VNET OK


+ Using IP options: vnet
 

Attachments

  • Error.png
    Error.png
    108.4 KB · Views: 165

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Something must have gone wrong with iocage create. If there is no /bin/sh probably more is missing. This turns out to be harder than I guessed to do remotely without access to your system. I used exactly the commands I gave you to create and start a jail.

Maybe you have more success with the UI - how did you do that 11.2 jail? Anyway, if you get a 12.2 jail to run, we can proceed.

One question: is your Windows VM shut down or is it running? Your ifconfig -a output should have shown an interface for the VM but did not. That puzzles me a bit. And jails are supposed to use the same connections as the VMs ...
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Something must have gone wrong with iocage create. If there is no /bin/sh probably more is missing. This turns out to be harder than I guessed to do remotely without access to your system. I used exactly the commands I gave you to create and start a jail.

Maybe you have more success with the UI - how did you do that 11.2 jail? Anyway, if you get a 12.2 jail to run, we can proceed.

One question: is your Windows VM shut down or is it running? Your ifconfig -a output should have shown an interface for the VM but did not. That puzzles me a bit. And jails are supposed to use the same connections as the VMs ...
My VM machine is OFF.

I can re-create what I did but with the latest release and assign a static IP
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Something must have gone wrong with iocage create. If there is no /bin/sh probably more is missing. This turns out to be harder than I guessed to do remotely without access to your system. I used exactly the commands I gave you to create and start a jail.

Maybe you have more success with the UI - how did you do that 11.2 jail? Anyway, if you get a 12.2 jail to run, we can proceed.

One question: is your Windows VM shut down or is it running? Your ifconfig -a output should have shown an interface for the VM but did not. That puzzles me a bit. And jails are supposed to use the same connections as the VMs ...
OK I have mycloud jail up and running on a static IP with SSH enable. However, I can't edit the config file to allow to login at the root. I getting permission denied
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
How did you get to the point where you try to edit the file?
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
How did you get to the point where you try to edit the file?

I deleted the jail I created from the shell using your commands, but kept the iocage

I created a new clone jail from the UI -12.2 release. No DHCP, no NAT, VNET ON IPv4 default router: auto, vnet_default_interface: auto and I put a static address in IPv4 address. I have attached a screen shot. At first I had vnet_default_interface at r0 and I was getting the exact same error message as I was getting this afternoon with your commands.?? SSH is enabled on the jail, but I can't edit the config file to give me access to the root without a password. Im getting access denied. Good evening
 

Attachments

  • Screen Shot 2020-12-08 at 7.01.41 PM.png
    Screen Shot 2020-12-08 at 7.01.41 PM.png
    491 KB · Views: 156
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
How did you enable SSH in the jail? Apart from that I have no idea at the moment. If the jail does not start ...
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
How did you enable SSH in the jail? Apart from that I have no idea at the moment. If the jail does not start ...
Patrick. The jail is up and running. I have enabled SSH and created a password from the shell using your commands. I can SSH the root of mycloud jail using its static IP. However it will not accept the password and it denies me access. Therefore, I’m unable to edit its config file that would grant me full access like I have at the root of the server.
Like I said it is up and running but I don’t have permission to edit its config file to grant me full access without a password
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You can change into the jail from the server: iocage console mycloud

Then you should be able to edit sshd_config, restart sshd and finally log on.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Please show the exact commands you are using - thanks.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Please show the exact commands you are using - thanks.
PDF document attached providing a Recap of the process I used with the command used. I very much appreciate your time helping me out. Many thanks again--Alain
 

Attachments

  • Recap.pdf
    94.4 KB · Views: 194

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You tried to start the config file as an executable command, hence the "permission denied" message. The file does not have the "execute" permision set.

The syntax is vi /etc/ssh/sshd_config. If you want to use vi. "nano" is an easier to use alternative.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
You tried to start the config file as an executable command, hence the "permission denied" message. The file does not have the "execute" permision set.

The syntax is vi /etc/ssh/sshd_config. If you want to use vi. "nano" is an easier to use alternative.
nano /etc/ssh/sshd_config (the nano command is not recognized)
vi /etc/ssh/sshd_config (seams to work, I have no clue what Im doing.). any instructions some where how I can use vi? or better how I can enable nano?

Sorry for all this..
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Oh, I'm sorry. nano is only avaliable on the host system and not on a freshly installed FreeBSD. We can add it to the jail later because you are going to need an editor. vi is ... special. Hit ESC ":" "q" "!" Enter in that order to leave it. Then exit the jail ("exit") and we can edit with nano from the host:
nano /mnt/<your pool>/iocage/jails/mycloud/root/etc/ssh/sshd_config

Then stop and start the jail again with iocage - all should be fine, now.

vi tutorial if you are curious:

If you ask yourself "why?" :wink: - vi is from the seventies and was invented for the computing power and the ASCII terminals of the time. Hasn't changed much, since. Like many things in Unix.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
Oh, I'm sorry. nano is only avaliable on the host system and not on a freshly installed FreeBSD. We can add it to the jail later because you are going to need an editor. vi is ... special. Hit ESC ":" "q" "!" Enter in that order to leave it. Then exit the jail ("exit") and we can edit with nano from the host:
nano /mnt/<your pool>/iocage/jails/mycloud/root/etc/ssh/sshd_config

Then stop and start the jail again with iocage - all should be fine, now.

vi tutorial if you are curious:

If you ask yourself "why?" :wink: - vi is from the seventies and was invented for the computing power and the ASCII terminals of the time. Hasn't changed much, since. Like many things in Unix.
Patrick - very sorry to bother you again, but the Directory does not exist?? -- Look at the 2 pictures attached
 

Attachments

  • Screen Shot 2020-12-09 at 10.44.12 AM.png
    Screen Shot 2020-12-09 at 10.44.12 AM.png
    47.9 KB · Views: 149
  • Screen Shot 2020-12-09 at 10.44.43 AM.png
    Screen Shot 2020-12-09 at 10.44.43 AM.png
    71.5 KB · Views: 144

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You ommitted an "etc/" in that path. You can use the TAB key to have directory names auto expand on the shell, e.g.

vi /mn TAB V TAB ioc TAB j TAB my TAB r TAB et TAB ssh TAB sshd TAB Enter.

If nothing happens at pressing TAB, then what you typed so far is not yet unambiguous.
 

Bureaua

Explorer
Joined
Nov 28, 2020
Messages
75
You ommitted an "etc/" in that path. You can use the TAB key to have directory names auto expand on the shell, e.g.

vi /mn TAB V TAB ioc TAB j TAB my TAB r TAB et TAB ssh TAB sshd TAB Enter.

If nothing happens at pressing TAB, then what you typed so far is not yet unambiguous.

You ommitted an "etc/" in that path. You can use the TAB key to have directory names auto expand on the shell, e.g.

vi /mn TAB V TAB ioc TAB j TAB my TAB r TAB et TAB ssh TAB sshd TAB Enter.

If nothing happens at pressing TAB, then what you typed so far is not yet unambiguous.
Patrick---here is what is available after /mycloud/ ?? using the TAB - I got into the Config.json file with nano editor. Did not change nothing
 

Attachments

  • Jason.png
    Jason.png
    12.4 KB · Views: 150
  • Screen Shot 2020-12-09 at 11.22.22 AM.png
    Screen Shot 2020-12-09 at 11.22.22 AM.png
    60.2 KB · Views: 133
Last edited:
Top