Oracle VM to TrueNAS VM...

Joined
Aug 17, 2022
Messages
8
Hello everyone,

I'm am brand new to truenas and am looking for a little bit of help.

I had a windows pc acting as a file server and was also running oracle VM for a few Linux servers that I needed.

After much searching, I found out that I needed to convert the oracle vm disk from .vdi to a raw .img... I got that all done and have the raw file in a dataset called "Servers".

My commands...
Windows PC: VBoxManage clonehd --format raw C:\Users\User$\Desktop\Website\Website.vdi C:\Users\User$\Desktop\Website\Website.raw
Truenas SSH: dd if=/mnt/Pool/Servers/Website/Website.raw of=/dev/zvol/Pool/Servers/Website-zvol status=progress

I got the vdi files converted to a raw file...
https://pasteboard.co/SBUXbGuyteIf.png

Got the vm setup in truenas click on Start and then VNC and all it would show is this...
https://pasteboard.co/Uk2xH2T3dbPQ.png

And now nothing... still no vm started, still no website that i need running. :(

I tried changing the disk mode from AHCI to VirtIO

This is getting me no where and the reason I decided to use truenas was it had the VM feature and it was open source.
If I can't get to work, then I will have to look at another option, which I have already wasted 5 days moving all of my data back and forth, as well as, my club's website down for the same time.

I'm at a loss, I'm not sure what to do to get this working. I want to believe that truenas can get this working, but I have no clue if I am doing something wrong or if truenas is like nope.
 
Joined
Aug 17, 2022
Messages
8
I had a Centos7 server that was on Oracle VM and I was moving everything to a newly created TrueNAS Setup.
Before I shutdown the centos server I enabled the serial console by following these instructions. (You will need to check how to do this for a different flavor of Linux)

Let's open up our text editor: nano /etc/sysconfig/grub Find the line labeled GRUB_CMDLINE_LINUX and add console=ttyS0 to the end (this assumes your serial port is ttyS0). It should look something like this: GRUB_CMDLINE_LINUX="rhgb quiet console=ttyS0" Save the file and exit Run stty -F /dev/ttyS0 speed 9600 Then grub2-mkconfig -o /boot/grub2/grub.cfg Finally systemctl start getty@ttyS0

Once I got all of that done, I then ran the commands to get the drive converted to a raw .img file using these commands...
Windows PC: VBoxManage clonehd --format raw C:\Users\User$\Desktop\Website\Website.vdi C:\Users\User$\Desktop\Website\Website.img

You can use the same code, just edit it for where your files are and where you want the .img to go.

I then transferred the .img file to the NAS.

I then created a ZVOL (for me it was under the Servers Dataset, just to keep somewhat of my sanity.)

I then enabled SSH on TrueNAS. So, I could run this command... (again, change the locations for what you have)
Truenas SSH: dd if=/mnt/Pool/Servers/Website/Website.raw of=/dev/zvol/Pool/Servers/Website-zvol status=progress

After the .img was dd'ed to the ZVOL I created a VM on TrueNAS.

The settings I had to use where:
Boot Method: UEFI (just to set the VM up!)
Selected the ZVOL I was using for the website server: Website-zvol
Selected the Disk Mode: AHCI (VirtIO would not work when starting the server)
NIC Adapter type selected was: VirtIO

Once the VM was setup, and saved, I went into devices and removed VNC. This was needed as TrueNAS will throw an error when trying to use anything but UEFI when trying to set it up!

I then edited the Boot Method to "UEFI_CSM"

I started up the Website Server VM and clicked the "Serial Shell" button thing, where it then showed me the startup of the VM, as if I was looking at a screen attached to a bare-metal server.

From there I could login and do anything adjusting I need, or anything else to the server.

It's been up and running since then.

I hope this helps someone else as this was a super pain in the arse to get this running, but I got it!
 
Top