VirtualBox: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ # Run <code>defrag</code> in the Windows Guest # Nullify free space: ==Linux Guest== sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k sudo rm -rf /b...")
 
 
(9 intermediate revisions by the same user not shown)
Line 4: Line 4:


==Linux Guest==  
==Linux Guest==  
sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
<syntaxhighlight lang="bash">
sudo rm -rf /bigemptyfile
sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile
</syntaxhighlight>
'''OR'''
'''OR'''
telinit 1
<syntaxhighlight lang="bash">
mount -o remount,ro /dev/sda1
telinit 1
zerofree -v /dev/sda1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1
</syntaxhighlight>


==Windows Guest==  
==Windows Guest==  
cleanmgr
<syntaxhighlight lang="batch">
del C:\Windows\SoftwareDistribution\Download
cleanmgr
del C:\Windows\Temp
del C:\Windows\SoftwareDistribution\Download
del C:\Documents and Settings\<user>\Local Settings\Temp
del C:\Windows\Temp
del C:\Windows\$Nt*Uninstall*
del C:\Documents and Settings\<user>\Local Settings\Temp
del C:\Windows\$Nt*Uninstall*
</syntaxhighlight>


sdelete.exe c: -z
<syntaxhighlight lang="batch">
sdelete.exe d: -z
rem http://cdn.chorke.org/soft/winx/sdelete/sdelete.zip
sdelete.exe c: -z
sdelete.exe d: -z
</syntaxhighlight>


==Compact==
==Compact==
  VBoxManage modifyhd xp-msql-box.vdi --compact
  VBoxManage modifyhd xp-msql-box.vdi --compact
  VBoxManage modifyhd xp-base-box.vdi --compact
  VBoxManage modifyhd xp-base-box.vdi --compact
 
'''OR'''
  VBoxManage.exe modifymedium --compact xp-base-box.vdi  
  VBoxManage.exe modifymedium --compact xp-base-box.vdi  
  VBoxManage modifymedium --compact xp-base-box.vdi  
  VBoxManage modifymedium --compact xp-base-box.vdi  
  vboxmanage modifymedium --compact xp-base-box.vdi
  vboxmanage modifymedium --compact xp-base-box.vdi
==Knowledge==
sudo apt install -y cpu-checker
kvm-ok
'''virtualbox before start'''
sudo systemctl stop    libvirt-guests.service
sudo systemctl disable libvirt-guests.service
sudo systemctl stop    virtlogd.socket
sudo systemctl stop    virtlogd.service
sudo systemctl disable virtlogd.service
sudo systemctl stop    libvirtd.socket
sudo systemctl stop    libvirtd.service
sudo systemctl disable libvirtd.service
sudo systemctl enable  virtualbox.service
sudo systemctl start  virtualbox.service


==References==
==References==
{|
| valign="top" |
* [https://support.microsoft.com/en-us/help/926139/windows-powershell-1-0-english-language-installation-packages-for-wind Windows PowerShell 1.0 for Windows Server 2003 & Windows XP]
* [https://support.microsoft.com/en-us/help/926139/windows-powershell-1-0-english-language-installation-packages-for-wind Windows PowerShell 1.0 for Windows Server 2003 & Windows XP]
* [https://support.microsoft.com/en-us/help/968929/windows-management-framework-windows-powershell-2-0-winrm-2-0-and-bits Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0]
* [https://support.microsoft.com/en-us/help/968929/windows-management-framework-windows-powershell-2-0-winrm-2-0-and-bits Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0]
Line 40: Line 70:
* [http://www.vagrantbox.es/  A list of base Boxes]
* [http://www.vagrantbox.es/  A list of base Boxes]
* [https://app.vagrantup.com/rogeriopradoj/boxes/xp-ie8 Example Vagrantfile]
* [https://app.vagrantup.com/rogeriopradoj/boxes/xp-ie8 Example Vagrantfile]
| valign="top" |
* [https://www.vagrantup.com/intro/vs/docker.html Vagrant vs. Docker]
* [https://www.vagrantup.com/intro/vs/docker.html Vagrant vs. Docker]
* [https://github.com/WinRb/vagrant-windows Vagrant Windows]
* [https://github.com/WinRb/vagrant-windows Vagrant Windows]
* [https://www.vagrantup.com/intro/getting-started/index.html Getting Started]
* [https://www.vagrantup.com/intro/getting-started/index.html Getting Started]
* [https://gist.github.com/kuznero/576e848c39080745ac1915c6b3e4820b Compact VDI]
* [https://gist.github.com/kuznero/576e848c39080745ac1915c6b3e4820b Compact VDI]
* [[Proxmox]]
* [[Qemu]]
| valign="top" |
|-
| valign="top" colspan="3" |
----
|-
| valign="top" |
| valign="top" |
| valign="top" |
|}

Latest revision as of 08:17, 29 November 2023

  1. Run defrag in the Windows Guest
  2. Nullify free space:

Linux Guest

sudo dd if=/dev/zero | pv | sudo dd of=/bigemptyfile bs=4096k
sudo rm -rf /bigemptyfile

OR

telinit 1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1

Windows Guest

cleanmgr
del C:\Windows\SoftwareDistribution\Download
del C:\Windows\Temp
del C:\Documents and Settings\<user>\Local Settings\Temp
del C:\Windows\$Nt*Uninstall*
rem http://cdn.chorke.org/soft/winx/sdelete/sdelete.zip
sdelete.exe c: -z
sdelete.exe d: -z

Compact

VBoxManage modifyhd xp-msql-box.vdi --compact
VBoxManage modifyhd xp-base-box.vdi --compact

OR

VBoxManage.exe modifymedium --compact xp-base-box.vdi 
VBoxManage modifymedium --compact xp-base-box.vdi 
vboxmanage modifymedium --compact xp-base-box.vdi

Knowledge

sudo apt install -y cpu-checker
kvm-ok
virtualbox before start
sudo systemctl stop    libvirt-guests.service 
sudo systemctl disable libvirt-guests.service

sudo systemctl stop    virtlogd.socket
sudo systemctl stop    virtlogd.service
sudo systemctl disable virtlogd.service

sudo systemctl stop    libvirtd.socket
sudo systemctl stop    libvirtd.service
sudo systemctl disable libvirtd.service

sudo systemctl enable  virtualbox.service
sudo systemctl start   virtualbox.service

References