-
Notifications
You must be signed in to change notification settings - Fork 13
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
virter vm commit error: "cannot open /etc/machine-id for writing: Permission denied" #29
Comments
Hmmm... I wonder if the issue might be that when I ran |
What do you think about this: if this line fails, retry with // Starting the VM creates a machine ID.
// We want these IDs to be unique, so reset to empty.
err = v.VMExecShell(
ctx, []string{vmName},
&ProvisionShellStep{Script: "truncate -c -s 0 /etc/machine-id"})
if err != nil {
err = v.VMExecShell(
ctx, []string{vmName},
&ProvisionShellStep{Script: "sudo truncate -c -s 0 /etc/machine-id"})
if err != nil {
return err
}
} |
Sounds like a plausible explanation. The The simplest solution is just to create the VM without the You could also do the
That's a change we could consider, yes. |
…iving up (LINBIT#29). Also, fix a spelling error in the help messages.
Thanks for the explanation. I'll prepare a PR for my suggested change. |
… 'sudo' before giving up If 'truncate' fails for /etc/machine-id, attempt with 'sudo' before giving up (#29). Also, fix a spelling error in the help messages.
Fixed by #31. |
Apologies if I'm missing something, I can't really find any examples or documentation on this.
I have a virter VM provisioned and running that I'd like to commit to an image. According to the
virter vm commit --help
the syntax should be:However, when I attempt this:
This is a debian-12 based image.
The text was updated successfully, but these errors were encountered: