-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Invoke virt-v2v-in-place on host (5.21-edge) (#538)
From #510 This is required for conversion option `virtio` which failed the tests for 5.21-edge in canonical/lxd-ci#274.
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
CMD="virt-v2v-in-place" | ||
|
||
unset XDG_RUNTIME_DIR | ||
unset LD_LIBRARY_PATH | ||
|
||
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | ||
|
||
if [ "$(id -u)" = "0" ]; then | ||
exec nsenter -t 1 -m "${CMD}" "$@" | ||
fi | ||
|
||
exec unshare -U -r --root="/var/lib/snapd/hostfs/" "${CMD}" "$@" |