mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
lxc: Ensure container <init> actually exists
Since we can't really get useful error reporting from virCommandExec since it needs to be the last thing we do.
This commit is contained in:
parent
4fb706a5a7
commit
f9e8d6a065
@ -785,6 +785,13 @@ static int lxcContainerChild( void *data )
|
|||||||
if (lxcContainerSetupMounts(vmDef, root) < 0)
|
if (lxcContainerSetupMounts(vmDef, root) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (!virFileExists(vmDef->os.init)) {
|
||||||
|
virReportSystemError(errno,
|
||||||
|
_("cannot find init path '%s' relative to container root"),
|
||||||
|
vmDef->os.init);
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
/* Wait for interface devices to show up */
|
/* Wait for interface devices to show up */
|
||||||
if (lxcContainerWaitForContinue(argv->monitor) < 0) {
|
if (lxcContainerWaitForContinue(argv->monitor) < 0) {
|
||||||
virReportSystemError(errno, "%s",
|
virReportSystemError(errno, "%s",
|
||||||
|
Loading…
Reference in New Issue
Block a user