Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

TrueCommand VM

Dariusz1989

Member
Joined
Aug 22, 2017
Messages
152
Hey

I've read a post that trueCommand is now available as VM, but when I go to download page I see few options raw/vdi/vhd/vmdk... which one do I need for freenas VM ?

I was thinking of using docker, but when I go to shell and type docker... I get error... so I take freenas does not have native docker envi to host trueCommand?

Regards
Dariusz
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
Raw ...
 

Dariusz1989

Member
Joined
Aug 22, 2017
Messages
152
Thanks ! Is it Linux ? UEFI ? Set all to VirtIO ? use VNC to connect? If so VNC connection does not give me anything usable... how to configure it ? I don't see info in docs about VM, only docker :- (((
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
I have not tried it - all I know is that bhyve uses raw disk format inside the ZVOLs. If I had to guess, I'd say it is probably Linux running docker running Truecommand ...
 

sretalla

Dedicated Sage
Joined
Jan 1, 2016
Messages
2,613
type exit at the shell and see if you can navigate through the boot options in the BIOS to get to a bootable image.
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
How did you write the raw image to your virtual disk ZVOL?
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
@Dariusz1989 No, that's not the way. The unzipped file is not an installer image but an image of an already installed hard disk! You create a zvol of matching size and then use dd to transfer the image to that zvol.

HTH,
Patrick
 

Dariusz1989

Member
Joined
Aug 22, 2017
Messages
152
@Dariusz1989 No, that's not the way. The unzipped file is not an installer image but an image of an already installed hard disk! You create a zvol of matching size and then use dd to transfer the image to that zvol.

HTH,
Patrick
Ohhh... ok, what is dd ? Is there no way to map the vol to windows as disk and just copy/paste?
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
What? Sorry, I don't get what you are trying to do. Where in this scenario is anything "Windows" or anything "copy/paste"?
I thought you were trying to create a VM on FreeNAS running Truecommand?

If yes, you need to
1. copy the unzipped image to your FreeNAS
2. create a VM with a new disk the same size as the unzipped image
3. use the dd command on the FreeNAS command line to copy the contents of the unzipped image into the disk you just created

The raw image contains the bytes of a complete hard disk with a complete Linux readily installed running Truecommand. You need a VM with this data as the hard disk.

HTH,
Patrick
 

Dariusz1989

Member
Joined
Aug 22, 2017
Messages
152
Hey @Patrick M. Hausen

I know I'm dense, but I really cant get it done... : /
1586556463671.png
#

I made it 22 GiB, used cp cp /mnt/vol_CGI/trueCommand/TrueCommand-disk001.raw /mnt/vol_CGI/VM/trueCommand/
file copied, I start vm, I get same error as before :- ( VNC does not connect...


Edit, I also made anothe zvol, where I could specify exact value, and then went to vm/disk/ change disk to zvol I made. Still no luck in vnc.
 
Last edited:

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
You need to look up the name of the ZVOL you created for your virtual hard disk. You can see it in the devices section of your VM.
Then you need to use the dd command to write from the raw file to the ZVOL!

e.g. dd if=TrueCommand-disk0.raw of=/dev/zvol/yourpoolname/thenameofthezvolyoujustlookedup bs=1m

ZVOLs are not visible files. You cannot use a file as the hard disk image. It has to be a ZVOL.

Patrick
 

Dariusz1989

Member
Joined
Aug 22, 2017
Messages
152
@Patrick M. Hausen Thank you for help.

I'm working on it again today, as to craeting zvol matching the rar size... I take I should make it in pool as new zvol ? Then create a vm with anysize, and after vm is made, go to devices/disk/ replace zvol there with the one I made manually early? Because when I try to type exact size in the VM wizard (picture above) I cant put it in as KiB, it just errors, nor K or anything else like that... So once I change the zvol, I can start the vm & use vnc to connect?

// use command above to copy data to zvol that we made in pools...

TIA

Ok I did all the stuff above, tried linux/freeBSD opts, neither of them work. Maybe they made it on windows? o_O

Nope, not windows. I dunno I give up. guess trueCommand is not for me :- )
 
Last edited:

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
OK, OK, OK ... now you got me.

1. Download and unpack raw image
You already did that.

2. Copy to your FreeNAS
Same, you managed to do that.

3. OK, how big is it?
Code:
root@freenas-pmh[/mnt/hdd/tmp]# ls -l TrueCommand*
-rw-r--r--  1 root  wheel  21474836480  8 Apr 22:26 TrueCommand-disk001.raw

That's 20 binary Gigabytes.

4. Let's create that VM
It's going to be a Linux VM
Bildschirmfoto 2020-04-11 um 16.33.40.png
8G is the recommended minimum if that hasn't changed
Bildschirmfoto 2020-04-11 um 16.33.55.png
Create a new disk with size 20 G, type virtio
Bildschirmfoto 2020-04-11 um 16.35.13.png
Virtio for networking, too
Bildschirmfoto 2020-04-11 um 16.35.54.png
Just click "NEXT" - no installation media
Bildschirmfoto 2020-04-11 um 16.36.05.png
Finish
Bildschirmfoto 2020-04-11 um 16.36.14.png

5. Now we transfer the raw image to the virtual disk
What's the precise name of the ZVOL FreeNAS created for us?
Code:
root@freenas-pmh[/mnt/hdd/tmp]# ls -l /dev/zvol/ssd/vms/tctest*         
crw-r-----  1 root  operator  0x14c Apr 11 16:36 /dev/zvol/ssd/vms/tctest-1ssone

So it is /dev/zvol/ssd/vms/tctest-1ssone in my case. The suffix is created randomly by FreeNAS to get unique names.

So we do a bytewise copy of the image from file to ZVOL with the dd command:
Code:
root@freenas-pmh[/mnt/hdd/tmp]# dd if=TrueCommand-disk001.raw of=/dev/zvol/ssd/vms/tctest-1ssone bs=1m
20480+0 records in
20480+0 records out
21474836480 bytes transferred in 15.987284 secs (1343244854 bytes/sec)


That's it. We have written all the bytes in the image file to the virtual "hard disk".

6. Time to boot the VM

Aaand ... you are perfectly correct - it does not work :(

Reason:
The disk image does not contain an EFI partition. So, ixSystems - what is this raw image supposed to be? Does any of the other available images contain an EFI boot? In that case I could update these instructions and include how to convert one of the other images to a raw one.

Code:
root@freenas-pmh[/mnt/hdd/tmp]# mdconfig -a -f TrueCommand-disk001.raw                               
md0
root@freenas-pmh[/mnt/hdd/tmp]# gpart show md0
=>      63  41942977  md0  MBR  (20G)
        63      1985       - free -  (993K)
      2048  37746688    1  linux-data  [active]  (18G)
  37748736      2046       - free -  (1.0M)
  37750782   4190210    2  ebr  (2.0G)
  41940992      2048       - free -  (1.0M)


@Dariusz1989 But - it is not all that difficult. All you need is a running Ubuntu VM. It's two or three commands to get the docker container of TrueCommand running and an additional systemd service to start it at boot time. Took me less time than to write up this tutorial.
 

Kris Moore

VP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
281
Just a quick note here. It is *not* recommended to run TrueCommand directly on the storage appliance itself. The whole point of TC is to monitor and respond to faults or issues with your storage. Hosting the service directly on the storage greatly impairs the mission of TrueCommand. I.E. if your storage crashes, how can TrueCommand send you an alert that it is offline?

That said, if you *really* still want to run it on your storage, I'd recommend the following.

1. Install Debian / Ubuntu or whatever your favorite EFI-Enabled Linux is
2. Install Docker
3. Run the following:

Code:
# docker pull ixsystems/truecommand
# docker run --detach -v "[hostdirectory]:/data" -p [portnumber]:80 -p [sslportnumber]:443


All together, that is probably 5-10 minutes to spin up a fresh Debian and install TrueCommand.
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
Thanks, @Kris Moore. That's what I did and it works well.

Is there a disk image with an EFI boot, though?

I don't quite follow your arguement about the placement of the TrueCommand VM. If your entire hyperconverged platform is built from a couple of high end FreeNAS hosts, that's all you have. Similarly running vCenter in ESXi. Of course we did! Where else should we have put that virtual appliance?
 

Kris Moore

VP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
281
Ideally you don't want the monitoring tool to have somewhere in its dependency chain the very service that it is trying to monitor. In my case, I'd deploy it on a VM or server using local storage, so that if any/all of my storage goes down, the monitoring tool can still respond. Its like running nagios on the same VM / System as the web-server. If the whole box goes down, there goes your alerting :)

Now, if you are 100% hyper converged, you'd just want to pick a system to host it on that is least critical to your overall services. That way if that one box goes down, you can deal with it in a more controlled manner.

It's like folks that host their AD Domain Controller on the storage, but then make the storage depend on the AD. You end up with a circular dependency where the storage needs the AD to function, and the AD can't function until the storage is up and running. Its all good until you reboot. Seen that more than a few times ;)
 

danb35

Wizened Sage
Joined
Aug 16, 2011
Messages
11,420
I've read a post that trueCommand is now available as VM
The "truecommand VM" is simply an image of a Debian Linux installation with Docker installed. That's it. There's nothing "truecommand" about it. You'd be just as well off installing a Debian or Ubuntu VM, and then following the Docker installation instructions in the manual.
 

Patrick M. Hausen

Dedicated Sage
Joined
Nov 25, 2013
Messages
1,632
Nonetheless it would be nice to have a ready-to-run VM image compatible with bhyve ...
 
Top