Showing posts with label xvm. Show all posts
Showing posts with label xvm. Show all posts

Monday, 21 December 2009

iPhone on a Solaris Host

I'm a moderately happy owner of an iPhone and, as I'm usually running Solaris on my systems, I've struggled to find a working solution to connect my handset to an iTunes instance. One of the major drawbacks of the iPhone is that you really need iTunes: whether you want to upgrade it, back it up, or simply transfer the contents you purchased on the Apple stores, you need iTunes to get the job done.

I'm running several virtualized OS on my Solaris guests with Sun xVM VirtualBox, and never managed to make it work because of some limitations of the Solaris USB driver implementation. A couple of days ago, Sun announced the release of xVM VirtualBox 3.1.2 and in the changelog I read the following:
  • Solaris hosts: several USB fixes (including support for Apple iPhone)

I quickly updated my VirtualBox instance, quickly live-upgraded my Solaris Express Nevada build 116 to Nevada build 129 (during the installation, VirtualBox informed me that it needed recent Nevada builds for the USB kernel module to work properly), plugged the iPhone in an USB slot of a Sun Ultra 24 and it worked!





Sunday, 20 December 2009

Sun xVM VirtualBox v. 3.1.2 has been released

Sun xVM VirtualBox v. 3.1.2 has been released. This is a minor update and the current changelog is:
  • VMM: fixed SMP stability regression
  • USB: fixed USB related host crashes on 64 bits Windows hosts (#5237)
  • Main: wrong default HWVirtExExclusive value for new VMs (bug #5664)
  • Main: DVD passthrough setting was lost (bug #5681)
  • VBoxManage: iSCSI disks do not support adding a comment (bug #4460)
  • VBoxManage: added missing --cpus and --memory options to OVF --import
  • GUI: fixed VBox URL in update dialog for German and Dutch languages
  • GUI: NLS updates
  • OVF: fixed export of non standard storage controller names (bug #5643)
  • Solaris hosts: several USB fixes (including support for Apple iPhone)
  • Mac OS X hosts: several fixes for the 3D support
  • Mac OS X hosts: re-enabled CMD+Key combinations, even if the Host-Key isn't CMD (bug #5684)
  • Mac OS X hosts: fixed to fast scrolling if the mouse wheel is used inside the guest (bug #5672)
  • Mac OS X hosts: dock & menubar don't disappear in fullscreen when the VM is not running on the primary display (bug #1762)
  • Mac OS X hosts: added an option for enabling "Auto show Dock & Menubar in fullscreen" (bug #5636)
  • Windows host installer: fixed starting VBox with wrong privileges right after installation (bug #4162)
  • Host interface and host-only networking: prevent driver from unloading while a VM is still active (Windows host only)
  • Host-only networking: fixed host-only interface creation (Windows host only) (bug #5708)
  • Virtio-net: don't crash without an attached network
  • Virtio-net: fixed the issue with intermittent network in VM with several virtual CPU cores.
  • NAT: fixed port-forwarding regressions (bug #5666)
  • NAT: fixed crash under certain conditions (bug #5427)
  • NAT: fixed resolving of names containing a slash or underscore when using the host resolver DNS proxy (bug #5698)
  • ATA: fixed sporadic crash when resuming after a VM was forcefully paused (e.g. due to iSCSI target being unavailable)
  • SATA: fixed raw vmdk disks (bug #5724)
  • Linux guests: increased the default memory for Redhat and Fedora guests
  • Linux Guest Additions: fixed installation on RHEL 3.9 guests and on some 64bit guests
  • Linux Guest Additions: prevent SELinux warnings concerning text relocations in VBoxOGL.so (bug #5690)
  • X11 guests: fixed mouse support for some Xorg 1.4 guests (openSUSE 11.0)
  • X11 guests: fixed xorg.conf modification for some older Xorg releases (openSUSE 11.1)
  • Windows guests: fixed some VBoxService shutdown issues
  • Windows guests: fixed VBoxVideo spinlock issues on NT4
  • Windows Guest Additions: fixed uninstallation issues of NT4
  • Shared folders: fixed resolving of symlink target (bug #5631)
  • 2D Video acceleration: delay loading of OpenGL dlls for Windows hosts to avoid GUI crashes on misconfigured systems
  • 2D Video acceleration: fixed issues with video picture not displayed on playback

The changelog claims that support for Apple iPhone has been included for Solaris hosts. If working, that's what I'd been waiting for months!

Tuesday, 1 December 2009

Sun xVM VirtualBox v. 3.1.0 has been released

Sun xVM VirtualBox v. 3.1.0 has been released. This is a major update which introduces some brand-new great features such as (change log excerpt):
  • 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)

As far as it concerns myself, teleportation is the feature I was looking forward. Great job, guys.

Read the changelog.
Download Sun xVM VirtualBox now.


Tuesday, 17 November 2009

Sun xVM VirtualBox 3.0.12 has been released

On November, 17th, Sun has announced the release of Sun xVM VirtualBox 3.0.12. The changelog for this release is the following:
  • VMM: reduced IO-APIC overhead for 32 bits Windows NT/2000/XP/2003 guests; requires 64 bits support (VT-x only; bug #4392)
  • VMM: fixed double timer interrupt delivery on old Linux kernels using IO-APIC (caused guest time to run at double speed; bug #3135)
  • VMM: reinitialize VT-x and AMD-V after host suspend or hibernate; some BIOSes forget this (Windows hosts only; bug #5421)
  • VMM: fix loading of saved state when RAM preallocation is enabled
  • BIOS: ignore unknown shutdown codes instead of causing a guru meditation (bug #5389)
  • GUI: never start a VM on a single click into the selector window (bug #2676)
  • Serial: reduce the probability of lost bytes if the host end is connected to a raw file
  • VMDK: fix handling of split image variants and fix a 3.0.10 regression (bug #5355)
  • VRDP: fixed occasional VRDP server crash
  • Network: even if the virtual network cable was disconnected, some guests were able to send / receive packets (E1000; bug #5366)
  • Network: even if the virtual network cable was disconnected,
    the PCNet card received some spurious packets which might confuse the
    guest (bug #4496)
  • Shared folders: fixed changing case of file names (bug #2520)
  • Windows Additions: fix crash in seamless mode (contributed by Huihong Luo)
  • Linux Additions: fix writing to files opened in O_APPEND mode (bug #3805)
  • Solaris Additions: fix regression in guest additions driver
    which among other things caused lost guest property updates and
    periodic error messages being written to the system log

If you want to update or if you want to give VirtualBox a test drive, download it now.

Thursday, 29 October 2009

Sun xVM VirtualBox 3.0.10 has been released

Today, October 29th, Sun released a minor update for its flagship desktop virtualization solution, xVM VirtualBox. The changelog of VirtualBox 3.0.10 is the following:
  • VMM: guest SMP stability fixes
  • VMM: fixed guru meditation with nested paging and SMP guests (bug #5222)
  • VMM: changed VT-x/AMD-V usage to detect other active
    hypervisors; necessary for e.g. Windows 7 XP compatibility mode
    (Windows & Mac OS X hosts only; bug #4239)
  • VMM: guru meditation during SCO OpenServer installation and reboot (VT-x only; bug #5164)
  • VMM: fixed accessed bit handling in certain cases (bug #5248)
  • VMM: fixed VPID flushing (VT-x only)
  • VMM: fixed broken nested paging for 64 bits guests on 32 bits hosts (AMD-V only; bug #5285)
  • VMM: fixed loading of old saved states/snapshots (bug #3984)
  • Mac OS X hosts: fixed memory leaks (bug #5084)
  • Mac OS X hosts (Snow Leopard): fixed redraw problem in a dual screen setup (bug #4942)
  • Windows hosts: installer updates for Windows 7
  • Solaris hosts: out of memory handled incorrectly (bug #5241)
  • Solaris hosts: the previous fix for #5077 broke the DVD host support on Solaris 10 (VBox 3.0.8 regression)
  • Linux hosts: fixed module compilation against Linux 2.6.32rc4 and later
  • Guest Additions: fixed possible guest OS kernel memory exhaustion
  • Guest Additions: fixed stability issues with SMP guests
  • Windows Additions: fixed color depth issue with low resolution hosts, netbooks, etc. (bug #4935)
  • Windows Additions: fixed NO_MORE_FILES error when saving to shared folders (bug #4106)
  • Windows Additions: fixed subdirectory creation on shared folders (bug #4299)
  • Linux Additions: sendfile() returned -EOVERFLOW when executed on a shared folder (bug #2921)
  • Linux Additions: fixed incorrect disk usage value (non-Windows hosts only)
  • Linux installer: register the module sources at DKMS even if the package provides proper modules for the current running kernel
  • 3D support: removed invalid OpenGL assertion (bug #5158)
  • Network: fixed the Am79C973 PCNet emulation for QNX (and probably other) guests (bug #3206)
  • VMDK: fix handling of split image variants
  • VHD: do not delay updating the footer when expanding the image to prevent image inconsistency
  • USB: stability fix for some USB 2.0 devices
  • GUI: added a search index to the .chm help file
  • GUI/Windows hosts: fixed CapsLock handling on French keyboards (bug #2025)
  • Shared clipboard/X11 hosts: fixed a crash when clipboard initialisation failed (bug #4987)

If you want to give VirtualBox a try, you can go and download the package for your platform of choice.

Sunday, 11 October 2009

Sun xVM VirtualBox v. 3.0.8 has been released

On October, 6th 2009 Sun Microsystems announced the release of a minor update to its flagship desktop virtualization solution, Sun xVM VirtualBox v. 3.0.8. As usual, you can check the changelog out at this address.

  • VMM: fixed 64 bits guest on 32 bits host regression in 3.0.6 (VT-x only; bug #4947)
  • VMM: fixed a recompiler triple fault guru meditation (VT-x & AMD-V only; bug #5058)
  • VMM: fixed hang after guest state restore (AMD-V, 32 bits Windows guest and IO-APIC enabled only; bug #5059)
  • VMM: fixed paging issue with OS/2 guests
  • VMM: fixed guru meditation in rare cases (2.0 regression; software virtualization only)
  • VMM: fixed release assertion during state restore when using the Sound Blaster 16 emulation (bug #5042)
  • Security: fixed vulnerability that allowed to execute commands with root privileges
  • Linux hosts: fixed runtime assertion in semaphore implementation which was triggered under certain conditions (bug #616)
  • Linux hosts: change the default USB access mode on certain distributions (bugs #3394 and #4291)
  • Linux hosts: on hardened Gentoo, the VBoxSVC daemon crashed by opening the VM network settings (bug #3732)
  • Linux hosts, Solaris hosts: pass the XAUTHORITY variable along
    the DISPLAY variable when starting a VM from VBoxManage or from the VM
    selector (bug #5063)
  • Linux hosts: use sysfs to enumerate host drives if hal is not available
  • Solaris hosts: fixed a bug which would hang the host sporadically as interrupts were not re-enabled everytime
  • Solaris hosts: fixed a kernel panic with bridged and host-only networking (bug #4775)
  • Solaris hosts: fixed incorrectly persistent CD/DVD-ROMs when changing them (bug #5077)
  • X11-based hosts: support additional function keys on Sun keyboards (bug #4907)
  • Mac OS X hosts (Snow Leopard): fixed problem starting headless VMs without a graphical session (bug #5002)
  • Mac OS X hosts: fixed problem listing host-only adapter names with trailing garbage (attached VMs won't start)
  • Windows Additions: now work with Vista 64-bit Home editions (bug #3865)
  • Windows Additions: fixed screen corruption with ZoomText Magnifier
  • Windows Additions: fixed NPGetUniversalName failure (bug #4853)
  • Windows Additions: fixed Windows NT regression (bug #4946)
  • Windows Additions: fixed VBoxService not running if no Shared Folders are installed
  • Linux Additions: implemented ftrunctate (bug #4771)
  • VRDP: start VM even if configured VRDP port is in use
  • Networking: the PCnet network device stopped receiving under rare conditions (bug #4870)
  • VBoxManage: implemented controlvm vrdpport command
  • iSCSI: fixed issue with NetApp targets (#5072)
  • SCSI: add support for virtual disks larger than 2TB
  • USB: fixed potential crash when unplugging USB2 devices (bug #5089)
  • NAT: IPSEC did not properly work with Linux guests (bug #4801)

Wednesday, 5 August 2009

Sun xVM VirtualBox v. 3.0.4 has been released

On August 4, 2009, Sun Microsystems has released the last minor update to its desktop virtualization solution, xVM VirtualBox. Here's the changelog, as usual.

This is really a maintenance review and there's really nothing new under the Sun. I didn't hit any of the fixed bugs. If you did, it's time to upgrade.

Download Sun xVM VirtualBox.

Tuesday, 7 July 2009

Sun xVM VirtualBox 3.0.0 has been released

Oh yes, a brand new major version. Sun xVM VirtualBox v. 3.0.0 has just been released. Here's the changelog, as usual.

Great features has been introduced:
  • Guest SMP support. Oh yes: guest SMP support (up to 32 CPUs)!
  • Experimental Direct3D 8/9 support for Windows guests
  • OpenGL 2.0 support for Solaris, Linux and Windows guest.
The feature I was interested in was guest SMP support. I admit I'm not running critical tasks here in my laptop but I do have some use cases that would greatly benefit from it: I'm running Windows guests for .NET development using Visual Studio 2008 and yes, there, you can see the difference.

Configuration is just as easy as this:


So download it and enjoy!

Wednesday, 3 June 2009

Sun xVM VirtualBox 2.2.4 has been released



Sun xVM VirtualBox version 2.2.4 has been released and, as usually, can be downloaded here. The changelog for this version, as reported by the official website, is:

  • Windows Installer: fixed a potential hang during installation
  • Windows Installer: fixed several problems (bug Fixed in SVN (closed)">#3892)
  • Solaris hosts: make it work with Solaris build 114 or later (bug Fixed in SVN (closed)">#3981)
  • Solaris hosts: fixed a bug serial port character handling found during loopback (bug fixed in SVN (closed)">#3120)
  • Linux hosts: adapted vboxdrv.sh to the latest changes in VBoxManage list runningvms (bug #4034)
  • Windows hosts: fixed a crash caused by host-only/bridged networking
  • Mac OS X hosts: fixed access to host DVD with passthrough disabled (bug #4077)
  • Guest Additions: fixed problems with KDE 4 not recognizing mouse clicks
  • Windows Additions: fixed incorrect 8-bit guest color depth in Windows 7 guests
  • GUI: warn if VT-x/AMD-V could not be enabled for guests that require this setting (bug ... (closed)">#4055)
  • VMM: fixed occassional crash due to insuffient memory
  • VMM: fixed hanging 64 bits Solaris guests
  • VMM: restore from a saved state occassionally failed (bugs #3984 and #2742)
  • Clipboard: fixed a deadlock while shutting down the shared clipboard on X11 hosts (bug fixed in SVN (closed)">#4020)
  • OVF: fixed potential hang during import
  • OVF: fixed potential crashes during import/export on Win64 hosts
  • VBoxManage modifyhd --compact: fixed bug which could lead to crashes and image corruption (bug --compact broken in 2.2.2 (closed)">#3864)
  • VBoxManage metrics collect: now flushes the output stream.
  • VHD: made VBoxManage internalcommands sethduuid work for .vhd files (bug does not work for VHDs => ... (closed)">#3443)
  • VHD: some .vhd files could not be cloned (bug #4080)
  • VMDK: fixed creating snapshots
  • NAT: improvement of TCP connection establisment (bug Fixed in SVN (closed)">#2987)
  • NAT: fixed order of DNS servers in DHCP lease (bug fixed in svn (closed)">#4091)
  • NAT: fixed DHCP lease for multiple name servers (bug Fixed in svn (closed)">#3692)
  • NAT: fixed a potential segfault if the host lost its connectivity (bug #3964)
  • Shared Folders: deny access to parent directories on Windows hosts (bug #4090)
  • Shared Folders: make rm/rmdir work with Solaris guests on Windows hosts
  • Networking: fixed the problem with blocked receiving thread when a broadcast packet arrives too early to be handled by uninitialized e1000 adapter.
  • Networking: fixed the problem that caused host freezes/crashes when using bridged mode with host’s interface having RX checksum offloading on (bug Fixed in SVN (closed)">#3926 and related). Fixes problems with TX offloading as well (bug Fixed in SVN (closed)">#3870)
  • PXE boot: Added support for PRO/1000 MT Server adapter.
  • Python bindings: fixed keyword conflict
  • SCSI: fixed occasional crashes on Win64
  • Serial: allow to redirect the serial port to a raw file (bug Fixed in SVN (closed)">#1023)
  • VRDP: fixed a rare incorre
  • ct screen updat

You'll have noticed bug 3864 in the list of fixes above. I unfortunately hit this before upgrading and, hadn't I done a ZFS send of the file system I was working on, I would have probably lost my VDI image. I strongly suggest you to upgrade to version 2.2.4 or not to run VBoxManage --compact at all.

Friday, 8 May 2009

Sparing disk space with ZFS clones while setting up a developer environment for multiple users

I have got some Solaris 10 workstations which are shared by a bunch of users which daily develop their application in the native Solaris 10 OS. Every user has to be able to log in in whichever machine and use his own environment. For this reason we took the usual approach of setting up NFS remote mounting of home directories and managing user accounts in an LDAP.

The developers also use a virtualized Windows and a virtualized Debian GNU/Linux during their duties and the initial deploy of the workstations didn't take into account the viability of accessing via NFS files as big as xVM hard disks. Replicating hard disk images was an issue and saving workstations hard disk space was another: with an average 15 GB per hard disk (OS and applications fully configured), per OS, per user, the 200 GB hard disk that equips the workstations seemed insufficient.

In this case, and in all the cases where you can share at least an initial set of data, ZFS helped us solving this problem. ZFS clones are filesystems generated from a snapshot of another ZFS filesystem. Initially a clone consumes no space and, as modifications starts to be applied, it begin to diverge from the snapshot it was generated from and starts allocating space. In our case, I snapshotted the initial installation of Sun xVM VirtualBox, I created a clone per user and set the mountpoint of the ZFS filesystem into the user home directory:
# zfs snapshot virtualbox/installation/dir@initial
# zfs clone virtualbox/installation/dir@initial virtualbox/users/name-0
...
# zfs clone virtualbox/installation/dir@initial virtualbox/users/name-n
# zfs set mountpoint=/export/name-0/.VirtualBox virtualbox/users/name-0
...
# zfs set mountpoint=/export/name-n/.VirtualBox virtualbox/users/name-0
ZFS clones spared me a lot of troubles and, moreover, every user has got a dedicated filesystems for its VirtualBox with all of the advantages provided by ZFS such as snapshots, restores and backups. We used the same approach to provide a common set of low-volatility filesystems to our users such as big SVN repositories and documentation directories.

Monday, 4 May 2009

Sun xVM VirtualBox v. 2.2: USB support on {Open}Solaris works and HP's multifunction printers work like a charm.

As I told you on another post I had some problems with VirtualBox on a Solaris host: missing USB support not only meant that USB devices were unmanageable, it also meant that other software (such as HP's solution center for multifunction printers) wouldn't even install because of that missing feature. I planned to use my printer though the Ethernet interface but the software wouldn't install.

Until I installed Sun xVM VirtualBox v. 2.2. Experimental USB support was sufficient for HP's software to install and the printer worked perfectly both from Windows and Linux guests. Direct access to the printer by setting up a filter was straight forward.

A note about networking configuration: HP's solution center uses a certain number of TCP and UDP ports to communicate with the multifunction device. The printer documentation was detailed and setting up a firewall or a set of NAT rules wouldn't be hard. By the way, once I realized that the problems I was experiencing with the scanner were due to VirtualBox's default network configuration, I decided to change the guest's network settings.

If you're a Solaris Express user who regularly updates its system, you'd probably read about Crossbow project. Crossbow project, which was integrated in Nevada build 105, aims to provide the building blocks for network virtualization on Solaris hosts. The first thing I thought about was, indeed, creating a virtual NIC. But the solution was easier than that and it's called "Bridged networks" on VirtualBox's jargon. You simply change the adapter configuration for you VirtualBox host from NAT to Bridged and you optionally choose the physical NIC you want to bridge upon, in the case your system has more than one. Boot your guest OS and you'll have a virtual NIC at your disposal, without the limitations of the NAT configuration. And if you are communicating with the "outside world", such as a network multifunction printer or some CIFS client, your guest OS' NIC will appear just as a physical NIC.

The only caveat to use this technique is that, on Solaris hosts, Virtual NICs and VirtualBox bridged networking isn't implemented (yet) on top of a Wireless NIC.

Enjoy,
Grey

Saturday, 17 January 2009

Running Windows on Sun xVM with Solaris Express Community Edition

Introduction

I'm waiting to see Sun xVM Server. It's a long wait, this, and I hope to see it soon. I've being using Sun xVM VirtualBox since quite a while and I'm really happy with it. The underlying technology is completely different, but I'm experiencing a feeling of hope that makes me think that Sun xVM Server quality will be at least the same.

Recently, I needed to set up an Active Directory for development purposes and while part of the team is happily running its .net development stack on top of a Sun xVM VirtualBox Windows guest, a quick test drive showed us that running a server on top of Sun xVM VirtualBox wasn't practical at all. That's why I set up a Solaris Express Community Edition machine: not only I wanted to test Sun xVM but I needed it.

All the commands shown in this post were executed on Solaris Express Community Edition build 103. Be aware that the output and the commands themselves are not stable yet.

The feeling of running unsupported software

It's unpleasant. Solaris Express Community Edition is rock solid. I'm using it on many machines and never let me down. But running a critical component on such an experimental technology, well, was something I wanted to avoid. That's the rationale behind using Solaris 10 even in our development machines, where I'm sure that Solaris Express Community Edition (or even OpenSolaris now), would greatly do their job; and the developers would also probably be happier.

I waited months hoping that Sun released Sun xVM Server just in time for us to be on schedule but project deadlines pushed me to deploy Solaris Express Community Edition instead. Documentation is not as up-to-date or easily retrievable as Solaris 10 is, but with a little help from Google and especially from a Sun white paper, Install Sun xVM Hypervisor and Use It to Configure Domains, setting up Windows 2003 Server guests was not that hard.

Setting up Windows

Setting up Windows 2003 Server was not as straight forward as I thought. The first times I tried it, indeed, I get stuck for a CD-related problem and that's where Sun's cited white paper really helped me a lot.

Checking up the system

The first thing to check is if xVM is installed and running. The following command should produce this output:

# /usr/bin/pkginfo | grep SUNWxvm
system SUNWxvmdomr Hypervisor Domain Tools (Root)
system SUNWxvmdomu Hypervisor Domain Tools (Usr)
system SUNWxvmh Hypervisor Header Files
system SUNWxvmhvm Hypervisor HVM
system SUNWxvmipar xVM PV IP address agent (Root)
system SUNWxvmipau xVM PV IP address agent (Usr)
system SUNWxvmpv xVM Paravirtualized Drivers
system SUNWxvmr Hypervisor (Root)
system SUNWxvmu Hypervisor (Usr)

Once logged in in the system running the hypervisor, be sure that relevant services are running:

# /usr/bin/svcs | grep xvm
[...]
online 0:15:07 svc:/system/xvm/console:default
online 0:15:08 svc:/system/xvm/xend:default
online 0:15:08 svc:/system/xvm/domains:default
[...]
online 0:15:09 svc:/system/xvm/store:default

The default network interface

The hypervisor, unless differently instructed, will use the first available NIC when setting up the network for its guests:

# dladm show-link
LINK CLASS MTU STATE OVER
e1000g0 phys 1500 up --

To specify the desired NIC for the guests, you can set xend service's config/default-nic property:

# /usr/sbin/svccfg -s xend 'setprop config/default-nic = astring: “yourNIC”'

and then restarting the services with svcadm.

Assigning space on the disk

You can assign space to your guest both using a dedicated ZPool or on a regular file. Using ZFS is undoubtedly easier but I had no ZPool available on that machine so I had to setup a regular file on UFS:

# mkfile 20g file-path

I created two 20 GB files which I used as disks for the new guests.

Installing the host OS

From here ahead, I just suggest you to follow the instructions on the white paper I linked above. Everything went as planned, including the glitches during Windows 2003 Server installation described in that document.

Running the guest

Basic commands

In this xVM version, you still have to use both virsh and xm to have a complete set of administrative command while managing your hosts. In the future virsh should completely replace xm but that's not yet the case.

Booting and shutting down a domain

To boot and to shutdown a domain you can use the following commands:

# virsh start [domain-name]
# virsh shutdown [domain-name]

In the case of Windows, I still prefer to connect to it and shut it down from its GUI.

Rebooting a guest

A guest may also be rebooted directly with the following command:

# virsh reboot [domain-name]

Suspending and resuming a guest

To suspend and subsequently resume a guest you can use the following commands:

# virsh suspend [domain-name]
# [...]
# virsh resume [domain-name]

Dumping a domain configuration

To dump the domain configuration in the case you need to examine it and modify it, you can use the following command (virsh will dump it on the standard output):

# virsh dump-xml [domain-name]

Loading a domain configuration

If you previously dumped and modified a domain configuration, you can redefine the domain using this command:

# virsh define [domain-configuration]

Determining the VNC display

To determine the display that VNC is using for a particular domain, you can use the following command:

# virsh vncdisplay [domain-name]

Examining existing domains

To determine the status of every existing domain, you can use the following command:

# virsh list --all
Id Name State
---------------------------------
0 Domain-0 running
2 winsrv2003 blocked

Domain winsrv2003 is listed as in a blocked state. This usually means that the domain is not running because it may be idle or waiting for I/O.

Block device related commands

The following commands are used to manage guests' block devices.

Mounting a CDROM

To mount a cdrom on a guest you can either directly mount the physical device or mounting and ISO image of the medium. The commands are:

# xm block-attach [domain-name] [device-type]:[path-to-device] [physical-drive]:[device-name] [options]

For example:

# xm block-attach [domain-name] phy:[path-to-device] hdb:cdrom r
# xm block-attach [domain-name] file:[path-to-device] hdb:cdrom r

Checking for device status

To check the block device status you can use the following command:

# xm block-list [domain-name] --long
(768
((backend-id 0)
(virtual-device 768)
(device-type disk)
(state 1)
(backend /local/domain/0/backend/vbd/11/768)
)
)
(5632
((backend-id 0)
(virtual-device 5632)
(device-type cdrom)
(state 1)
(backend /local/domain/0/backend/vbd/11/5632)
)
)

Unmounting a device

After detecting the device ID using the block-list command described in the previous section, you can use the following command to unmount a device:

# xm block-detach [domain-name] [device-id] -f

Before detaching a block device, the device should be unmounted and ejected in the guest OS first.

Impressions

The Windows guest runs pretty well, even if the machine seems slower while running the xVM kernel. I'm still doubting, moreover, if there's sort of a memory leak because as time passes by, vmstat shows that free memory and free swap are almost zero and the machine is indeed swapping on the disk.

For example, I'm running two Windows 2003 Server since a couple of SXCE build iterations and on build 103 I still continue to have the same problem. The machine is a Sun Ultra 20 M2 with 8 GB of RAM memory. Both domUs were dedicated 1 GB setting both mem-set and mem-max. This problem even shows up the same way even if I only boot one domU. When I boot the Windows domU, everything's fine and memory usage seems reasonable: dom0 has more or less 6 GB of dedicated memory and an unlimited mem-max. As times goes by, free memory goes down, free swap goes down and the machine begins to swap to disk and a moment comes I have to reboot. The effect is pretty clear with vmstat: free memory goes down to more or less 100 MB, free swap goes down too and the machine begins slowing down.

I found the description of this bug on Solaris Express release notes:

xVM Hypervisor Running Out of Memory

When running some non-Solaris domUs, you could encounter an issue where xVM hypervisor runs out of memory. This will generally be reflected by error messages generated to the dom0 console, in some cases in such high quantities that a reboot of the dom0 might be required to recover.

To avoid this, it is suggested that when running a non-Solaris domU, you manually balloon the amount of memory used by dom0 down to a smaller amount before booting the domU.

For example, if the dom0 is using 3500Mb, which can be determined via the xm list command, you would issue the following command to reduce its memory usage to 3000Mb:

xm mem-set Domain-0 3000

This should not be necessary when using a build-81 based dom0, or later.

This bug seems to explain the behavior I'm experiencing but it seems not applicable because I'm running build 103, while this bug is related to builds earlier than 81.

Other glitches

I experienced problems mounting and ejecting ISO images on Windows 2003 Server cdrom. Indeed, up to Solaris Express Community Edition build 103, I was experiencing bug 6749195: empty CD-ROM disappears from HVM domains. And when it disappeared, you had to reboot the domain. This made xVM unusable on production, at least if you needed the cdrom even only from time to time.

On build 103 and 104 I'm still noticing instabilities in xm block-attach behavior and I prefer using xm block-configure even when mounting an iso image on an empty cdrom.

Conclusions

Globally, I must say I'm pretty happy with xVM, such as I tried it on Solaris Express Community Edition since build 103. Nevertheless, as I said in the opening, the feeling of running unsupported software isn't that good when part of your business is relying on it. Still, I'm missing the performance, the stability and the ease of use of Sun xVM VirtualBox but I hope they'll find their way into Sun xVM Server.