Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lxc export to stdout doesn't work with VM instances #13967

Closed
simondeziel opened this issue Aug 22, 2024 · 0 comments · Fixed by #14129
Closed

lxc export to stdout doesn't work with VM instances #13967

simondeziel opened this issue Aug 22, 2024 · 0 comments · Fixed by #14129
Assignees
Labels
Bug Confirmed to be a bug
Milestone

Comments

@simondeziel
Copy link
Member

simondeziel commented Aug 22, 2024

Initial setup:

$ lxc init images:alpine/edge v1 -c security.secureboot=false --vm
$ lxc init images:alpine/edge c1

lxc export to stdout doesn't work for VM instances:

$ lxc export v1 --compression=none - | tar -t backup/virtual-machine.img
tar: This does not look like a tar archive
tar: Skipping to next header
tar: backup/virtual-machine.img: Not found in archive
tar: Exiting with failure status due to previous errors

but works for containers:

$ lxc export c1 --compression=none - | tar -t backup/container/templates
backup/container/templates
backup/container/templates/hostname.tpl
backup/container/templates/hosts.tpl
backup/container/templates/inittab.tpl

It seems that for VMs, the exported stream isn't a tar file:

$ lxc export v1 --compression=none - | file -
/dev/stdin: data

$ lxc export c1 --compression=none - | file -
/dev/stdin: POSIX tar archive

Update: here's a workaround found after the bug fix was merged: add --quiet when exporting the VM:

$ lxc export v1 --quiet --compression=none - | tar -t backup/virtual-machine.img
backup/virtual-machine.img
@simondeziel simondeziel changed the title lxc export **to stdout** doesn't work with VM instances lxc export to stdout doesn't work with VM instances Aug 22, 2024
@tomponline tomponline added this to the lxd-6.2 milestone Sep 3, 2024
@tomponline tomponline added the Bug Confirmed to be a bug label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed to be a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants