VirtualBox

Ticket #11862 (reopened enhancement)

Opened 22 months ago

Last modified 5 weeks ago

VirtualBox freezes on btrfs / add check for COW

Reported by: Cova Owned by:
Priority: major Component: other
Version: VirtualBox 4.2.12 Keywords: btrfs
Cc: Guest type: Windows
Host type: Linux

Description

On a linux machine with btrfs filesystem, installation of a guest goes just fine but at first restart the guest freezes with popup showing "20%" during launch phase. Installing the same machine on XFS, no problems at all. I've seen similar reports, but with slightly different behaviours and declared fixed. host machine: linux 3.9.5 x86_64 (gentoo) guests: W8/W7 64bit attached: vbox.log of failed session

Attachments

Win7-2013-06-11-21-00-15.log.gz Download (6.0 KB) - added by Cova 22 months ago.
Vbox.log

Change History

Changed 22 months ago by Cova

Vbox.log

comment:1 follow-up: ↓ 2 Changed 22 months ago by michael

Was this a one-time occurrence or is it reproducible?

comment:2 in reply to: ↑ 1 Changed 22 months ago by Cova

Replying to michael:

Was this a one-time occurrence or is it reproducible?

Happens every time, always reproducible.

I can add that I tested both packages available on gentoo (one built from sources, the other using binary from virtualbox site) and the behaviour is the same.

comment:3 Changed 21 months ago by Ufven

I'm experiencing the same issue running Fedora 19 and btrfs. However, if I enable "Use host I/O cache" on the VM's SATA controller, the problem goes away.

comment:4 Changed 21 months ago by frank

In that case I assume that there is some problem when opening files with O_DIRECT on btrfs. We saw such problems with EXT4 and XFS before with older Linux kernels.

comment:5 Changed 21 months ago by Cova

After some day, I'm no longer able to reproduce the issue. I don't know if this is relevant, as I've got no time to check kernels changelog, but I changed kernel and now I'm running on 3.10 and I'm not able to reproduce the same behaviour.

comment:6 Changed 21 months ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Thanks, let's close this ticket then.

comment:7 Changed 5 months ago by zerolagtime

I experienced this same problem on BTRFS with Ubuntu Trusty (14.04) on the 3.13.0 kernel and btrfs-tools 3.12. During any virtual machine operation, the system would thrash the disk very badly. Eventually, it would get so bad that the whole system would freeze.

I did some digging on the btrfs wiki and discovered that Copy-On-Write (COW) causes this pain for any virtualization solution ( https://wiki.archlinux.org/index.php/Btrfs#Copy-On-Write_.28CoW.29). All I did was go to the location of every VDI and type chattr +C file.vdi and on the whole directory. The VM was powered off while I did this.

During the next boot, it was quite fast and the thrashing was gone.

Now, I also took the advice from above and also marked it to use the hosts I/O cache, but that didn't fix it.

comment:8 Changed 5 months ago by zerolagtime

  • Status changed from closed to reopened
  • Resolution fixed deleted

Please add a check when opening a virtual machine image under Linux. If any images are stored on a BTRFS filesystem, and the COW flag is not activated, put up a warning flag that a file system flag may severely degrade performance. Offer to suspend the system, change the attribute on all applicable files, and then resume the system.

This applied even under VirtualBox 4.3.18.

comment:9 Changed 5 months ago by frank

  • Type changed from defect to enhancement
  • Summary changed from virtualbox 4.2.12 r84980 freezes on btrfs (linux kernel 3.9.5) to VirtualBox freezes on btrfs / add check for COW

I think this check makes sense. Actually a feature request...

comment:10 Changed 5 weeks ago by krichter

little update on the symptoms on a Linux 3.19 host with 4.3.20 and 4.3.22: after moving the VM folder from one btrfs filesystem to another (btrfs) the hang moves to a point in time after boot, i.e. the starting of the VM succeeds, but then the guest boot hangs.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use