Commit Graph

157 Commits

Author SHA1 Message Date
Wolfgang Bumiller
e6f497ea76 bump version to 0.7.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2025-04-08 17:19:44 +02:00
Wolfgang Bumiller
23e72a5c39 Merge version 2 of vCLS handling
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.
2025-04-08 17:18:25 +02:00
Daniel Herzig
d793cd1834 listvms: exclude VMs without datastore_name from manifest.json
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
2025-04-08 17:13:37 +02:00
Daniel Herzig
35308267cd listvms: exclude VMs without datastore_name from manifest.json.
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>
2025-04-08 10:44:31 +02:00
Thomas Lamprecht
fd97b5d38a bump version to 0.7.2
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-09-12 12:29:49 +02:00
Thomas Lamprecht
e4ea248348 cargo: update pico-args dependency to version 0.5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-09-12 12:29:49 +02:00
Daniel Kral
131824070d fix #5587: add support for older version of vmx storage filepaths
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>
2024-09-06 17:31:11 +02:00
Fabian Grünbichler
a05f1ee86c build: force debug symbols in release build
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>
2024-06-20 10:32:12 +02:00
Wolfgang Bumiller
e6334f92ae bump version to 0.7.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-06-07 13:26:13 +02:00
Dominik Csapak
88626c5430 improve error handling before mounting
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>
2024-06-07 13:18:21 +02:00
Wolfgang Bumiller
32772d404e fix --help output formatting
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>
2024-04-05 08:19:04 +02:00
Thomas Lamprecht
a407a22c5e bump version to 0.7.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-04 18:18:52 +02:00
Thomas Lamprecht
01e10b840e esxi: add help and version flags as long and short option
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>
2024-04-04 18:13:25 +02:00
Thomas Lamprecht
936f35152f version file: skip repo revision for now
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>
2024-04-04 18:05:02 +02:00
Wolfgang Bumiller
07e99acda3 add .version file to root of the fuse mount
containing 2 lines:
1) the cargo version as
2) the git commit hash

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-04-04 17:28:03 +02:00
Wolfgang Bumiller
6820bc1ff5 catch NotFound in handle_lookup explicitly
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>
2024-04-04 17:28:03 +02:00
Wolfgang Bumiller
722d868225 use send_replace on watch channels
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>
2024-04-04 17:28:03 +02:00
Wolfgang Bumiller
39350e691c use new InodeEntries for Datastores
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-04-04 17:28:03 +02:00
Wolfgang Bumiller
98a625e972 factor deduplicated entry lookup out of Dir
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-04-04 17:28:03 +02:00
Wolfgang Bumiller
d7d566bc7f refcount cache enable state
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>
2024-04-04 17:28:03 +02:00
Thomas Lamprecht
81a2fef39f bump version to 0.6.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-02 10:32:46 +02:00
Thomas Lamprecht
38602093f0 reformat let-else for better readability
`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>
2024-04-02 10:32:46 +02:00
Thomas Lamprecht
37f9b50ca1 update gitignore file
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-04-02 10:26:54 +02:00
Wolfgang Bumiller
676030c4be use session cookie to avoid generating a new one on each request
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-04-02 09:36:59 +02:00
Thomas Lamprecht
5337a0cbb7 bump version to 0.6.0
just to get the slightly more understandable (from user POV) changelog
update out

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 16:10:00 +01:00
Thomas Lamprecht
05d1c2cc3b d/changelog: expand and reword slightly
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-28 14:42:30 +01:00
Wolfgang Bumiller
8d35b4e3aa bump version to 0.5.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 13:45:21 +01:00
Wolfgang Bumiller
fe5382ec96 attempt to negotiate http2 protocol via alpn
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 13:21:43 +01:00
Wolfgang Bumiller
37e288655f bump d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 13:21:43 +01:00
Wolfgang Bumiller
7f20f7428f explicitly enable http2 in hyper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 13:21:43 +01:00
Wolfgang Bumiller
0a1c92d558 fix error message when not finding password-file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 13:21:43 +01:00
Wolfgang Bumiller
47c252c18f guard read requests so they cannot fail with ENOSYS
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 10:51:31 +01:00
Wolfgang Bumiller
7f170ec39e update help to show how to specify a port
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 10:40:26 +01:00
Wolfgang Bumiller
30c61e7d43 litvms: add --port parameter
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-28 10:33:27 +01:00
Wolfgang Bumiller
922534ccd4 update d/control
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-27 16:54:57 +01:00
Wolfgang Bumiller
6dd7bce923 clamp worker threads between 2 and 4 based on core count
via num_cpus

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-27 16:54:18 +01:00
Wolfgang Bumiller
5606270346 limit async runtime to 4 worker and 2 blocking threads
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>
2024-03-27 16:13:56 +01:00
Thomas Lamprecht
24fef09802 bump version to 0.5.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 15:20:41 +01:00
Wolfgang Bumiller
c532701af6 actually fail reads on http 500
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-27 14:57:37 +01:00
Wolfgang Bumiller
7f589f6040 limit to 4 concurrent requests and synchronize retry loops
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>
2024-03-27 14:45:42 +01:00
Thomas Lamprecht
72863f3044 bump version to 0.4.1
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 12:37:06 +01:00
Thomas Lamprecht
2a2f9ec931 esxi fuse: reduce log of retrying due to rate-limit to warn
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 12:36:35 +01:00
Thomas Lamprecht
e911e90824 bump version to 0.4.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 12:21:53 +01:00
Thomas Lamprecht
c2b9668dbb fix-up version tracked in cargo.toml
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 12:21:36 +01:00
Thomas Lamprecht
fff95895fd buildsys: skip checking build-dependencies for generating the DSC
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>
2024-03-27 12:19:05 +01:00
Thomas Lamprecht
251582b46a bump version to 0.4.0
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-03-27 12:13:14 +01:00
Max Carrara
9c9dc29835 listvms: remove unused import and unaccessed exception
Signed-off-by: Max Carrara <m.carrara@proxmox.com>
2024-03-27 11:44:52 +01:00
Wolfgang Bumiller
cd0243f9ea listvms.py: improve error message when password file is missing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-27 10:51:33 +01:00
Wolfgang Bumiller
c2ba7f04da listvms.py: improve error message for invalid credentials
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-27 10:45:48 +01:00
Wolfgang Bumiller
58ad9385d4 listvms.py: just print the errors as they are
they are unexpected by nature...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2024-03-27 10:45:19 +01:00