old time truenas user becomes newbie, and help with win7 vm install

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
For well over a decade i've used freenas daily and installed probably hundreds of systems for clients. However, my use of freenas was strictly for iSCSI (Xen vm's) and nothing more. I never even looked at all the other capabilities. Now I'm retired and decided to load it up and use it for a home nas (plex, some vm's, etc). After spending a solid week going through everything, my hardware has run flawlessly and Truenas core is running beautifully with 3 vms (one freebsd, two debian), and a few jails, as well as plex.

First - I am blown away by the functionality in truenas core. What a fantastic system has been developed here (especially for a home server). I do have a list of a few things I noticed in my week long exploration that seemed like possible oversights or "nice to have". I'll find the right place to post those few cosmetic things soon enough. I'm looking forward to truenas core being my daily driver for the rest of retirement. Thank you for such a great product!

Second - While I have had no trouble getting jails and vms (unix) to run, I simply can't get a win7 pro 64 iso to load. I have tried several different isos (including one pulled directly from my SPLA (service provider vlsc) account at microsoft. I've googled and followed a lot of different advice and still come up with the exact same problem every time. Start the vm with iso in the cd device, go to vnc and hit a key at "press any key to booth from cd/dvd", and windows starts booting. It says on the first screen "windows is loading files" and the usual gas guage. Then it switches to graphics mode and says "starting windows". A few moments later the 4 squares come together for the microsoft graphic. After a few more moments the window logo does the usual "pulse", and then my vnc connection is dropped. Can't get back to the machine in any way, no buttons in the gui respond (for that vm) - other than to force power the vm off and restart it. Then the same cycle repeats.

I know my hardware is solid, it's been running an old version of freenas for a couple years. General info about the system:
TrueNAS-12.0-U6.1
Mainboard - oem run Tyan S8229WP (holds 2 socket C32 processors)
90 Pin Direct Connector to the SAS backplane.
(2) AMD OPTERON 41KX HE (12 cores total)
(12)Bay 3.5in SAS 6.0Gb/s Backplane.
(7) Ethernet ports.
(7)USB 2.0 ports (2 at rear, 4 via cable, 1 type A onboard).
(2) SATA-II connectors.
(2)PCI-E x16 slots.
(2)770W Power Supplies.
(2)PCI-E x16 riser cards (Tyan M8229-L16/R16-3F)
32gb (16x2) ECC
(4) 4TB WD RED (configured as 2 mirrored vdevs, 2 drives in each vdev)

Like I said I googled a lot and got a lot of results, but most were outdated or I tried with no success. If anyone can just point me in the right direction to get this win7pro64 install complete, my dream machine will be finished and ready for work. Once I see win764pro working on it, I'll probably use windows media creater to upgrade it to win10. Can someone nudge the newb past this one? THANK YOU!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
IIRC, Windows 7 predates UEFI. Why not start with the Windows 10 ISO directly, and activate with your Windows 7 code?
 

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
I grabbed a SPLA win10-x64 iso and bhyve was quite happy with it. Thank you Samuel!!

I took all defaults, so e1000 nic and AHCI drives during installation. I see a lot of talk online as to if win10 should use virtio drivers for those or not, but nothing definitive - is there a right answer? If virtio is better for win10, I assume I can switch the vm settings for nic and drives to virtio (after installing them in the vm) and just reboot.

I know MSDOS622 and FreeDOS will have trouble with uefi, maybe grub will work for those. Yes, I'd really like to find a way to have an MSDOS vm but I doubt bhyve is going to be kind to that. I can always stick dosbox under freebsd vm under bhyve under freebsd/truenas heh.

Thanks so much!

Best,

J
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Changing the NIC drivers to VirtIO will improve VM stability, and can be done after install. Changing the storage driver to VirtIO will also improve stability, but requires a reinstall, as well as a 2nd CDROM virtual drive for the VirtIO driver ISO.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Also, creating a GRUB VM is quite a chore.

 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Windows 7 installs just fine with UEFI. Two major obstacles:
  • the mouse does not work in VNC during installation
    there is no fix
    you need to TAB/Enter through all of the installer with the keyboard
    but it's doable
  • in the virtual disk device set the blocksize to 512 instead of "default"
With that I have been able to install and run Windows 7. Although I switched to Windows 10 long ago.
 

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
Changing the NIC drivers to VirtIO will improve VM stability, and can be done after install. Changing the storage driver to VirtIO will also improve stability, but requires a reinstall, as well as a 2nd CDROM virtual drive for the VirtIO driver ISO.
I installed virtio driver iso, and set the network card to virtio in the vm settings. Works great, thank you! I left the hard drives as ahci, as the current truenas core docs do say that 'ahci is the recommended setting for windows vms'. I don't know if that is dated info?

I have no problem reinstalling the win10 vm to get virtio disk if that's whats needed. I have a question about that - I'd like to create "template vms", meaning a full regular vm, but with various setup inside the vm that I will always want for a unix vm, a windows vm, etc. I see the "clone" button for each vm - can I assume that the clone button creates a full copy that has no dependency on the original vm (or its disks)? My plan was to get the guest os just as I want for future vm installs, then clone it and keep the clone around for new vm's. At that point I'd just clone the clone to create each new vm. This would be a bad idea if these 'clones' from the clone button are just deltas from the original... Some of my searching seems to indicate people are using zfs send for this kind of thing, but that seems odd if there is a clone button in the vm for it.....

I'd appreciate any insight or direction/links....

J
 

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
Also, creating a GRUB VM is quite a chore.

Thanks for that article link!!! When I get time for attempting grub based vms, this will be my starting point. Much appreciated.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
I have been all over the ui and the docs, can't seem to find a way to do this part.... need to create the zvol via command line for that?
Expand the VM, and click the Devices button. Find the DISK device for your VM, and click the 3 dots on the right to bring up the DISK properties. There will be a field for the block size.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
As for clones, those are full clones. What happens in the background is a new VM is created with all the same properties, and the name increments to <original vm name>_clone1, _clone2, etc. For the DISK devices, the zvol gets replicated to a new zvol with name <original zvol name>_clone1, _clone2, etc.
 

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
As for clones, those are full clones. What happens in the background is a new VM is created with all the same properties, and the name increments to <original vm name>_clone1, _clone2, etc. For the DISK devices, the zvol gets replicated to a new zvol with name <original zvol name>_clone1, _clone2, etc.
I'm sure I'm not understanding the resulting display.... built a win10pro64 vm. Cloned it before activation, then cloned it again after activation.

winvm.JPG


The original vm is win-os, and the os disk is 53gib. The two clones (one before and one after) are 8K. I would have expected each to have same "used" data?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Is this the pool view or the VM view? I'm not sure what your screen shot is displaying?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
This is obviously the pool --> dataset --> volume view. (see the inherited compression and the compression ratio) So these seem to be dependent clones, not full copies by the means of zfs send|zfs receive.
 

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
pool->dataset(VM DISKS), so the first line in the above image is the boot disk for win-os (created normally via new vm), and the following two disks are the boot disks for two vms cloned from the first. They seem to be dependent on the original disk, but I only say that out of ignorance by looking at the sizes.

If these are dependent, I need to stop right now and go find a link for truly "cloning" a vm without dependencies. Thanks for the input folks!
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
On a command line logged in as root enter:
zfs send <poolname>/<possibly-some-dataset>/win-os | zfs receive <poolname>/<possibly-some-dataset>/full-copy-of-win-os

Then when creating a VM instead of creating a new virtual disk, assign the volume "full-copy-of-win-os" to the disk device.
 

jaywest

Dabbler
Joined
Nov 13, 2021
Messages
33
ISTR Citrix xenserver had two options for "cloning" a vm, one was a dependent clone and one was a full copy. I may be remembering that incorrectly. But it would be nice if in the ui there were both options - or at least a warning on the clone operation that it's dependent. Could be bad to find out later when the original vm is deleted...

Thanks Patrick, very much appreciated. I did know about zfs send/receive, but didn't know if there were any non-obvious steps around it. It's too late to get a non-activated copy, I'll just delete the two cloned vm's that are dependent and create a single one with zfs send/receive before loading the windows app on it that I need. Thanks!

J
 
Top