Author |
Message |
jaylach
|
Posted: Fri Oct 30, 2020 6:18 pm |
|
|
Resident Geekazoid Administrator |
|
Joined: Wed Mar 21, 2012 5:09 am Posts: 9438 Location: The state of confusion; I just use Wyoming for mail.
|
If you run into this remember that a virtual machine needs to be treated like a physical machine. Even though the virtual machine's hard drive is actually just a file that is used to simulate a hard drive it can still get fragmented.
I have a total of ten virtual machines three of which do updates. Even though, by default, defragging is set to automatic it is possible, if not probable, that the virtual machine is not on enough to hit a scheduled defrag or to finish one if started. Today I checked a few of mine and they were all fragmented. I did a disk cleanup, including system files, and then manually ran a defrag.
|
|
|
|
|
Doddie
|
Posted: Fri Oct 30, 2020 6:37 pm |
|
|
welcoming committee |
|
Joined: Sun Jan 13, 2013 4:13 pm Posts: 1723 Location: Dunedin, Alba.
|
All those 0's and 1's have to go somewhere to be read... question is, which OS or VM to have defrag them?
My best guess would be the OS (operating system) that the VM's are running on should be the only one doing any defragging?... e.g. Don't let Linux or Win10 etc defrag a Win7 environment, if that's the OS installed and hosting the VM's.
|
|
|
|
|
jaylach
|
Posted: Fri Oct 30, 2020 6:50 pm |
|
|
Resident Geekazoid Administrator |
|
Joined: Wed Mar 21, 2012 5:09 am Posts: 9438 Location: The state of confusion; I just use Wyoming for mail.
|
The most common cases would be Windows 10 and 8/8.1 being the guest OS as they still do updates. You would do the defrag through the guest OS, not the host OS.
The host OS can defrag the file that is the virtual hard drive but that does nothing as to the contents of the file being fragmented.
|
|
|
|
|
Doddie
|
Posted: Fri Oct 30, 2020 8:06 pm |
|
|
welcoming committee |
|
Joined: Sun Jan 13, 2013 4:13 pm Posts: 1723 Location: Dunedin, Alba.
|
jaylach wrote: The host OS can defrag the file that is the virtual hard drive but that does nothing as to the contents of the file being fragmented. Is that not an oxymoron? If a virtual OS (VM) never really existed then no amount of moving data about should not impact any OS, certainly not have any impact on defrag. Fwiw i've never believed that VM's are as secure as they claim, somewhere and somehow the data is written to a drive, and will therefore be recoverable.
|
|
|
|
|
jaylach
|
Posted: Fri Oct 30, 2020 8:39 pm |
|
|
Resident Geekazoid Administrator |
|
Joined: Wed Mar 21, 2012 5:09 am Posts: 9438 Location: The state of confusion; I just use Wyoming for mail.
|
Nope, not an oxymoron. The virtual hard drive is a file contained on a hard drive on the physical machine. Doing a defrag on that file only defrags the file, not it's contents. Since the virtual machine looks at the file as a hard drive the contents of the file can be fragmented even if the file itself is not. Look at it this way... If you have a Word document, and have a paragraph broken up throughout the document, doing a defrag on that Word file will not put the paragraph back in order. You would have to rearrange the paragraph within Word just as you have to defrag a virtual hard drive within the guest OS to which the file is associated.
A virtual machine is no more or less secure than a physical machine hence the need to install security on the virtual machine.
|
|
|
|
|
Doddie
|
Posted: Fri Oct 30, 2020 9:19 pm |
|
|
welcoming committee |
|
Joined: Sun Jan 13, 2013 4:13 pm Posts: 1723 Location: Dunedin, Alba.
|
jaylach wrote: A virtual machine is no more or less secure than a physical machine hence the need to install security on the virtual machine. No matter what you say, i'm still not sold on that logic.
|
|
|
|
|
jaylach
|
Posted: Fri Oct 30, 2020 11:58 pm |
|
|
Resident Geekazoid Administrator |
|
Joined: Wed Mar 21, 2012 5:09 am Posts: 9438 Location: The state of confusion; I just use Wyoming for mail.
|
Doddie wrote: jaylach wrote: A virtual machine is no more or less secure than a physical machine hence the need to install security on the virtual machine. No matter what you say, i'm still not sold on that logic. Let's take my Windows 7 Ultimate virtual machine. I will concede that it is more vulnerable on it's own as it no longer gets updates; one point against the Windows 7 virtual machine being as or more secure than my physical machine. Still there are a lot of good security points. 1) Something has to get through the hardware firewall in my router. 2) My physical machine also has a software firewall but the virtual machine has 2 software firewalls. Something has to get through both the physical machine's software firewall and the virtual machine's software firewall. 3) The Windows 7 virtual machine is running Security Essentials as it's AV. However the AV does not end there as something would also have to get through Defender and MBAM Premium on my physical machine. 4) The virtual hard drives are included in scheduled security scans with both Defender and MBAM Premium done through my physical system. 5) Periodically I do manual scans on the folder that holds my virtual machine files. 6) VirtualBox itself gets updates and security patches on a regular basis. Even with the lack of Windows 7 updates I can't see how the virtual machine can be considered insecure.
|
|
|
|
|
Acadia
|
Posted: Sat Oct 31, 2020 7:09 am |
|
|
welcoming committee |
|
Joined: Wed Apr 11, 2012 6:45 am Posts: 1073
|
Removed by original poster.
_________________ The blazing evidence of immortality is our dissatisfaction with any other solution. -- Emerson
Last edited by Acadia on Sun Nov 01, 2020 6:24 am, edited 1 time in total.
|
|
|
|
|
jaylach
|
Posted: Sat Oct 31, 2020 4:14 pm |
|
|
Resident Geekazoid Administrator |
|
Joined: Wed Mar 21, 2012 5:09 am Posts: 9438 Location: The state of confusion; I just use Wyoming for mail.
|
Acadia, you were probably using Avast on your XP VM. That is the normal choice including mine. On my Windows 7 VM I use Security Essentials but when support stops in 2022 I'll switch to Avast. Sigh, I just got rid of several virtual machines that I installed pretty much just due to being nostalgic. The removed virtual machines include Windows 3.11/DOS 6.2, Windows 95, 98SE, ME, 2000, and Vista. I also removed Linux Mint just because I only booted it to update and that just seemed a waste. If I ever want to play I can just boot the Live DVD. Actually, since this thread started with dealing with fragmentation, I find it interesting that Linux almost never fragments. In fact it can be dangerous to do a defrag unless you really know what you are doing. Here is an article that explains. https://www.maketecheasier.com/defragment-linux/Linux, using a journaling filesystem, basically prevents fragmentation unless the drive is low on space by leaving a generous amount of space between files allowing them to grow without fragmenting. Since this thread has quickly morphed from fragmentation to security on a VM (which I don't mind at all) let's understand something. Acadia, you were probably using Microsoft's Virtual PC 2007 (or earlier) or Oracle's VirtualBox. Actually, years ago, I wrote a pretty extensive article on setting up Virtual PC. LOL! At least BB thought it was helpful. https://jaylach.com/downloads/virtual-pc-2007-set-up-guide.zipThe thing is that your 'sandbox' safety was due to running the VM in a sandbox, not any inherent factor of a VM running in a sandbox itself unless you were running something that I'm not familiar. The virtual hard drive is nothing but a different form of an ISO file; .VHD or .VDI normally in VirtualBox. You may recognize the .VHD and .VDI extensions as common disk imaging extensions which they are along with .TIB. In other words a virtual hard drive is nothing more than a mounted disk image file. You were feeling a false sense of security when thinking that just shutting down the VM prevented infection. If the VM gets infected the infection becomes part of the virtual hard drive before the system is shut down. The next time you start the VM the infection is still there. Your sandbox protection was due to running the VM within a sandbox rather than any sandbox type aspects of the VM itself. If you really want to do a sandbox type thing with a VM you would have a backup copy of the virtual hard drive under a different name. After finishing a VM session you would then copy the backup back to the file name used by the VM.
|
|
|
|
|
|