Sunday, April 10, 2011

Debian 6.01 on Hyper-V

I've had intermittent luck making Ubuntu work in a Hyper-V environment: its been cantankerous, to say the least. A few weeks ago, I got Debian 6 running on it: today, it hosed its btrfs filesystem; probably because of Hyper-V's time skewing. I needed to reinstall, and after finding some 10.10 stuff to try, went back to trying Debian again...

1. When creating the virtual machine, use a "Legacy Network Adapter" and IDE drives: it won't work properly otherwise. For added stability, consider enabling the "Migrate to different computer" processor option, and a static hardware network address.
2. Use the small CD ISO network installer: AMD64 or i386.
3. During install, consider using XFS or JFS for your filesystems; ext4 performance varies widely, and there are rumors ext3 and btrfs can corrupt (experienced the latter for myself).
4. apt-get install adjtimex after you're up and running: it'll help the system compensate for Hyper-V's time skewing.
5. For added insurance that you'll be able to access your filesystems on boot, consider adding them to your initramfs. nano /etc/initramfs-tools/modules to make changes. I added the following so I could access XFS and BTRFS (to recover my older setup): btrfs zlib_deflate crc32c libcrc32c xfs exportfs
6. Debian 6 uses the 2.6.32 kernel by default. If you want to use the 2.6.38 kernel, check the sid 2.6 archive. For AMD64, you'll need to install: linux-base linux-headers-2.6.38-2-all linux-headers-2.6.38-2-amd64 linux-headers-2.6.38-2-common linux-kbuild-2.6.38 linux-image-2.6.38-2-amd64


References
* MS blog post on using 10.10 Ubuntu on Hyper-V
* Panterlo blog post on using 10.10 Ubuntu on Hyper-V