From owner-freebsd-emulation@FreeBSD.ORG Fri Nov 16 19:28:44 2012 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A722A600 for ; Fri, 16 Nov 2012 19:28:44 +0000 (UTC) (envelope-from alexclear@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 758188FC08 for ; Fri, 16 Nov 2012 19:28:44 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id wz12so2293513pbc.13 for ; Fri, 16 Nov 2012 11:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fZ+xdJ4rB7nXxBf1jMaWojZ6/+A9YNCeU5HOjMxWK3o=; b=s62clGK0Hn5gbxhZNngFkMUZ2sN9Zs2NgbZ76NkixIAo7YiCTdv2Tyrc3Tyi4QV/Xy LxBu37eSECFqewh2s7EejqvKV1KzdcSNfXSAdfHa0g8xqigyEDlNPvscfieoOv0ZR9Pd 9zFla7R/A1NmGOLYcMSYPj1UzY9uICnywkPzGTSkr05ROK7jtk8fgUMW7pqrYm1eisqS 05WYYz9CgsLIlkIGdtL2w+UVt9ypLgVWKwV71ye4A1BJL9A4TUU1B7/3w/FBSlS259OU 9bcg16bFZRj2vEejCccQWUnEJAiw/+ZjXwKSHg5GJ4Qs6hx9sbwX0jP2TdfaT+PUrW2f KH3Q== MIME-Version: 1.0 Received: by 10.68.237.6 with SMTP id uy6mr17666942pbc.147.1353094123948; Fri, 16 Nov 2012 11:28:43 -0800 (PST) Received: by 10.66.227.166 with HTTP; Fri, 16 Nov 2012 11:28:43 -0800 (PST) In-Reply-To: <50A67D9F.8040505@wp.pl> References: <50A67D9F.8040505@wp.pl> Date: Fri, 16 Nov 2012 22:28:43 +0300 Message-ID: Subject: Re: VirtualBox 4.1.22 on FreeBSD 9.0-RELEASE problem: VBoxHeadless eats 100% CPU From: Alex Chistyakov To: Marek Salwerowicz Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-emulation@freebsd.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Nov 2012 19:28:44 -0000 On Fri, Nov 16, 2012 at 9:53 PM, Marek Salwerowicz wrote: > W dniu 2012-11-16 16:22, Alex Chistyakov pisze: > >> Hello, >> >> My system is an amd64 box running FreeBSD 9.0-RELEASE on top of ZFS. >> I try to setup a VirtualBox VM from an Ubuntu 12.04 Server >> installation CD in a headless mode using VNC. >> Top shows that VBoxHeadless process consumes 100% CPU almost all the >> time and it takes forever to boot from the CD image: >> >> PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU >> COMMAND >> 1652 vbox 19 22 0 358M 170M IPRT S 3 7:18 100.00% >> VBoxHeadless >> >> I get lots of repeating "ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 >> },0x0) = 0 (0x0)" lines every time I try to run truss on the running >> VBoxHeadless process, like this: >> >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> ioctl(7,0x200056c1 { IO 0x56('V'), 193, 0 },0x0) = 0 (0x0) >> >> and it looks like this system call prevails in truss stats: >> >> [root@ci ~]# wc -l truss.vbox.log >> 1174962 truss.vbox.log >> [root@ci ~]# cat truss.vbox.log | grep 'ioctl(7,0x200056c1' | wc -l >> 1013997 >> [root@ci ~]# >> >> FD 7 is /dev/vboxdrv0, does this indicate a problem in communicating >> with a kernel VirtualBox driver? >> What should I do to resolve this situation? > > Could you write down the VBoxManage commands you use to create the VM ? Yeah sure: VBoxManage createhd --filename "st11.vdi" --size 30000 VBoxManage createvm --name Stage11 --ostype Ubuntu_64 --register VBoxManage modifyvm Stage11 --memory 1024 --boot1 dvd --nic1 bridged --bridgeadapter1 em0 VBoxManage storagectl Stage11 --name "SATA Controller" --add sata --controller IntelAHCI --hostiocache on VBoxManage storageattach Stage11 --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "st11.vdi" VBoxManage storagectl Stage11 --name "IDE Controller" --add ide --controller PIIX4 VBoxManage storageattach Stage11 --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium ~/ubuntu-12.10-server-amd64.iso > And post the VBoxManage showvminfo VM_NAME output. [vbox@ci /usr/home/vbox]$ VBoxManage showvminfo Stage11 Name: Stage11 Guest OS: Ubuntu (64 bit) UUID: 9525da0b-1d93-4ab4-bcb2-df038f63d780 Config file: /home/vbox/VirtualBox VMs/Stage11/Stage11.vbox Snapshot folder: /home/vbox/VirtualBox VMs/Stage11/Snapshots Log folder: /home/vbox/VirtualBox VMs/Stage11/Logs Hardware UUID: 9525da0b-1d93-4ab4-bcb2-df038f63d780 Memory size: 1024MB Page Fusion: off VRAM size: 8MB CPU exec cap: 100% HPET: off Chipset: piix3 Firmware: BIOS Number of CPUs: 1 Synthetic Cpu: off CPUID overrides: None Boot menu mode: message and menu Boot Device (1): DVD Boot Device (2): DVD Boot Device (3): HardDisk Boot Device (4): Not Assigned ACPI: on IOAPIC: on PAE: on Time offset: 0 ms RTC: local time Hardw. virt.ext: on Hardw. virt.ext exclusive: on Nested Paging: on Large Pages: on VT-x VPID: on State: running (since 2012-11-16T15:11:48.223000000) Monitor count: 1 3D Acceleration: off 2D Video Acceleration: off Teleporter Enabled: off Teleporter Port: 0 Teleporter Address: Teleporter Password: Storage Controller Name (0): SATA Controller Storage Controller Type (0): IntelAhci Storage Controller Instance Number (0): 0 Storage Controller Max Port Count (0): 30 Storage Controller Port Count (0): 30 Storage Controller Bootable (0): on Storage Controller Name (1): IDE Controller Storage Controller Type (1): PIIX4 Storage Controller Instance Number (1): 0 Storage Controller Max Port Count (1): 2 Storage Controller Port Count (1): 2 Storage Controller Bootable (1): on SATA Controller (0, 0): /usr/home/vbox/st11.vdi (UUID: 010dcaaa-9609-4022-8f8a-fe65d2954e5a) IDE Controller (0, 0): /home/vbox/ubuntu-12.10-server-amd64.iso (UUID: 8d9d5af9-341e-47c6-8b8f-943c4bcc350d) NIC 1: MAC: 080027BE852C, Attachment: Bridged Interface 'em0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny NIC 2: disabled NIC 3: disabled NIC 4: disabled NIC 5: disabled NIC 6: disabled NIC 7: disabled NIC 8: disabled Pointing Device: PS/2 Mouse Keyboard Device: PS/2 Keyboard UART 1: disabled UART 2: disabled Audio: disabled Clipboard Mode: disabled Video mode: 800x600x16 VRDE: enabled (Address 0.0.0.0, Ports 3389, MultiConn: off, ReuseSingleConn: off, Authentication type: null) Video redirection: disabled USB: disabled USB Device Filters: Available remote USB devices: Currently Attached USB Devices: Shared folders: VRDE Connection: not active Clients so far: 0 Guest: Configured memory balloon size: 0 MB OS type: Ubuntu_64 Additions run level: 0 Guest Facilities: No active facilities. BTW I've tried to disable nested pages, IOAPIC and ACPI but to no avail. > What is your hardware? Core i7-3930K on Intel DX79TO w/64 Gb RAM, ST33000651AS and ST3000DM001 HDDs Thank you! -- SY, Alex