Compressing a VirtualBox VDI file for a Windows guest running on a Linux Host

Recently, I had a situation where my the VDI files for my Windows 10 virtual machine expanded in size all of a sudden and I needed to reduce them. My downloading maps for use with Routebuddy may have been the cause so I moved the ISO installation files onto the underlying Linux Mint drives. With that space, I then set to uncovering how to compact the virtual disk file and the Sysinternals sdelete tool was recommend for clearing unused space. After downloading, I set it to work in a Powershell session running on the guest operating system from its directory using the following command:

./sdelete -z [drive letter designation; E: is an example]

From the command prompt, the following should do:

sdelete -z [drive letter designation; E: is an example]

Once, that had completed, I shut down the VM and executed a command like the following from a bash terminal session:

vboxmanage modifyhd [file location/file name].vdi --compact

Where there was space to release, VDI files were reduced in size to return more disk space. More could be done so I will look into the Windows 10 drives to see what else needs to be moved out of them.

Migrating to Windows 10

While I have had preview builds of Windows 10 in various virtual machines for the most of twelve months, actually upgrading physical and virtual devices that you use for more critical work is a very different matter. Also, Windows 10 is set to be a rolling release with enhancements coming on an occasional basis so I would like to see what comes before it hits the actual machines that I need to use. That means that a VirtualBox instance of the preview build is being retained to see what happens to that over time.

Some might call it incautious but I have taken the plunge and completely moved from Windows 8.1 to Windows 10. The first machine that I upgrade was more expendable and success with that encouraged me to move onto others before even including a Windows 7 machine to see how that went. The 30-day restoration period allows an added degree of comfort when doing all this. The list of machines that I upgraded were a VMware VM with 32-bit Windows 8.1 Pro (itself part of a 32-bit upgrade cascade involving Windows 7 Home and Windows 8 Pro), a VirtualBox VM with 64-bit Windows 8.1, a physical PC that dual booted Linux Mint 17.2 and 64-bit Windows 8.1 and a HP Pavilion dm4 laptop (Intel Core i3 with 8GB RAM and a 1 TB SSHD) with Windows 7.

The main issue that I uncovered with the virtual machines is that the Windows 10 update tool that is downloaded onto Windows 7 and 8.x does not accept the graphics capability on there. This is a bug because the functionality works fine on the Windows Insider builds. The solution was to download the appropriate Windows 10 ISO image for use in the ensuing upgrade. There are 32-bit and 64-bit disk images with Windows 10 and Windows 10 Pro installation files on each. My own actions used both disk images.

During the virtual machine upgrades,most of the applications that considered important were carried over from Windows 8.1 to Windows without a bother. Anyone would expect Microsoft’s own software like Word, Excel and others to make the transition but others like Adobe’s Photoshop and Lightroom made it too as did Mozilla’s Firefox, albeit requiring a trip to Settings in order to set it as the default option for opening web pages. Less well known desktop applications like Zinio (digital magazines) or Mapyx Quo (maps for cycling, walking and the like) were the same. Classic Shell was an exception but the Windows 10 Start Menu suffices for now anyway. Also, there was a need to reinstate Bitdefender Antivirus Plus using its new Windows 10 compatible installation file. Still, the experience was a big change from the way things used to be in the days when you used have to reinstall nearly all your software following a Windows upgrade.

The Windows 10 update tool worked well for the Windows 8.1 PC so no installation disks were needed. Neither was the boot loader overwritten so the Windows option needed selecting from GRUB every time there was a system reboot as part of the installation process, a temporary nuisance that was tolerated since booting into Linux Mint was preserved. Again, no critical software was lost in the process apart from Kaspersky Internet Security, which needed the Windows 10 compatible version installed, much like Bitdefender, or Epson scanning software that I found was easy to reinstall anyway. Usefully, Anquet’s Outdoor Map Navigator (again used for working with walking and cycling maps) continue to function properly after the changeover.

For the Windows 7 laptop, it was much the same story albeit with the upgrade being delivered  using Windows Update. Then, the main Windows account could be connected to my Outlook account to get everything tied up with the other machines for the first time. Before the obligatory change of background picture, the browns in the one that I was using were causing interface items to appear in red, not exactly my favourite colour for application menus and the like. Now they are in blue and all the upheaval surrounding the operating system upgrade had no effect on the Dropbox or Kaspersky installations that I had in place before it all started. If there is any irritation, it is that unpinning of application tiles from the Start Menu or turning off of live tiles is not always as instantaneous as I would have liked and that is all done now anyway.

While writing the above, I could not help thinking that more observations on Windows 10 may follow but these will do for now. Microsoft had to get this upgrade process right and it does appear that they have so credit is due to them for that. So far, I have Windows 10 to be stable and will be seeing how things develop from here, especially when those new features arrive from time to time as is the promise that has been made to us users. Hopefully, that will be as painless as it needs to be to ensure trust is retained.

A few more shell commands

Here are some Linux commands that I encountered in a feature article in the current issue of Linux User & Developer that I had not met before:

cd --

This returns you to the previous directory where you were before with having to go back through the folder hierarchy to get there and is handy if you are jumping around a file system and any other means is far from speedy.

lsb_release -a

It can be useful to uncover what version of a distro you have from the command line and the above works for distros as diverse as Linux Mint, Debian, Fedora (it automatically installs in Fedora 22 if it is not installed already, a more advanced approach than showing you the command like in Linux Mint or Ubuntu), openSUSE and Manjaro. These days, the version may not change too often but it still is good to uncover what you have.

yum install fedora-upgrade

This one can be run either with sudo or in a root session started with su and it is specific to Fedora. The command performs an upgrade of the Fedora distro itself and I wonder if the functionality has been ported to the dnf command that has taken over from yum. My experiences with that in Fedora 22 so far suggest that it should be the case though I need to check that further with the VirtualBox VM that I have created.

Migrating a virtual machine from VirtualBox to VMware Player on Linux

The progress of Windows 10 is something that I have been watching. Early signs have been promising and the most recent live event certainly contained its share of excitement. The subsequent build that was released was another step in the journey though the new Start Menu appears more of a work in progress than it did in previous builds. Keeping up with these advances sometimes steps ahead of VirtualBox support for them and I discovered that again in the last few days. VMware Player seems unaffected so I thought that I’d try a migration of the VirtualBox VM with Windows 10 onto there. In the past, I did something similar with a 32-bit instance of Windows 7 that subsequently got upgraded all the the way up to 8.1 but that may not have been as slick as the latest effort so I thought that I would share it here.

The first step was to export the virtual machine as an OVF appliance and I used File > Export Appliance… only to make a foolish choice regarding the version of OVF. The one that I picked was 2.0 and I subsequently discovered that 1.0 was the better option. The equivalent command line would look like the following (there are two dashes before the ovf10 option below):

vboxmanage export [name of VM] -o [name of file].ova --ovf10

VMware have a tool for extracting virtual machines from OVF files that will generate a set of files that will work with Player and other similar products of theirs. It goes under the unsurprising name of OVF Tool and it usefully works from a command line session. When I first tried it with an OVF 2.0 files, I got the following error and it stopped doing anything as a result:

Line 2: Incorrect namespace found.

The only solution was to create a version 1.0 file and use a command like the following (it’s a single line though it wraps over two here and there are two dashes before the lax switch):

ovftool --lax [name of file].ova [directory location of VM files]/[name of file].vmx

The --lax option is needed to ensure successful execution even with an OVF 1.0 file as the input. Once I had done this on my Ubuntu GNOME system, the virtual machine could be opened up on VMware Player and I could use the latest build of Windows 10 at full screen, something that was not possible with VirtualBox. This may be how I survey the various builds of the operating that appear before its final edition is launched later this year.

Initial impressions of Windows 10

Being ever curious on the technology front, the release of the first build of a Technical Preview of Windows 10 was enough to get me having a look at what was on offer. The furore regarding Windows 8.x added to the interest so I went to the download page to get a 64-bit installation ISO image.

That got installed into a fresh VirtualBox virtual machine and the process worked smoothly to give something not so far removed from Windows 8.1. However, it took until release 4.3.18 of VirtualBox before the Guest additions had caught up with the Windows prototype so I signed up for the Windows Insider program and got a 64-bit ISO image to install the Enterprise preview of Windows 10 into a VMware virtual machine since and that supported full screen display of the preview while VirtualBox caught up with it.

Of course, the most obvious development was the return of the Start Menu and it works exactly as expected too. Initially, the apparent lack of an easy way to disable App panels had me going to Classic Shell for an acceptable Start Menu. It was only later that it dawned on me that unpinning these panels would deliver to me the undistracting result that I wanted.

Another feature that attracted my interest is the new virtual desktop functionality. Here I was expecting something like what I have used on Linux and UNIX. There, each workspace is a distinct desktop with only the applications open in a given workspace showing on a panel in there. Windows does not work that way with all applications visible on the taskbar regardless of what workspace they occupy, which causes clutter. Another deficiency is not having a desktop indicator on the taskbar instead of the Task View button. On Windows 7 and 8.x, I have been a user of VirtuaWin and this still works largely in the way that I expect of it too, except for any application windows that have some persistence associated with them; the Task Manager is an example and I include some security software in the same category too.

Even so, here are some keyboard shortcuts for anyone who wants to take advantage of the Windows 10 virtual desktop feature:

  • Create a new desktop: Windows key + Ctrl + D
  • Switch to previous desktop: Windows key + Ctrl + Left arrow
  • Switch to next desktop: Windows key + Ctrl + Right arrow

Otherwise, stability is excellent for a preview of a version of Windows that is early on its road to final release. An upgrade to a whole new build went smoothly when initiated following a prompt from the operating system itself. All installed applications were retained and a new taskbar button for notifications made its appearance alongside the existing Action Centre icon. So far, I am unsure what this does and whether the Action Centre button will be replaced in the fullness of time but I am happy to await where things go with this.

All is polished up to now and there is nothing to suggest that Windows 10 will not be to 8.x what 7 was to Vista. The Start Screen has been dispatched after what has proved to be a misadventure on the part of Microsoft. The PC still is with us and touchscreen devices like tablets are augmenting it instead of replacing it for any tasks involving some sort of creation. If anything, we have seen the PC evolve with laptops perhaps becoming more like the Surface Pro, at least when it comes to hybrid devices. However, we are not as happy smudge our PC screens quite like those on phones and tablets so a return to a more keyboard and mouse centred approach for some devices is a welcome one.

What I have here are just a few observations and there is more elsewhere, including a useful article by Ed Bott on ZDNet. All in all, we are early in the process for Windows 10 and, though it looks favourable so far, I will continue to keep an eye on how it progresses. It needs to be less experimental than Windows 8.x and it certainly is less schizophrenic and should not be a major jump for users of Windows 7.