![]() |
VOOZH | about |
Linux,Windows,serwer, i tak dalej ;)
„Doing backups is a must- restoring backups is a hell”
So how can we make this ‚unpleasant’ part more civilised? Let’s say – our VM is a couple hundred GB in size, maybe even a couple TB and for some reason, we have to do some magic: restore, migrate, transfer – whatever is desired a the moment.
But in oppositon to our will – physics is quite unforgiving in that matter – restoring takes time. Even if we have bunch of speed-friendly SSD arrays, 10G/40G network at our disposal, still few hours without their favourite data can be ‚no-go’ for our friends from „bussiness side”.
In this particular case, Veeam Instant Recovery comes into rescue.
How does it works?
It uses quite interesting quirk – in reality, the time you need for having your VM ready is to restore small, kb-sized VM configuration, create some sparse files for drives, and mount the drives itself over a network. This way, within 3-5 minutes your machine is up and ready
But, disks, you say, disks! „Where are my data, my precious data?”.
They are still safe, protected in your backup repository, mounted here as ReadOnly volumes.
So, after an initial deploy our VM is ready to serve requests. Also in Veeam B&R Console tasks is waiting for you to choose: begin migration from repositories into real server, or just to power it off.
Phase 1 during restore:
Phase 2 to begins when there are no data left to move from backup repository – this initiates merging phase, when ‚snapshot’ (CHANGED DATA) are being merged with originally restored DISK_1.
As with everything, there are few PROS and CONS
PROS:
CONS
So which targets should be ideal for this process?
Any VM which doesn’t change data much but needs to be restored within few minutes:
Any VM which offers small-to-medium usage of IO Read , not so many IO Write
Which targets should we avoid?
As we may know – Microsoft introduced new way of doing snapshots/checkpoints in Hyper-V 2016. However term „production” is misleading, implying Standard checkpoints are not production ready – which is simply not true.
The biggest difference is that Production checkpoints are mostly used with VSS-aware applications (like MS SQL/Exchange, MS Windows itself) allowing them to flush/sync/commit changes to filesystem.
As a major difference – production checkpoints don’t save memory or cpu state, starting always with machine powered off after restore.
You can choose which way you want to do your snapshots here:
Windows-based virtual machines have supported this since previous versions of integration services (2012 R2, 8/8.1) and from the start in case of Windows 2016/10. What about Linux-based, Centos 6/7 machines?
When installed out of the box, without any additional packages, trying to do a production snapshot of Centos 7 (with all updates) we got something like this:
Quick how-to.
yum remove microsoft-hyper-v kmod-microsoft-hyper-v
or
yum remove $(yum list installed|grep microsoft)
yum info hyperv-daemons
Available Packages
Name : hyperv-daemons
Arch : x86_64
Version : 0
Release : 0.29.20160216git.el7
Size : 4.5 k
Repo : base/7/x86_64
Summary : HyperV daemons suite
URL : http://www.kernel.org
Licence : GPLv2
Description : Suite of daemons that are needed when Linux guest : is running on Windows Host with HyperV
yum install hyperv-daemons -y
systemctl enable hypervfcopyd systemctl enable hypervkvpd systemctl enable hypervvssd systemctl start hypervkvpd systemctl start hypervvssd systemctl start hypervfcopyd
[root@centos7 ~]# systemctl status hypervkvpd ● hypervkvpd.service - Hyper-V KVP daemon Loaded: loaded (/usr/lib/systemd/system/hypervkvpd.service; static; vendor preset: enabled) Active: active (running) since Wed 2017-07-26 02:37:30 CDT; 14s ago Main PID: 3478 (hypervkvpd) CGroup: /system.slice/hypervkvpd.service └─3478 /usr/sbin/hypervkvpd -n Jul 26 02:37:30 centos7 systemd[1]: Started Hyper-V KVP daemon. Jul 26 02:37:30 centos7 systemd[1]: Starting Hyper-V KVP daemon... Jul 26 02:37:30 centos7 KVP[3478]: KVP starting; pid is:3478 Jul 26 02:37:30 centos7 KVP[3478]: KVP LIC Version: 3.1 [root@centos7 ~]# systemctl status hypervvssd ● hypervvssd.service - Hyper-V VSS daemon Loaded: loaded (/usr/lib/systemd/system/hypervvssd.service; static; vendor preset: enabled) Active: active (running) since Wed 2017-07-26 02:37:30 CDT; 27s ago Main PID: 3485 (hypervvssd) CGroup: /system.slice/hypervvssd.service └─3485 /usr/sbin/hypervvssd -n Jul 26 02:37:30 centos7 systemd[1]: Started Hyper-V VSS daemon. Jul 26 02:37:30 centos7 systemd[1]: Starting Hyper-V VSS daemon... Jul 26 02:37:30 centos7 hypervvssd[3485]: Hyper-V VSS: VSS starting; pid is:3485 Jul 26 02:37:30 centos7 hypervvssd[3485]: Hyper-V VSS: VSS: kernel module version: 129 [root@centos7 ~]# systemctl status hypervfcopyd ● hypervfcopyd.service - Hyper-V FCOPY daemon Loaded: loaded (/usr/lib/systemd/system/hypervfcopyd.service; static; vendor preset: disabled) Active: active (running) since Wed 2017-07-26 02:37:30 CDT; 44s ago Main PID: 3492 (hypervfcopyd) CGroup: /system.slice/hypervfcopyd.service └─3492 /usr/sbin/hypervfcopyd -n Jul 26 02:37:30 centos7 systemd[1]: Started Hyper-V FCOPY daemon. Jul 26 02:37:30 centos7 systemd[1]: Starting Hyper-V FCOPY daemon... Jul 26 02:37:30 centos7 HV_FCOPY[3492]: starting; pid is:3492 Jul 26 02:37:30 centos7 HV_FCOPY[3492]: kernel module version: 1
As a result:
👁 Selection_999(413)
and in /var/log/messages
Jul 26 02:43:27 centos7 journal: Hyper-V VSS: VSS: op=FREEZE: succeeded Jul 26 02:39:25 centos7 systemd: Time has been changed Jul 26 02:39:25 centos7 journal: Hyper-V VSS: VSS: op=THAW: succeeded
Yes, we all „love” the way Microsoft gives us new stuff (like forced updates in Windows 10). As we usually know better what and when should be applied, let’s say it is time to upgrade our guest integration services to the latest version.
I usually express strong conviction that HV integration services should be kept up to date, the thing most sysadmins disregards. Those tools are responsible for keeping your VMs in shape, maintain communication between them and host services, so they SHOULD be always updates. Of course, as with almost everything TEST it before applying on any important environment.
As on 2016-12-31, the latest HV Integration Services version is 6.3.9600.18398
Let’s say – we would like to upgrade all our Windows machines (those BEFORE Windows 10 and Windows 2016) . We can do it manually (not cool, not cool at all), semi-automatic (no reboot) or almost … magical way – fully automatic 😉
Let’s start we have proper source added to Chocolatey:
choco source add -n=public -s"https://www.myget.org/F/public-choco" --priority=10
choco install hvintegrationservices -y
win_manage: chocolatey_packages: hvintegrationservices: ensure: 6.3.9600.18398 dsc_reboot: dsc_reboot: message: Machine requested a reboot when: pending
Written by marcinbojko
31 grudnia, 2016 at 15:14
Napisane w work
Tagged with chocolatey, foreman, hyper-v, hypervisor, virtualisation, windows, win_manage, wirtualizacja
On my lectures and meetings with both: IT and Management I’ve had a pleasure to be a myth buster about Hyper-V. As much as I don’t appreciate Microsoft’s ‚way of life’ – Hyper-V is mostly feared due to: lack of proper knowledge and very low quality support from Microsoft. Few most common myths are:
Written by marcinbojko
28 grudnia, 2016 at 17:12
Napisane w work
Tagged with hyper-v, hypervisor, linux, microsoft, virtualisation, windows
| Pon | W | Śr | Czw | Pt | S | N |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 |