VM fails to build because mkfs.ext4 can't find the loopback file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VMBuilder |
New
|
Undecided
|
Unassigned |
Bug Description
This is what happens at random when I try to create a VM, sometimes it works, sometimes it doesn't.
2014-03-21 23:37:25,245 INFO : Cleaning up
2014-03-21 23:37:28,259 ERROR : Process (['mkfs.ext4', '-F', '/dev/mapper/
mkfs.ext4: No such file or directory while trying to determine filesystem size
Traceback (most recent call last):
File "/usr/bin/
cli.main()
File "/usr/lib64/
hypervisor.
File "/usr/lib64/
self.
File "/usr/lib64/
call_
File "/usr/lib64/
getattr(
File "/usr/lib64/
disk.mkfs()
File "/usr/lib64/
part.mkfs()
File "/usr/lib64/
self.fs.mkfs()
File "/usr/lib64/
run_cmd(*cmd)
File "/usr/lib64/
raise VMBuilderException, "Process (%s) returned %d. stdout: %s, stderr: %s" % (args.__repr__(), status, mystdout.buf, mystderr.buf)
VMBuilder.
mkfs.ext4: No such file or directory while trying to determine filesystem size
This is on a Gentoo system. I could see the device nodes being made correctly so my guess is that they sometimes are just not created fast enough by udev before the script proceeds.
I fixed this (I think, works so far) by adding this in disk.py at the end of the map_partitions function:
# Give udev a chance to create nodes