Windows 7 reserve rawdisk for VM use.

Discussions related to using VirtualBox on Windows hosts.
Post Reply
sameee1
Posts: 4
Joined: 16. Jun 2014, 08:23

Windows 7 reserve rawdisk for VM use.

Post by sameee1 »

Hi, I hope I didn't miss the info on this when searching.

I have a Windows 7 host and for an XP guest I have 2 physical drives that I made VMDK files for to in other words use those full physical disks as 2 drives for my VM.

If I don't have to reboot my host, then there is no issue and all is well. But once I restart the host, the physical drives are assumed as hard drives for the host and then my guest starts up and doesn't have the hard drives for use. Or to be more correct, they are viewable in disk management on XP but in the windows explorer I do not see the drives.

It seems the "handling" for this ends up being:
a) turn off XP guest,
b) delete the partitions on the 2 physical drives (from the Windows 7 host)
c) turn on the XP guest and then go to its disk management and set new partitions for each of the two drives (including newly formatting).

Problem is, (aside from it being frustrating for anyone to have to go through this again and again) is that I end up deleting the files on these drives again and again. Luckily it is not my personal photos or documents but I use this VM for security cameras so I lose the camera video each time...

I know that creating and using rawdisk is said on the documentation to be done at my own risk and stuff. That is fine, I am just trying to see how to make this work.

At this point I am trying to see how to make my Windows 7 host know not to automatically create its own partitions on these drives upon reboot, but let the drives be so my XP guest can use them again when it starts up.

Hope this makes sense. Thanks for any suggestions!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Windows 7 reserve rawdisk for VM use.

Post by mpack »

sameee1 wrote:for an XP guest I have 2 physical drives that I made VMDK files for to in other words use those full physical disks as 2 drives for my VM.
Why? I mean why use raw disk when you could more easily locate normal VDI files on those drives?

If the drive is accessible to the Windows host, and contains an NTFS partition, then it will be mounted automatically by the host. You will be constantly fighting the host for access. What makes you think this would ever be a good thing?
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: Windows 7 reserve rawdisk for VM use.

Post by socratis »

See if you can "unmount" the drives before you start your guest. http://windows.microsoft.com/en-us/wind ... ount-drive
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.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Windows 7 reserve rawdisk for VM use.

Post by BillG »

socratis wrote:See if you can "unmount" the drives before you start your guest. http://windows.microsoft.com/en-us/wind ... ount-drive
That might solve his problem of disk access but, like mpack, I can't work out why he is trying to access the physical drives. What was the point of making copies of the drives as virtual disks (an excellent idea) and then trying to use the physical drives instead?
Bill
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: Windows 7 reserve rawdisk for VM use.

Post by socratis »

Because (and I'm shooting in the "grey" here) he's using a security camera software (that is running on the VM) and he stores the files in a way that are accessible afterwards as "raw" images, from other systems/hardware as well.
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.
sameee1
Posts: 4
Joined: 16. Jun 2014, 08:23

Re: Windows 7 reserve rawdisk for VM use.

Post by sameee1 »

mpack wrote: Why? I mean why use raw disk when you could more easily locate normal VDI files on those drives?

If the drive is accessible to the Windows host, and contains an NTFS partition, then it will be mounted automatically by the host. You will be constantly fighting the host for access. What makes you think this would ever be a good thing?
Actually believe it or not I started out with VDI files on the hard drives. This "worked" but the memory on the host would slowly but surely (within a day) be fully absorbed, literally I start the system with VMs and the host is running at 7GB RAM and by the end of the day I have roughly 13.3GB of 14GB being used and the host is having sluggish problems... I've tried with dynamically-allocated and fixed-size formats. Maybe there is a real explanation about this but once I switched to using raw disks that went away and the system has continued to stable in terms of its RAM usage.

If I could get around that problem...I would be using VDI files still up to this day!

I could try socratis' suggestion, but wanted to at least let you all know why I've been doing this.
sameee1
Posts: 4
Joined: 16. Jun 2014, 08:23

Re: Windows 7 reserve rawdisk for VM use.

Post by sameee1 »

socratis wrote:See if you can "unmount" the drives before you start your guest. http://windows.microsoft.com/en-us/wind ... ount-drive
Thanks for the suggestion socratis. I tried it and at least when I started the guest I saw the drives show up on the windows explorer but the drives were still inaccessible and XP was asking me to format them. So it seems that didn't do the trick.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Windows 7 reserve rawdisk for VM use.

Post by mpack »

The virtual disk format choice has nothing whatever to do with RAM use in the guest. I have no doubt that what you observed was Win7s normal disk cacheing strategy: idle RAM is being used to buffer areas of the disk for better performance. This RAM would be freed up instantly when needed for something else.

A little knowledge is a dangerous thing - seriously.

I'll put it bluntly: forget raw disks until you have a better understanding of VMs.
sameee1
Posts: 4
Joined: 16. Jun 2014, 08:23

Re: Windows 7 reserve rawdisk for VM use.

Post by sameee1 »

I agree mpack. And I am aware of, and was sure myself that this was all the Windows7's normal disk caching strategy. But something was different. Unfortunately I was not having RAM freeing up for my other tasks when they were needed (as the normal Win7 caching would normally do). And when I switched to raw disk, this problem never came up and RAM frees up for me. So this is where I am observing that SOMETHING is different and can't just chalk it up to being solely Windows 7's caching strategy. Indeed if I could see that it was only about Win7's caching I know it would be wrong to post in this forum on the matter.

For the record my guest system IS on a VDI virtual disk. I only had my camera recordings (in other words user files only, no system files) on the physical disks. The host doesn't have system or user files on these particular physical disks.

Anyway I get your last point and I can try to go off the raw disks and see if there is change. If there is I can look newly at what may have caused this phenomena I'm observing.
Post Reply