Disaster recovery and virtualisation
-
Following on from my last thread, some progress has been made over the weekend.
With 18G of spanky RAM in my Synology DS224+. I've jumped into the murky world of virtualisation and already eliminated the need for two Raspberry Pi's from my system.
Home Assistant: In theory they provide an OVA file which is supported by the Synology. I couldn't get it to work, however, so grabbed a copy of the .img file they supply, renamed it .iso and imported it as a VM. Restored from my full back up and that all seems fantastic.
Minidnla Music server: Trivial. Grabbed a Debian .iso for Bookworm and copied that onto the NAS. Created a new machine which mirrored the specs of the Raspberry Pi, booted from the ISO then did an expert install. Once that was all stable with a basic core of stuff and networking, I've made a copy of that as a good base system. Then fired up minidnla on it, mounted my media and that's also woking. Not bad for a short weekend's work.
Still not sure about the main NUC though. I'm thinking of buying a new USB stick so I can mess around getting it working on the Synology before I do anything drastic.
Once that hurdle is sorted I'm torn between:
- Using a brand new install of Bookworm, re-installing Z-way server, OpenLuup, AltUI, MSR and HA bridge, then restoring across or
- Making an ISO of the current system, importing that and upgrading in place (which will be pretty risk free since I can snapshot everything before I make any changes.)
Decisions, decisions.
C
-
After a few false starts, some significant progress:
- Shut down the NUC
- Insert bootable USB (in my case I went for Debian)
- Insert USB mounted hard drive
- Connect monitor, keyboard, mouse
- Boot into USB
- Open terminal
- Confirm your drives (IMPORTANT)
- dd if=/dev/$original_drive of=/$mountpoint_of_USB_Hardrive/Image.iso
- Wait (about 45 minutes for me)
Now this is where I found things trickier than I was expecting.
Create a VM in the Synology console, and give it a bootable ISO file to be mounted. I would have used Debian but any graphical interface just wouldn't work. Puppy Debian worked very nicely. Ensure that your virtual disc is larger than the image you created in step 7 above, but leave it empty. I suggest you leave your network disconnected to stop IP conflicts (assuming you have a static IP on your Openluup box)
Plug your USB hard drive with the ISO image into your Synology and in the USB section of your VM connect to that device (another gotcha, if the adapter is USB3 it won't work under USB2 No idea why)
9) Boot into Puppy or your preferred distro.
10) Make sure your ISO file is visible to the OS
11) Check
10) Make sure the USB drive is mounted so the OS can see the
11) Confirm your target drive (less important this time)
12) dd if=/$USB_hard_drive_mount_point/image.iso of=/dev/$virtual_hard_drive_name
13) Wait (about 2 hours this time)
14) Shut down the VM
15) Edit the VM to remove the bootable USB image (and the USB hard drive if preferred)
16) Boot the VM
17) Be a little surprised when it all comes up!
18) Configure the network to your desires, again avoiding IP conflicts
19) Edit the VM to connect to the networkThis is where I am. I can see AltUI, MSR, HA bridge on the new VM through a browser. So very very happy at this point!
C
-
Thanks. I've got a new 6TB drive coming in a couple of days (I tried an enterprise level disc I had snagged from the office on an off chance, and it was fine) so I've got a 50% uplift on my storage. The two VMs that are running are noticeably snappier on VMs than on Pis, which is nice. Particularly when browsing 9k music tracks, which now takes a couple of seconds rather than the Pi's 20ish
Once the drive upgrade is in place, I'm not quite sure where to go next. Just bite the bullet and try and connect the Zway stick straight into the VM. Try it with a new Zway stick for experimentation, or do something else.
I'm far more comfortable now, though. I have snapshots and OVA images and everything!
C
-
Well after much trepidation, and some additional work, I think we are complete.
After the successful virtualisation of my Home Assistant and Music Server hosts, and a successful POC of the main Vera / MQTT / MSR / everything else box I did some testing with a spare UZB stick to make sure I could connect it to the virtual host.
With a long weekend ahead to solve any issues, this morning I bit the bullet and shut down the hardware device, moved the production UZB stick over to the NAS and spun up the VM.
It was not entirely smooth as for some reason Z-way-server was saying it wasn't connected and AltUI claimed an authentication issue, but with some judicious restarts and testing, everything that I can think of to test now works!
Some of the Z-wave commands from remote controls are a little slow, oddly, but I suspect the network needs to sort itself out as it's nearly two months 'old' Direct control from web interfaces / voice commands seems fine so I'm not overly worried.
So, barring any unforseen failures, I have a fully virtualised system. Better even, when reading about the Synology range, I decided to source an older unit as a backup cluster device so I have some serious resilience
Thanks for all the support an input!
C