Ubuntu 16.04 guest is started in more then 3 minutes

Discussions about using Linux guests in VirtualBox.
Post Reply
nagyt234
Posts: 3
Joined: 27. Mar 2017, 17:59

Ubuntu 16.04 guest is started in more then 3 minutes

Post by nagyt234 »

I have a powerful Ubuntu 16.04 LTS host machine (Intel Xeon E5504, 8core, 32 GB RAM, 512 GB SSD, 3,6 TB HD) and I'm using Vagrant with VirtualBox 5.1.18. Starting of the virtual machine, which is a very basic Ubuntu 16.04 LTS, takes more than 3 minutes. The output of systemd-analyze blame:

Code: Select all

         22.286s dev-sda1.device
         16.472s systemd-remount-fs.service
         14.675s resolvconf.service
         14.440s keyboard-setup.service
         14.093s run-rpc_pipefs.mount
         13.031s dev-hugepages.mount
         11.692s systemd-modules-load.service
          7.430s dev-mqueue.mount
          6.910s sys-kernel-debug.mount
          6.285s kmod-static-nodes.service
          4.547s ufw.service
          4.427s lvm2-monitor.service
          4.298s systemd-journald.service
          2.918s cloud-init-local.service
          2.274s iscsid.service
          2.235s open-iscsi.service
          1.945s mdadm.service
          1.872s accounts-daemon.service
          1.781s vboxadd.service
          1.604s rsyslog.service
          1.599s systemd-logind.service
          1.331s apparmor.service
          1.304s rc-local.service
          1.240s vboxadd-x11.service
          1.235s snapd.autoimport.service
          1.151s cloud-config.service
          1.124s snapd.socket
          1.096s systemd-udev-trigger.service
           968ms cloud-init.service
           869ms grub-common.service
           842ms systemd-journal-flush.service
           824ms setvtrgb.service
           816ms networking.service
           781ms plymouth-read-write.service
           752ms systemd-tmpfiles-setup.service
           751ms cloud-final.service
           746ms ssh.service
           695ms systemd-sysctl.service
           664ms apport.service
           656ms irqbalance.service
           651ms systemd-tmpfiles-setup-dev.service
           611ms systemd-random-seed.service
           554ms polkitd.service
           534ms nfs-config.service
           511ms ondemand.service
           497ms virtualbox-guest-utils.service
           449ms lxd-containers.service
           445ms systemd-update-utmp-runlevel.service
           426ms console-setup.service
           344ms sys-fs-fuse-connections.mount
           274ms systemd-update-utmp.service
           260ms plymouth-quit.service
           235ms plymouth-quit-wait.service
           201ms systemd-user-sessions.service
            96ms systemd-udevd.service
            72ms systemd-tmpfiles-clean.service
            71ms vboxadd-service.service
            48ms user@1000.service
             7ms lxd.socket
What can be wrong?
Last edited by socratis on 27. Mar 2017, 18:29, edited 1 time in total.
Reason: Enclosed the information in [code] tag for better readability
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu 16.04 guest is started in more then 3 minutes

Post by Perryg »

What happens if you start the guest without vagrant ( which we don’t support )?
Post the guests log file ( as an attachment ). Right click on the guest in the Main Manager then click show log. Save and post as an attachment. Compress if it is too large to post.
nagyt234
Posts: 3
Joined: 27. Mar 2017, 17:59

Re: Ubuntu 16.04 guest is started in more then 3 minutes

Post by nagyt234 »

I've attached the guest log file. Very suspicious that between 00:00:05.622295 and 00:00:45.365276, furthermore between 00:00:48.927996 and 00:02:08.593907 nothing happens. Is it probably a Xenial issue?
Attachments
VBox.log
(64.94 KiB) Downloaded 16 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Ubuntu 16.04 guest is started in more then 3 minutes

Post by socratis »

Some things that are wrong in your setup:
00:00:00.097409 Guest OS type: 'Linux26_64'
00:00:00.271093   VBoxInternal2/SharedFoldersEnableSymlinksCreate/vagrant="1"
00:00:00.272496 [/Devices/lsilogicscsi/0/LUN#0/AttachedDriver/Config/] (level 6)
00:00:00.272499   BlockCache <integer> = 0x0000000000000001 (1)
00:00:00.272501   Format     <string>  = "VDI" (cb=4)
00:00:00.272502   Mountable  <integer> = 0x0000000000000000 (0)
00:00:00.272504   Path       <string>  = "/home/vagrant/VirtualBox VMs/zg2t1/clone-disk1.vdi" (cb=51)
00:00:00.272506   Type       <string>  = "HardDisk" (cb=9)
00:00:00.272507   UseNewIo   <integer> = 0x0000000000000001 (1)
00:00:00.374770 ALSA: Failed to open "default" as output device: No such file or directory
00:00:00.374832 AC97: Falling back to NULL backend (no sound audible)
00:03:04.329163 VMMDev: Guest Additions information report: Version 5.0.18 r106667 '5.0.18_Ubuntu'
As Perryg said, and I'd like to take it one step further:
  • What happens if you create a guest from scratch in VirtualBox without using Vagrant at all and accepting the VirtualBox template proposed defaults?
 Edit: For future reference, you should completely shut down the VM before grabbing the VBox.log. Then ZIP it before attaching it to your response. 
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Ubuntu 16.04 guest is started in more then 3 minutes

Post by Perryg »

00:00:47.628429 APIC0: Switched mode to x2APIC
00:00:48.927996 PIT: mode=0 count=0x10000 (65536) - 18.20 Hz (ch=0)
00:02:08.593907 NAT: Link up
00:02:17.089374 LsiLogic#0: 2/0 (Bus/Target) doesn't exist
Almost a minute and a half to get from step to step. Indicates something is looking for a positive reply and not getting it.
00:02:17.095713 LsiLogic#0: Guest issued CDB {0x12, 0x0, 0x0, 0x0, 0x24, 0x0}
00:03:04.329163 VMMDev: Guest Additions information report: Version 5.0.18 r106667 '5.0.18_Ubuntu'
Same thing here, close to a minute between steps.

I have never seen this before and I read a lot of logs. vagrant does use their own scripts to facilitate boots and since I don't use it I have no clue what to tell you other than I would like to see what happens if you do not use vagrant.

I know you should not be using alsa audio for Ubuntu and that could be one thing wrong. Why are you using vagrant and why a pre-built guest? Is it a requirement?
JEBjames
Posts: 58
Joined: 26. Jan 2017, 18:27
Primary OS: MS Windows other
VBox Version: OSE other
Guest OSses: Centos, Ubuntu, Debian, Various Windows
Contact:

Re: Ubuntu 16.04 guest is started in more then 3 minutes

Post by JEBjames »

I've had problems with network connectivity (and disk inaccessible) at boot up on Ubuntu 16.04 using Virtualbox (no vagrant).

Most services wait for the network to come up so this can delay the boot up.

I'm not sure if this is an Ubuntu, VirtualBox or some glitch with my host os (windows 10).

Do you see the slow downs every boot, or just intermittently? For me, if I power the vm off and then on again it seems to fix itself for a while.
Post Reply