Hi Ian,
On Sun, Jun 04, 2023 at 09:52:40PM +0700, Ian Hobson via BitFolk Users wrote:
8) Reboot. This shows the grub menu, but when I select
ubuntu
I get a black screen - and nothing further.
So I guess you need someone familiar with Proxmox to advise why it
might fail to boot like that. Unfortunately I don't have any
experience of Proxmox.
Your bit with the grub config looks fishy. Are there differences
between the /etc/default/grub that you have after doing a Proxmox
install and the one you're putting in to it? Particularly, a Xen
VM's use of hvc0 as a console is usually being set as a kernel
command line in /etc/default/grub and is likely not appropriate for
Proxmox.
Also unless I misunderstood, you are using rsync against a running
VM to overwrite the VM itself? If so, that's fraught with dangers.
You really should stop the target VM and mount its filesystem
somewhere, then rsync into that.
Ideas very welcome. A backup that I can't restore
is about as useful as a
chocolate tea pot!
I generally recommend an approach of using config management to turn
a default install of the OS into something that is ready to serve
your data, and then a restore of data only from the source code
repository and database backups etc that it is stored in.
That way, your config management can account for differences in
infrastructure, e.g. "/etc/default/grub has to look like *this* to
boot at BitFolk, but like *that* to boot under Proxmox" and so on.
It means you can quickly deploy everything, even to a different
hosting provider should your chosen one cease to exist.
The idea of taking an image of a whole running VM, well, firstly you
can't really do it with rsync, as you have found. Secondly it's
always going to give you problem unless you replicate the hosting
environment to a good enough degree. What you're trying to do is
likely doable, but has some serious pitfalls.
Taking a backup as an image might be more appropriate when using
containers as you can freeze them and take the image, but that too
encourages you to deploy a set of artefacts not just a big blob:
there's your image (Docker image or whatever) and then the config
and the data that you put into it.
Bottom line I think is that you're best off only trying to back up
data (and code/config if it's not already deployed from somewhere).
Myself I do backup quite a lot of the OS but only really for peace
of mind in case I forgot something. I wouldn't ever try to restore a
VM from one of those backups. I deploy a new VM, have Ansible set it
up, and then I put the data back in to it.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting