VirtualBox – Dup on ping

I’ve had this with certain kernels (2009.06) on opensolaris. Seems there is some incompatibility between some kernels and the opensolaris virtualbox network emulation. This only seems to effect linux virtual guests.

When you try to ping an address you get something like this…

[root@VA-DHCPWEB ~]# ping 192.168.9.15
PING 192.168.9.15 (192.168.9.15) 56(84) bytes of data.
64 bytes from 192.168.9.15: icmp_seq=1 ttl=128 time=1.85 ms
64 bytes from 192.168.9.15: icmp_seq=1 ttl=127 time=1.88 ms (DUP!)

I usually forward a port from my dsl router through to a VM, but it does not like it when the network is performing as above. I’m yet to find a permanent fix other than dropping back a kernel level.

I have no VLANs configured, and just have a single unmanaged switch on a single subnet. There is only a single nic configured on the virtual guest. Found this, but didn’t seem to resolve my issues. http://www.virtualbox.org/ticket/2713

If i ping the IP of the vm host it does not have the DUP packets, so it seems to be anything beyond the host adapter.

Update: This problem seemed to show itself with the new kernel / updates on the 2009.06 release of opensolaris. I’ve reverted back to 2008.11 and all seems to be working fine again. It may have something to do with project crossbow (new virtualization around the networking space) http://www.opensolaris.com/use/ProjectCrossbow.pdf

ESXi 4 – new features

ESXi 4 has been released under a new infrastructure name “VMware vSphere 4.0”

Some of my favorite features so far;

  • Host Profiles – Finally you can just apply a host profile to a newly created vmhost. Previously this was a pain to setup all the storage / vlan configuration on each host.
  • Thin Provisioning – Awesome, now disk can be allocated dynamically allocated as needed. Just like it is on vmware virtual server. Perfect for a lab environment where performance is not needed.

http://vmware.com/

Opensolaris 2008.11 and xvm

I’ve been dabbling with virtual box up until this point. But have decided to take it to the next step by using xvm to run my virtual machines. I have taken a guide from BDerzhavets at this site : http://bderzhavets.blogspot.com/2008/12/xvm-on-opensolaris-2008.html

First step is to open package manager and find the “vitalization” grouping. Install everything in this group. You’ll probably find some packages are already installed.

Next you’ll need to add the xvm kernel to the grub startup menu (menu.1st). This bit is a bit of blind faith from my perspective – its a shame that the xvm kernel package doesn’t add itself to grub? Anyhow… You need to add the following as another boot option in the /rpool/boot/grub/menu.lst file;

title OpenSolaris 2008.11 snv_101b_rc2 X86 xVM
bootfs rpool/ROOT/opensolaris
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS

After a bit more reading you can apparently run bootadm -m upgrade to automatically ad the new kernel to the boot menu. But there might be some issues with on-boot? Some good info on this page : http://trevoro.ca/blog/2008/05/07/getting-xvm-to-work-in-opensolaris-200805/

…added the xVM entry automatically after performing the linkage steps. You will still need to add the ‘bootfs rpool/ROOT/opensolaris lines however.

Update : i have not implemented this yet – i’m currently happy with the stable file / virtual box server that i’m using at the moment. Its also a little early to check out this tech, as there is a lot of work being done at http://www.opensolaris.org/os/community/xen/ that is near completion.

Opensolaris – where has my memory gone?

Use this command in 2008.11 to get details on where your memory is currently being used…

echo ::memstat | pfexec mdb -k

Page Summary                Pages                MB  %Tot
————     —————-  —————-  —-
Kernel                     263992              1031   34%
ZFS File Data               91917               359   12%
Anon                       376867              1472   48%
Exec and libs               11484                44    1%
Page cache                   3387                13    0%
Free (cachelist)             9766                38    1%
Free (freelist)             24807                96    3%

Total                      782220              3055
Physical                   782219              3055

Note: ZFS should eat up the remainder of your ram after a bit of use.

“ZFS File Data” is the one to look at – if it is low then most of your ram may be eaten up in other areas of the system.

From the output above you can see that i have 3GB installed. I have a few VirtualBox VM’s running on my server which show up as “Anon”, they are consuming almost half of my ram.

Diskpart – resizing virtual machine system volumes (windows)

Diskpart works quite well extending disk sizes – …unless its the system disk that you need to extend.

Luckily in the virtual world its somewhat easier to move your disks about. This is a quick list of the steps required to increase your system disk… 

You will need to have another virtual machine available to boot into (windows 2003 etc) 

  1. Shut down the virtual machine with the system disk you wish to extend
  2. Go into virtual machine settings and increase the system drive size to what you require
  3. Now you need your spare w2k3 virtual machine or similar. While it is in a shutdown state add the system disk you wish to extend into this machine as another hard disk. Note: select “existing harddrive” and not the default option of  “new harddrive”, and point to the system drive you wish to extend (It is possible to attach this disk as long it is not on and being used) 
  4. Power up the spare machine with the newly attached hard drive (the drive you wish to extend) 
  5. Logon, open up cmd prompt and type “diskpart” 
  6. Now you need to find and select your disk. Type “list disk” to see available disk numbers (most likely the last drive letter). Then type “select disk #”   (# = the number you got from the list command)
  7. Next select the volume, similar to above type “list volume” then “select volume #
  8. Type “extend”
  9. Type “exit” 
  10. Done – shutdown the machine and disconnect the drive you just extended. Be carefull not to DELETE the drive, you only want to disconnect it. 
  11. Now you should be able to fire up the original machine and it will have a larger system drive. 

There are obviously other 3rd party utilities to do this but this is handy to know and is actually quite fast.