The original version of this patch was accidentally pushed out.
This merge commit fully resolves to the 2nd version, which is just
additional changes on top of the previous code anyway.
On newer ESXI-8x versions, the diskless vCLS machines in an
ESXI-cluster are not stored on a datastore anymore.
Instead, they are placed under `/var/run/crx` on the ESXI-hosts'
filesystem. This can lead to issues with the ESXI-storage not being
activated on the PVE-side [0].
This commit prevents these machines from being included in `manifest.json`.
It also excludes VMs without a datastore string in its configuration.
[0] https://forum.proxmox.com/threads/new-import-wizard-available-for-migrating-vmware-esxi-based-virtual-machines.144023/post-759288
On newer ESXI-8.x.y versions, the diskless vCLS machines in an
ESXI-cluster are not stored on a datastore anymore.
Instead, they are placed under `/var/run/crx` on the ESXI-hosts'
filesystem. This can lead to issues with the ESXI-storage not being
activated on the PVE-side [0].
This commit changes the default behaviour of `manifest.json` creation by
excluding any machine that has an empty datastore-string in its config
and by that prevents querying a file that we cannot reach anyway.
[0] https://forum.proxmox.com/threads/new-import-wizard-available-for-migrating-vmware-esxi-based-virtual-machines.144023/post-759288
Signed-off-by: Daniel Herzig <d.herzig@proxmox.com>
Allow the ESXi storage disk entry property "fileName" to be flatcased
("filename") in addition to being camelcased ("fileName"). This adds
compatibility with older ESXi .vmx configuration files.
Signed-off-by: Daniel Kral <d.kral@proxmox.com>
they then get stripped into their own package anyway, but without this we don't
get debug symbols at all with rustc >= 1.77
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
when we fail early in the mount process, we did not log any error to the
syslog, but only the top most one to stderr.
sadly we were not able to see them anywhere, so improve the log by
* log the complete error chain with log::error (so we also can see the
causes)
* add more context hints
This can help debug issues where we failed early and could not see any
error output otherwise, e.g. this thread in the forum:
https://forum.proxmox.com/threads/146248/
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
For the sake of having the string indented, we use
backslash-line-continuations, but they swallow up all the spaces at
the beginning of the next line, so we use `\n \` explicitly with
spaces between the newline and the line-continuation to introduce the
indentation in the output.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
even though this is in libexec and not meant for direct use it can be
still useful to get the version of the installed file to compare with
the one of a mounted FS, or to get the help output if one is testing
something manually.
So add the classic -v or --version and the -h or --help flags,
respectively.
Any of those will cause an early (successful) exit.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The current git revision is not exposed by cargo, so we'd need a
build.rs script to get this, like we do in PBS (well in a sub-crate to
avoid frequent costly rebuilds). For now that's not worth it, having
the version exposed is enough to see if the mount is old.
And do not concat the three version atoms manually, we can use the
CARGO_PKG_VERSION environment variable.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
this is currently not produced, but better safe than sorry, since we
do have NotFound as well as Errno(ENOENT) meaning the same thing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
To avoid errors about closed channels, as we'd then keep a receiver
without a sender in the active-lookup tables.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Otherwise, if the kernel has multiple `Open` requests for a file, a
`Release` request will disable the cache for all of them. This was
not a problem without Open/Release, as Lookups aren't dropped as long
as any references are around...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
`cargo fmt` still mostly ignores let-else, so format it manually in
how most examples use it, with the just the inside of the else branch
block on a new, indented line. As otherwise, with no indentation
change between the assignment and the else in a new line it reads like
being two separate statements.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
like we do for the qemu backup drivers, instead of having tokio just
spawn as many as there are cores, which is excessive...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
this is a very simple variant with a semaphore for the concurrent
requests and a mutex for the retry loop...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
allows to build a DSC that is then further used via sbuild, or the
like, without having to install all build-dependencies on the host one
is connected to.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>