# Migrating from VM (qemu) to dedicated harddrive



## Mattias (Sep 15, 2011)

Before I start working on a new server setup I'd really like to know if it's a good idea to start off on a virtual machine (qemu in my case).

More specifically:

Are there any known implications/restrictions hardware/software wise?
How could one make the configuration as simple and clear as possible to adopt to the new hardware (abstraction)?
Anything else?

Input very much appreciated!


----------



## wblock@ (Sep 15, 2011)

Use labels for disk devices or filesystems.
Use ifconfig_DEFAULT="whatever" to set the Ethernet card.  Might not work if you have multiple Ethernet cards.
Don't use CPUTYPE?= in /etc/make.conf.

Will it run X?


----------



## Mattias (Sep 15, 2011)

wblock said:
			
		

> Use labels for disk devices or filesystems.
> Use ifconfig_DEFAULT="whatever" to set the Ethernet card.  Might not work if you have multiple Ethernet cards.
> Don't use CPUTYPE?= in /etc/make.conf.
> 
> Will it run X?



Thanks! I realize a lot good suggestions are to be found in similar topics (physical HD -> VM, HD -> HD, etc). Use of labels seems to be _very_ encouraged! As opposed to anything X related. To answer your question on that:
I do plan to experiment with X, but probably not before migration. I want to run a TV-out service kind-of-thing, thus making use of the TV-out card in the "production box". I might also want to play around with thin clients. I won't have any use for an attached monitor in the final setup. Any thoughts on that?


----------



## wblock@ (Sep 15, 2011)

A few.  I have an xfce setup that is built to run on any random computer.  It has all the most common X drivers installed.  A skeleton xorg.conf lets xorg autodetect everything else.  A network media server may not need anything but the X libraries if it'll be sending everything out over the net.


----------



## Mattias (Sep 15, 2011)

From that I derive:

Driver portability as far as possible (X, ...?)
Use of automatic configuration (X, disk labels, more?)
Variables/labels in configuration files (firewall, rc.conf defaults, more?)
Keeping that in mind can save some head scratching indeed. I assume a basic jails setup (default device access) will work w/o hassle after migration, is that wrong?


----------



## wblock@ (Sep 15, 2011)

Haven't tried moving a machine with jails from or to a VM, but I'd expect it to work.


----------



## Mattias (Sep 18, 2011)

Problematic software (mplayer)

http://www.freebsd.org/doc/handbook/video-playback.html


> 7.4.2.1.1 Building MPlayer
> 
> MPlayer resides in multimedia/mplayer. MPlayer performs a variety of hardware checks during the build process, resulting in a binary which will not be portable from one system to another. Therefore, it is important to build it from ports and not to use a binary package.
> [...]


----------



## wblock@ (Sep 18, 2011)

Don't turn on OCFLAGS in the mplayer port options.  Or do, but plan on rebuilding it after moving to a new system with a different CPU.


----------

