Comprimere disco dinamico VirtualBox

Solo alcuni appunti per come comprimere (shrinking) un disco dinamico di una VM VirtualBox:

 

Fonte: https://www.howtogeek.com/312883/how-to-shrink-a-virtualbox-virtual-machine-and-free-up-disk-space/

Tool utile per Windows: SDelete

Comando da eseguire nella VM Windows:

sdelete.exe c: -z

Poi nella VM host:

VBoxManage modifymedium disk "C:\path\to\disk.vdi" --compact

The Perfect VirtualBox Setup

Setup perfetto per VirtualBox (almeno, ad oggi) per una Guest VM Windows 10 x64su  macOS Mojave Host (MacBook Pro 15″ 2018 -MacBookPro15,1- con 6 core e 16 GB di ram).

In grassetto quelle essenziali.

System:

  • 1 CPU (sembra controintuitivo ma viene gestita meglio dall’host)
  • 4 GB ram (dipende dal vostro sistema, forse potrei metterne di più ma poi si riduce il numero di app che posso far girare sulla macchina Host)
  • Chipset PIIX3 (default)
  • Pointing device: PS/2 Mouse
  • Extended features:  solo “Enable I/O APIC”
  • Extended features: solo “Enable PAE/NX”
  • Hardware acceleration:
    • Paravirtualization Interface: Default
    • Hardware virtualization: Enable Nested Paging abilitato

Storage:

  • Use Host I/O cache” disabilitato nelle impostazioni (c’è chi sostiene che migliori le performance, ma a me causava solo problemi)

Configurazione software:

 

Occhio: VirtualBox 6.0.10 ha un bug con shared folders. 

 

 

 

Mac OS X 10.6.3 finalmente tra noi (e VirtualBox 3.1.6)

Beh, immagino che se non ve ne siete ancora accorti da soli, l’avrete sicuramente letto su qualche sito di notizie Apple: Mac OS X 10.6.3 è stato rilasciato sia nella versione Aggiornamento che in Aggiornamento Combinato (la mia preferita, per evitare rogne).

In realtà ne avevo già parlato, ma in altra sede. Anzi, vi ricordo che per quanto riguarda le notizie “dure&pure” scritte da me, le trovate su XcodeItalia 🙂

In tema di aggiornamenti, non scordatevi di aggiornare la vostra versione di VirtualBox per OS X alla 3.1.6, anche se in seguito al MacUpdate Promo ho migrato la mia VM con Windows 7 x64 su Parallels. Ne parlerò in futuro.

Virtual machine che consuma la CPU in Idle?

Ieri mi e’ capitato di accorgermi che la mia virtual machine (Windows 7 x64 che gira dentro il solito VirtualBox), in idle, consumava piu’ CPU che durante il normale utilizzo!

Credevo fosse un problema di driver della VM, invece era colpa di mscorsvw.exe. Questo servizio e’ schedulato per girare nei momenti, appunto, di idle del sistema, e il suo scopo e’ quello di compilare in background le librerie del framework .NET di Microsoft.

Quindi se avete installato qualche .NET framework, Visual Studio oppure SQL Server (sia Standard che Express) puo’ darsi che stia “lavorando per voi”.

Il file che gescisce questi processi si chiama

NGEN.exe. Si trova in C:\Windows\Microsoft.NET\Framework\v2.0.50727 (ma in Windows 7 e’ solo un alias per quello che si trova anche sotto la directory \V4.xxxxxx ).Andate quindi in quella directory (con un prompt dei comandi che abbia privilegi di amministratore) e digitate

NGEN executequeueditems

Sappiate che ci mettera’ un po’ di tempo, a seconda di quanti CLR deve ancora compilare.

Per vedere lo stato dei lavori digitate:

NGEN queue status

E infine per vedere il log,

NGEN display

Altra release di VirtualBox! 3.1.4

Niente da segnalare nonostante il changelog chilometrico…

  • VMM: SMP stability fixes
  • VMM: fixed guru meditation in certain rare cases (bug #5968)
  • VMM: activate NXE for PAE enabled guests (VT-x and AMD-V on 32 bits hosts only; bug #3578)
  • VMM: added workaround for broken BIOSes that make VirtualBox think AMD-V is in use (for details see bug #5639)
  • VMM: fixed rare host reboot when restoring a saved state (bug #3945)
  • VMM: fixed incompatibility with 2.6.32 Linux kernels (software virtualization only; bug #6100)
  • VMM: turn on nested paging by default for new VMs (if available; VT-x and AMD-V only)
  • VMM: turn on VPID by default for new VMs (if available; VT-x only)
  • VMM: perform strict CPUID compatibility checks when teleporting; to get the old behavior set “VBoxInternal/CPUM/StrictCpuIdChecks” to 0
  • VMM: fixed VM crash with certain 16 bits Windows applications (software virtualization only; bug #5399)
  • Snapshots: fixed a 3.1 regression that broke deletion of snapshots when a machine had immutable or writethrough storage attached (bug #5727)
  • Saved state: fixed VERR_SSM_LOADED_TOO_MUCH error when loading DisplayScreenshot(bug #6162)
  • VBoxManage: add restorecurrent operation to snapshots command
  • VBoxManage: fixed broken snapshot lookup by name (bug #6070
  • GUI: fixed the broken “Reload” button that reloads the machine XML when a machine is inaccessible
  • GUI: fixed guest fullscreen mode after reboot (bug #5372)
  • GUI: handle Ctrl+Break properly on X11 hosts (bug #6122)
  • GUI: fixed status LEDs for storage devices
  • GUI: workaround for disabling the seamless mode on KDE hosts (KWin bug)
  • 3D support: fixed SELinux warning saying VBoxOGL.so requires text relocation (bug #5690)
  • 3D support: fixed Corrupted surface rendering (bug #5695)
  • 3D support: free textures on guest application termination (bug #5206)
  • 3D support: fixed ubigraph_server crashes (#4674)
  • 3D support: fixes for 64-bit Solaris guests
  • Seamless: disable seamless mode when guest changes screen resolution (bug #5655)
  • NAT: fixed high CPU load under certain circumstances (Windows hosts only; bug #5787)
  • NAT: fixed handling of the broadcast flag in DHCP requests
  • NAT: fixed rare crash due to an assertion in the ICMP code (bug #3217)
  • Virtio-net: don’t crash when ports accessed beyond the valid range (bug #5923)
  • LsiLogic: fix for Windows 7 guests
  • ATA: fix for guru meditation when installing Solaris 8 guests (bug #5972)
  • VHD: fixed an incompatibility with Virtual PC (bug #5990)
  • VHD: update the footer backup after setting a new UUID (bug #5004)
  • Host DVD: really fixed loading “passthrough” setting from config file (bug #5681)
  • Shared folders: fixed resolving of symlink target on Linux (3.1.2 regression)
  • VRDP: fixed VERR_NET_ADDRESS_IN_USE error when restarting a VM (3.1 regression; bug #5902)
  • VRDP: fixed crash on Mac OS X when 3D is enabled (3.1 regression)
  • PulseAudio: fixed recording (bug #4302)
  • USB: fixed a shutdown blue screen (Windows hosts only; bug #5885)
  • BIOS: fixed attribute during text scroll (bug #3407)
  • OVF: fix strange error messages on disk import errors
  • OVF: do not require write access the the .ovf file during import (3.1 regression; bug #5762)
  • iSCSI: fix taking snapshots of a running VM (#5849)
  • Solaris hosts: several USB fixes (including support for Apple iPod; bug #5873)
  • Solaris installer: fixed USB module removal and Solaris 10 “id” binary incompatibility
  • Guest Additions: fixed wrong guest time adjustment if the guest clock is ahead (3.1 regression; non-Windows guests only)
  • Linux Additions: fixed shared folders for Linux 2.6.32 guests (bug #5891)
  • Linux Additions: make the mouse driver work on Debian 5.0.3 guests again (3.1.2 regression, bug #5832)
  • Windows Additions: fixed malfunctioning !VBoxService that broke time-sync (bug #5872)
  • Windows Additions: fixed uninstallation issues on 64-bit guests
  • Windows Additions: fixed some sysprep execution issues
  • X.Org Additions: never reject the saved video mode as invalid (bug #5731)
  • XFree86 Additions: accept video mode hints for the initial mode again

http://www.virtualbox.org

64bit o non 64bit? Questo è il dilemma

Nei giorni scorsi mi sono imbattuto nel problema di usare in modo abbastanza intensivo una VM con Windows 7 su Snow Leopard 10.6.2 in VirtualBox 3.1.2.

Come ben sapete, da qualche tempo sono passato al kernel a 64bit, tuttavia in VirtualBox non ho notato alcun miglioramento, anzi, semmai il problema stava nella memoria utilizzata, che non bastava mai! Ora ho trovato un bilanciamento, con 1,5GB di Ram assegnati alla VM in modo che lo swapping fosse limitato…

Ma la curiosità è che riavviando a 32bit mi è parso che la quantità di memoria utilizzata dal sistema si sia ridotta… e un documento su Devloper.Apple.Com mi ha insospettito…

The memory usage of a 64-bit application may be significantly larger than for a 32-bit version of the same application. The difference in usage varies from application to application depending on what percentage of data structures contain data members that are larger in a 64-bit process. For this reason, on a computer with a small amount of memory, you may not want to run the 64-bit version of your application even if the computer can support it.

Sono in cerca di altri pareri…

VirtualBox 3.1.0 OUT NOW! [updated]

Ormai lo sapete che sono un fan di questa soluzione per VM, no?

Oggi è uscita la versione 3.1.0 e la sto scaricando per Mac OS X.

Lo trovate qui: http://www.virtualbox.org/wiki/Downloads

[UPDATE] La 2D acceleration non cambia il fatto che Aero ancora non è compatibile con i driver inclusi nelle VM Additions…

Intanto leggiamoci le belle cose che porta con se:

Changelog – VirtualBox.

Changelog

VirtualBox 3.1.0 (released 2009-11-30)

This version is a major update. The following major new features were added:

  • Teleportation (aka live migration); migrate a live VM session from one host to another (see the manual for more information)
  • VM states can now be restored from arbitrary snapshots instead of only the last one, and new snapshots can be taken from other snapshots as well (“branched snapshots”; see the manual for more information)
  • 2D video acceleration for Windows guests; use the host video hardware for overlay stretching and color conversion (see the manual for more information)
  • More flexible storage attachments: CD/DVD drives can be attached to an arbitrary IDE controller, and there can be more than one such drive (the manual for more information)
  • The network attachment type can be changed while a VM is running
  • Complete rewrite of experimental USB support for OpenSolaris hosts making use of the latest USB enhancements in Solaris Nevada 124 and higher
  • Significant performance improvements for PAE and AMD64 guests (VT-x and AMD-V only; normal (non-nested) paging)
  • Experimental support for EFI (Extensible Firmware Interface; see the manual for more information)
  • Support for paravirtualized network adapters (virtio-net; see the manual for more information)

In addition, the following items were fixed and/or added:

  • VMM: guest SMP fixes for certain rare cases
  • GUI: snapshots include a screenshot
  • GUI: locked storage media can be unmounted by force
  • GUI: the a log window grabbed all key events from other GUI windows (bug #5291)
  • GUI: allow to disable USB filters (bug #5426)
  • GUI: improved memory slider in the VM settings
  • GUI: the VirtualBox website couldn’t be opened from the help menu (bug #4559)
  • 3D support: major performance improvement in VBO processing
  • 3D support: added GL_EXT_framebuffer_objectGL_EXT_compiled_vertex_array support
  • 3D support: fixed crashes in FarCry, SecondLife, Call of Duty, Unreal Tournament, Eve Online (bugs #2801#2791)
  • 3D support: fixed graphics corruption in World of Warcraft (#2816)
  • 3D support: fixed Final frame of Compiz animation not updated to the screen (#4653)
  • 3D support: fixed incorrect rendering of non ARGB textures under compiz
  • iSCSI: support iSCSI targets with more than 2TiB capacity
  • VRDP: fixed occasional VRDP server crash (bug #5424)
  • Network: fixed the E1000 emulation for QNX (and probably other) guests (bug #3206)
  • NAT: added host resolver DNS proxy (see the manual for more information)
  • VMDK: fixed incorrectly rejected big images split into 2G pieces (bug #5523#2787)
  • VMDK: fixed compatibility issue with fixed or raw disk VMDK files (bug #2723)
  • VHD: fixed incompatibility with Hyper-V
  • Support for Parallels version 2 disk image (HDD) files; see the manual for more information
  • OVF: create manifest files on export and verify the content of an optional manifest file on import
  • OVF: fixed memory setting during import (bug #4188)
  • Mouse device: now five buttons are passed to the guest (bug #3773)
  • VBoxHeadless: fixed loss of saved state when VM fails to start
  • VBoxSDL: fixed crash during shutdown (Windows hosts only)
  • X11 based hosts: allow the user to specify their own scan code layout (bug #2302)
  • Mac OS X hosts: don’t auto show the menu and dock in fullscreen (bug #4866)
  • Mac OS X hosts (64 bit): don’t interpret mouse wheel events as left click (bug #5049)
  • Mac OS X hosts: fixed a VM abort during shutdown under certain conditions
  • Solaris hosts: combined the kernel interface package into the VirtualBox main package
  • Solaris hosts: support for OpenSolaris Boomer architecture (with OSS audio backend).
  • Shared folders: VBOXSVR is visible in Network folder (Windows guests, bug #4842)
  • Shared folders: performance improvements (Windows guests, bug #1728)
  • Windows, Linux and Solaris Additions: added balloon tip notifier if VirtualBox host version was updated and Additions are out of date
  • Solaris guests: fixed keyboard emulation (bug #1589)
  • Solaris Additions: fixed as_pagelock() failed errors affecting guest properties (bug #5337)
  • Windows Additions: added automatic logon support for Windows Vista and Windows 7
  • Windows Additions: improved file version lookup for guest OS information
  • Windows Additions: fixed runtime OS detection on Windows 7 for session information
  • Windows Additions: fixed crash in seamless mode (contributed by Huihong Luo)
  • Linux Additions: added support for uninstalling the Linux Guest Additions (bug #4039)
  • Linux guest shared folders: allow mounting a shared folder if a file of the same name as the folder exists in the current directory (bug #928)
  • SDK: added object-oriented web service bindings for PHP5