hello and thanks - Case #05091340,
i am having issues running
* windows 11.21H2 os build 22000.282
* wsl2 running Ubuntu 20.04.3 LTS 64 bit
* vagent for linux - 5.0.1.4493 running on ubuntu inside wsl2
i understand this is a new setup, and i do not expect veeam to fully support it at this time.
as this is going to become a popular use-case, i am glad to help you get this working for fellow veeamers.
the issue are detailed in the case with logs and screenshots.
* while vagent can connect to the VBAR - veeam backup and replication server, the list of repositories are blank.
* when try to backup to a SMB share, the backup job fails
* cannot create a recovery image
-
- Expert
- Posts: 121
- Liked: 24 times
- Joined: Sep 30, 2018 9:03 pm
- Contact:
-
- Product Manager
- Posts: 6551
- Liked: 765 times
- Joined: May 19, 2015 1:46 pm
- Contact:
Re: vagent on wsl2 on windows 11
Hi,
A couple of questions:
1) What's the use-case?
2) What's wrong with using wsl 'export' feature? Why would you need an image-based backup for Linux running in wsl environment?
Thanks!
A couple of questions:
1) What's the use-case?
2) What's wrong with using wsl 'export' feature? Why would you need an image-based backup for Linux running in wsl environment?
Thanks!
-
- Expert
- Posts: 121
- Liked: 24 times
- Joined: Sep 30, 2018 9:03 pm
- Contact:
Re: vagent on wsl2 on windows 11
hi,
1) use vagent to backup to a VBAR as with any other vm running on hyperv.
2) wsl --export is a full backup over 6GiB. vagent is incremental using CBT.
with multiple distros running on wsl, the daily backups would be huge.
about the image-based backup, same as with any vm:
--- the ability to recover the vm to a point in time
--- recover an older copy of a file
the point is that today, wsl is no longer just a toy to play with.
it is used in production to design and test projects.
wsl2g should consume a license like any other vm
thanks much.
1) use vagent to backup to a VBAR as with any other vm running on hyperv.
2) wsl --export is a full backup over 6GiB. vagent is incremental using CBT.
with multiple distros running on wsl, the daily backups would be huge.
about the image-based backup, same as with any vm:
--- the ability to recover the vm to a point in time
--- recover an older copy of a file
the point is that today, wsl is no longer just a toy to play with.
it is used in production to design and test projects.
wsl2g should consume a license like any other vm
thanks much.
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: vagent on wsl2 on windows 11
As its name implies, Windows Subsystem for Linux is not a full and proper Linux system, it's still a subsystem, i.e. it's not just a straight VM running Linux, it still has some significant differences, even if WSL2 is a lot closer to a full and normal VM experience. Just a couple of examples:
1) The Linux kernel provided by WSL2 is not the same kernel used by the native distribution. Because of this the OS repositories do not include the required packages to build kernel modules for the WSL2 kernel (specifically, the correct kernel-headers package) so it's not possible to build veeamsnap against the kernel. The default WSL2 kernel has all required modules compiled in statically, and, as far as I can find, there's no kernel-headers package available. Now, with WSL2, it's completely possible to build your own kernel, and to enable modules support in that, there are several sites with instructions to do that. If you follow these steps you can build veeamsnap with DKMS on WSL2 just fine. Otherwise, you can use veeam-nosnap for file level backups with VAL.
2) There's no proper init system in WSL (either v1 or v2). VAL depends on veeamservice, which is normally started by systemd. If you want to run proper services in WSL2 you have to either start them up manually with scripts or use something like genie to get systemd running so you can use actual services (I use this, it works very well). Without a fully init system using WSL2 is basically like booting Linux in single user mode, without services, which still makes sense pretty much only for development.
However, if you do build your own kernel and configure genie to act as an init system, VAL seems to work just fine in WSL2. If you use the veeam-nosnap package to backup home directories or other file level data in WSL, then you don't even need to worry about step 1.
That being said, if you really just want image backup to have a way to roll back the WSL2 VM, I think the best way to backup WSL2 is to just backup the Windows host. Basically, WSL2 just uses a VHDX in %USERPROFILE%\AppData\Local\Packages and, if you want to do an image restore of a prior WSL2, you can just shutdown WSL, restore the VHDX using FLR from Windows agent, and start up WSL2. Also, most of your files should probably be in the Windows filesystem anyway.
1) The Linux kernel provided by WSL2 is not the same kernel used by the native distribution. Because of this the OS repositories do not include the required packages to build kernel modules for the WSL2 kernel (specifically, the correct kernel-headers package) so it's not possible to build veeamsnap against the kernel. The default WSL2 kernel has all required modules compiled in statically, and, as far as I can find, there's no kernel-headers package available. Now, with WSL2, it's completely possible to build your own kernel, and to enable modules support in that, there are several sites with instructions to do that. If you follow these steps you can build veeamsnap with DKMS on WSL2 just fine. Otherwise, you can use veeam-nosnap for file level backups with VAL.
2) There's no proper init system in WSL (either v1 or v2). VAL depends on veeamservice, which is normally started by systemd. If you want to run proper services in WSL2 you have to either start them up manually with scripts or use something like genie to get systemd running so you can use actual services (I use this, it works very well). Without a fully init system using WSL2 is basically like booting Linux in single user mode, without services, which still makes sense pretty much only for development.
However, if you do build your own kernel and configure genie to act as an init system, VAL seems to work just fine in WSL2. If you use the veeam-nosnap package to backup home directories or other file level data in WSL, then you don't even need to worry about step 1.
That being said, if you really just want image backup to have a way to roll back the WSL2 VM, I think the best way to backup WSL2 is to just backup the Windows host. Basically, WSL2 just uses a VHDX in %USERPROFILE%\AppData\Local\Packages and, if you want to do an image restore of a prior WSL2, you can just shutdown WSL, restore the VHDX using FLR from Windows agent, and start up WSL2. Also, most of your files should probably be in the Windows filesystem anyway.
Who is online
Users browsing this forum: No registered users and 7 guests