Page 1 of 2

Windows 7 guest initial boot very slow.

Posted: 30. Mar 2016, 23:13
by Zorba
Hi,

Hope someone can help me here, I've been tinkering with VB for a while now trying out different OS's and what not, till recently I decided to clone my physical machine
using Clonezilla and virtualise it. Followed a couple preparation steps and all went well, except that, always when I first start the VM it's really slow in reading/loading the vdi. But if I shut it down and restart a couple of times it gets quicker each time and things seem like they should.

But then if I shut down everything and reboot the physical machine it's back to square one again. None of my other VM's exhibit this behaviour.

Things to note (not sure if it makes any difference tho) - on the physical machine the OS was on a SSD and now the Vdi resides on a platter type hard disk.

I did a defrag on the vdi but it wasn't that bad anyway - hasn't made any difference.

I have installed windows directly into a virtual machine and it runs very smoothly every time no probs. My machine is an Ivybridge with 16 GB of memory.

I've optimised the registry uninstalled unnecessary apps, devices, junk. nothing seems to change this behaviour, it is strange.

Please help!

Thanks!


Oh yeah, I've attached a copy of the Vm and it's log. TX!

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 17:17
by Zorba
I don't know? nothing I change in the guest windows seems to matter..

Followed as many changes in below link but no joy.

(support.userful. com / Manuals / Station_Mapping / Virtual_Machine / Optimizing_Windows_Virtual_Machines)

Won't let me post links..?

It's something to do with Virtualbox and how it reads the Vdi and every subsequent time there after. Like it has it's own virtual memory but when you shut it down
it all goes away and isn't stored in the Vdi?

Unfortunately I have no idea what to look for in the log to identify issues, I'd be grateful if someone who does, could cast their critical eye over it.
Here's a new one attached.

Thanks!

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 18:00
by Perryg
What exactly is G: drive?

Try removing the share and see what happens

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 18:30
by Zorba
@Perryg

Hi! Thanks for looking in.

I have 2 disks on my host machine one is the C: drive which is an ssd, and the other is a 2T Disk which is divided up F G H and I

G: is where I store all my data, VM's and Vdi's and a bunch of other things not related.

Turning off shared folder to G had no effect. :(

Thanks anyway! :)

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 19:03
by Perryg
Not sure what your real issue is but I do know that it takes a long time for a new install of Windows to settle down due to indexing and update checks. Some have suggested that you leave the guest run for 12 to 24 hours so it can finish all of its checks.

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 19:41
by Zorba
This is a cloned, from physical, fully updated windows 7 turned into a virtual machine. Indexing is turned off.

The problem, When I start the windows 7 VM for the first time, after a reboot of the host machine, it's taking ages to read the VDI and when I start a program
inside the VM, it takes ages to load for the first time, or anything opened for the first time for that matter takes ages..

But when I shut down the VM and re start it again, it gets quicker, and the things that I had previously opened, open quicker. But when I reboot the host machine it back to square one again. everything takes an age to load.

It's almost like there's a cap imposed on I/O of the VDI being read for the first time, but it has memory of that previous activity but when I shut down the host and load the VM it's back to being really slow to read the VDI again..

I have other VM's installed, including another Windows 7 which was installed directly into Virtualbox and they don't exhibit this behaviour, they all run perfect.

So something in the cloned version of windows 7 is not meshing correctly with Virtualbox?

Does the log show anything out of the ordinary?

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 19:55
by Perryg
Just to clarify something here. What you have is a converted physical to virtual OS not so much a clone. Seeing that the other guests work and this one does not to your satisfaction you have to ask yourself why. Perhaps it is something that the original install had that is not available and that would make Windows try to find it before it proceeds. Look at the devices and see if there are complaints of missing drivers, Etc.. You can also use the boot logging feature of Windows to see what it might be.

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 21:39
by Zorba
I used Clonezilla to make a disk image of my physical windows 7 and then restored that image into a virtual machine.

I looked at devices and the logs but nothing stands out, that I can see, as being the offender. Looks normal, even when compared with the other Win 7 VM that was installed directly into Virtualbox..

What I'd like to know is, what's going on with Virtualboxes memory management, how is it, that even after I close the VM and Virtualbox Manager that, when I fire it up again it gets more responsive but if I reboot the host and start the manager and the VM again, it's back to square one (in that it takes agaes to load everything)

Yes, it's something to do with the fact that the VM was originally on bare metal, but it feels like Vdi upon first boot is being capped in I/O in some way? or there's some memory management process that's not working? I haven't the foggiest.

I'm afraid I'm not that technical, I can follow instructions and problem solve up to a point. I thought maybe the log would reveal something?

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 21:44
by Perryg
To be honest I think your obsession with it being something with VirtualBox is what is causing you grief. You have already stated that a guest install of Windows 7 works properly so you know it couldn't have anything to do with the memory management of VirtualBox or it would be the same on both the converted and the clean install. That said I can not give you much more to go on than what I already stated. Maybe someone that is fluent in Windows can give you more insight.

Re: Windows 7 guest initial boot very slow.

Posted: 31. Mar 2016, 22:10
by Zorba
Well, thanks for having a go.

Hopefully it will sound familiar to someone who has direct experience with the process I've used, and can offer some sort of advise. Or a expert on interpreting the log, I bet the answer is in there somewhere... Or maybe that is what to be expected from PTV conversion. Seems like a shame really that it's become such a massive road block on my virtual travels.

My obsession is only to make it work, not to portion blame on any one or any thing.

Thanks!

New observation, after booting a VM (any VM) a couple of times it doesn't seem to need the VDI as much on each successive boot, even when closing the manager and staring it again, it doesn't load the initial state directly from the VDI, seems to have saved that to perhaps a temp file somewhere else, which would explain why on a reboot of the host machine it all gets reset.?

Where do Virtualbox temp files live? or is it all going into pagefile? If I could make them persistent that might help?

Hmm.. So why the poor performance reading the VDI in the first place with one VM and not another?

Re: Windows 7 guest initial boot very slow.

Posted: 1. Apr 2016, 13:51
by mpack
IMHO, this symptom is usually caused by the configured networking being broken after the migration process. And/or some networking process that doesn't adapt well to the new environment, e.g. is continually retrying the old network connection.

CPU and I/O time is like energy - it doesn't just disappear. Instead of speculating, all you need do is pop up the task list in the guest and see what task is using excessive CPU or I/O. I'm not aware of your evidence for assuming that the overhead is incurred when reading the VDI file.

This isn't a VirtualBox problem, as Perry already said - if it was then everyone would have the same problem.

VirtualBox has no temp files. VirtualBox is a hardware simulator.

Re: Windows 7 guest initial boot very slow.

Posted: 1. Apr 2016, 15:55
by Zorba
@mpack

Hello! and thank you for taking the time to read this thread and giving me feed back on my observations. Sadly, it's not network related.

I can see that your good self and Perryg are very knowledgeable in the ways of Virtualbox, I really like this software and think it's a marvellous
piece of computer engineering/coding.

The thing is, and I know we're going around in circles here, is the VM (and this is true for all my VM's now that I'm paying attention to what's going on) loads quicker on next boot and apps that were loaded previously, open quicker next time round? if it was some configuration issue you'd expect the boot time to be the same every time. They are not. Can you explain to me what's going on there?

Because it sure feels like it's storing data in memory, somewhere? the history of the VM which is assisting the boot next time round. But if the host is shut down
and restarted again, when I load the VM it has to read the VDI fully all over again, in which it is taking some time.

Maybe a dev could answer that?

Re: Windows 7 guest initial boot very slow.

Posted: 1. Apr 2016, 17:12
by socratis
Zorba wrote:if it was some configuration issue you'd expect the boot time to be the same every time. They are not. Can you explain to me what's going on there
The host is caching the VM data.

Re: Windows 7 guest initial boot very slow.

Posted: 1. Apr 2016, 18:19
by Zorba
@socratis

HI! Thank you!

Yes you are right, it is the "Use Host I/O" option that's doing the caching. So that explains how it's learning and persistent across reboots.

When I turn off that option on the P2V windows 7 VM, the peak performance of Virtualbox.exe reading the VDI rarely gets above 1MB/sec as
shown in resource monitor on the host

Where as, if I turn it off on the windows 7 VM that was directly installed into Virtualbox gets up to 10MB/sec.

So there's something about the P2V conversion is bottlenecking (for lack of a better word) the ability of Virtualbox to read the VDI?

At least that's what my observation tells me. Could be wrong!

Re: Windows 7 guest initial boot very slow.

Posted: 1. Apr 2016, 19:33
by mpack
Regardless of who or what created the VDI, it's just a VDI. So if you're getting really awful disk performance using VirtualBox then I'd look to the disk before I'd look to VirtualBox.

Perry asked you early on what drive G was. You only gave half an answer: what technology is the G drive? Because if it was (say) an external USB drive then that would by itself explain the awful performance.