VM error for debian 11

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Hi VM-guys,
I was trying to install a debian 11 virtual machine on one of the sub-datasets of my drive, but it gives this error and I have no idea what that means...
This VM is meant to run an Apache server to host a few html files, nothing too big. (also taking ideas if there is something easier to host the files on the NAS)

thanks !

1646761412825.png
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
The error message says:
This system does not support virtualization
Go to the BIOS setup and check that the virtualization instructions are enabled.
You need both VT-x and EPT

Then check that the FreeBSD kernel detects the virtualization capabilities

For an Intel processor check with
grep VT-x /var/run/dmesg.boot

It should return something like
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr

More information about bhyve
 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Cool thanks, I activated the VT-x in the BIOS, but didn't find the EPT.
When I go to the TrueNAS CLI and write the command, it doesn't give me the VID and PostIntr...
1646821536632.png
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
  • EPT is probably automatically enabled in the BIOS with VT-x.
  • It does not matter if you does not have exactly the same CPU features than me. The kernel has detected that you have EPT, so bhybe should work now,
  • Now try to start your VM.
  • Report if it works or not
 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Hi,
well it doesn't show the same error now haha
1646941977171.png

I tried to erase and redo the pool I want to install the VM on, but without success...
In case that helps, the pool share type is : generic
and the VNC is disabled
I'm loading the .iso from the same pool, on my network shared drive dataset

thanks =)
 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
I rebooted and tried to clean it but it still doesn't work.
Also I'm not too sure what to do with the scripts that you shared and where to use them...
I can't delete manually the VM in the VM page, except if I tick "force Delete".

1647108970669.png

When I try to enable the VM :
1647108995586.png


And this is how I configured the VM :
1647109185163.png

1647109195999.png

1647109233132.png

so the VM_Meteo is a 10GB fixed dataset in my WD Red HDD pool :
1647109415174.png

I am mounting a debian 11 .iso from here. (This will then run an Apache server to host my home website for temperature and weather monitoring).
1647109466897.png

1647109535610.png

When I click submit here, it shows the previous error :

report_problem Error creating VM.​

[EFAULT] Unable to retrieve VM status. Failed to destroy VM

Thanks in advance for the help
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
It looks like the TrueNAS configuration database is corrupted.

If you just want to run Apache for couple of html files, create a jail instead of a VM.
A jail needs less memory than a VM but it can run only FreeBSD. It is worth the effort because you have only 16GB of RAM on your NAS.

If you still want to use a VM and if you succeed later to overcome the actual issue you have, then I suggest to modify the VM settings:

Indeed, you have
  • selected FreeBSD as guest OS instead of Linux
  • selected AHCI virtual disk instead of Virtio
  • allocated only 512 MB of RAM. For Linux, you need at least 1024 MB
When you have more experience with BHyve VM, I also suggest that you remove VNC and use only the serial console : it is faster and more convenient when you have not a US keyboard layout.

 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Ok thanks a lot ! I didn't know I could run html files from a jail, I'm configuring it right now and it seems to be running.

I just have a problem, how do I access the data or root folder which contains the actual html files I want to setup ?
I can see the "it works" local html page when I go into the local ip on my browser, but don't know where to add new files to it shows up.
Followed this tutorial : blog/services-in-freenas-jail, but if I share the data inside the jail as written (and very not recommended I think), I'm not allowed to change the root permissions :
Error: [EPERM] Changing permissions on jail dataset paths is not permitted
So i've got my SMB share of the data folder (site-data) as mentionned in the tutorial, I can see it on windows when I add a network folder, but of course can't copy anything in it, and don't see the base "it works" html page.
1647362234940.png


How do I access that folder ? I only need an access with a local computer to edit the html files, nothing too fancy.
thanks !
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
Enable SSH on your jail (see FreeBSD documentation), and then upload the HTML files with FileZilla or rsync.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Blog post is outdated. We prevent webui / middleware from making permissions changes to the iocage dataset these days to protect users from foot-shooting (had significant number of users decide to recursively change permissions on iocage dataset components and end up breaking their jails). Generally speaking, the correct / best way to have an SMB share's data available inside a jail is to nullfs mount it in the jail via webui.
 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Hi Anodos,
ok thanks that's what I was thinking about the mounting, although i'm not sure what "nullfs mount" means.
I want to access my "SiteMeteo-data" folder from windows so I can put html files in it, and want the apache server to read them from a folder inside its installation.
I mounted the "SiteMeteo-data" folder into a manually created "site-data" in the apache install in the jail, and I can access it from windows.
But how does apache now that the html files to run/show are in that newly created folder instead of the "data" in its installation ?
(Or how can I access that data folder to modify the existing html files, in windows)
thanks
1647367604357.png
 
Last edited:

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Enable SSH on your jail (see FreeBSD documentation), and then upload the HTML files with FileZilla or rsync.
I will do that if the other method doesn't work, but I'd prefer to have a direct access to the files from the windows interface as a network drive
EDIT : I tried, but when I'm logging in with FileZilla, I get an ECONNREFUSED error....
tried with my usual username and the new user I added previously for the web admin.
1647371345564.png
 
Last edited:

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
For SSH access, you have to create a new user in the jail. You cannot use the users that are defined in the webui.
 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Hi, ok yes I added the user "gui"
1647463555749.png


but when I try to access the SSH with filezilla, i get an ECONNREFUSED error

1647463660404.png

(don't mind the first 2 lines i failed the address)
I'm not sure about the automatic port 21 filezilla selects.
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
By default on FreeBSD
  • password authentication is disabled
  • sshd is disabled
So you must run the following commands to configure SSHD
Code:
echo "PasswordAuthentication no" >> /etc/ssh/sshd_config
sysrc sshd_enable="YES"
service sshd restart


By default FileZilla
  • connect in FTP to port 21
  • for SFTP/SCP you must specify the port 22
 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Thank you for the time you're according to me blanchet,
I've just ran the commands and it gives me this
1647627818903.png

however after a jail restart, I still cannot connect to the FTP local server...
1647627929906.png

I tried with my username i created at the beginning of TrueNAS (gui) and the username i created in the shell (sitemeteo) but none are working
 

Attachments

  • 1647627916669.png
    1647627916669.png
    30.8 KB · Views: 105

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
There is an issue with SSHD
try this
Code:
ssh-keygen -A
service sshd restart
service sshd status


 

golfox2

Dabbler
Joined
Mar 8, 2022
Messages
30
Hi,
ok I've tried your last commands, it gives this
1647774176031.png

I tried to restart the jail and the whole truenas, but it still comes up with the same ECONNREFUSED error :(

I might just erase the jail and make a whole new one, would you happen to have a tutorial that actually works instead of the one I followed on the truenas blog (which is know 404 error weirdly) please ?
 
Joined
Jun 2, 2019
Messages
591
I know this is not likely what you want to hear. I get it. Nice to have a single NAS appliance running as storage and VMs. The fact is TrueNAS is a storage solution first. Virtualization and containers is a bonus.

Although, I was able to get a Windows VM running on CORE after changing the NIC to VirtIO and installing the VirtIO drivers, I found the performance to be rather slow. https://fedorapeople.org/groups/vir...ownloads/archive-virtio/virtio-win-0.1.215-2/

Unfortunately, individual USB device passthrough on CORE and Byhve is not possible without passing the entire controller, unless something has changed or not without a lot of hacks.

I considered migrating all my VMs to SCALE, but opted to install Proxmox on a spare NAS. I was able to migrate my CORE Windows VM to Proxmox via a combination of the Proxox GUI and CLI. https://www.youtube.com/watch?v=yKZ_JJaQHDk&list=LL&index=1

I now have my Windows 10 VM migrated and a number of other Linux VMs (Debian, Fedora, Ubuntu, etc.) running on Proxmox. Performance is much better than CORE, Proxmox supports USB passthrough, TPM 2.0 emulation, etc.

Perhaps TrueNAS virtualization and containers will improve over time, but until then I am pleased with Proxmox. https://www.proxmox.com/en/



Screen Shot 2022-03-20 at 7.39.13 AM.png
 
Last edited:
Top