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:
Cole Robinson 2011-06-02 15:25:21 -04:00
parent 4fb706a5a7
commit f9e8d6a065

View File

@ -785,6 +785,13 @@ static int lxcContainerChild( void *data )
if (lxcContainerSetupMounts(vmDef, root) < 0)
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 */
if (lxcContainerWaitForContinue(argv->monitor) < 0) {
virReportSystemError(errno, "%s",