Page 1 of 1

Is there any chance of getting a vm to work on another sys?

Posted: 15. Jan 2011, 07:23
by Red Squirrel
I am wondering, if I have two systems that arn't the same, can I copy a VM over and have it actually boot? Is it just at thing of running the register command on it?

Re: Is there any chance of getting a vm to work on another sys?

Posted: 15. Jan 2011, 08:10
by stefan.becker
Depends on CPU. Mostly it works. Try imoport / export feature of VBOX.

Re: Is there any chance of getting a vm to work on another sys?

Posted: 15. Jan 2011, 11:38
by HubTou
Hello,
Red Squirrel wrote:if I have two systems that arn't the same, can I copy a VM over and have it actually boot? Is it just at thing of running the register command on it?
We do it all the time. We usually prepare our VM on Windows or MacOS X workstations and run them on a FreeBSD HeV server (http://www.project-hev.org).
Red Squirrel wrote:Is it just at thing of running the register command on it?
You just move the vdi files, register the VM and declare the parameters:

Most of them are the same whatever the VM (we set them in a common file).

Some are VM dependent. For example:
  • VBoxManage -q modifyvm "${VM}" --ostype RedHat
  • VBoxManage -q storagectl "${VM}" --name "SCSI Controller" --add scsi
  • VBoxManage -q storageattach "${VM}" --storagectl "SCSI Controller" --port 0 --device 0 --type hdd --medium kt-centos.vdi
  • VBoxManage -q modifyvm "${VM}" --nic1 nat
  • VBoxManage -q modifyvm "${VM}" --nictype1 82540EM
  • VBoxManage -q modifyvm "${VM}" --ioapic off
Some are instance (runtime) dependent. For example:
  • VBoxManage -q modifyvm "${VM}" --cpus 1
  • VBoxManage -q modifyvm "${VM}" --memory 1024
  • VBoxManage -q modifyvm "${VM}" --vram 8
Best regards,

Hubert

Re: Is there any chance of getting a vm to work on another sys?

Posted: 15. Jan 2011, 23:50
by Red Squirrel
Good to know, thanks.

At some point I want to make something like vSphere were VMs can run off multiple hosts and be moved from host to host.

Re: Is there any chance of getting a vm to work on another sys?

Posted: 16. Jan 2011, 13:11
by HubTou
Hello,
Red Squirrel wrote:I want to make something like vSphere were VMs can run off multiple hosts and be moved from host to host.
That's the point of Project HeV.

From the web site:
The HeV project (short for virtual hosting, pronounced Eve) offers an open source solution for building “Virtual Private Clouds” with servers that may be indifferently located either within the user organization or dedicated servers offered by many hosting providers. Systems and applications deployed on these servers can be moved at will and without any modification between different infrastructure providers!
All the system and virtualization operations are supposed to be done locally or remotely through a component named VBoxHost :
# vboxhost
VBoxHost v0.108 (09/08/2010) / Hubert Tournier

Usage:
 vboxhost {setup}
 vboxhost {version|version-socle|version-sys|version-vb|outdated-sys|outdated-apps|vulnerable-apps}
 vboxhost {list|list-cpu|list-mem|list-ctrl|list-disks|list-eth|list-ip}
 vboxhost {load|uptime|vmstat|iostat|netstat|mem-use|disk-use}
 vboxhost {sync-ref|update-vbh|update-sys|update-apps|reboot|halt}
 vboxhost {show-log|reset-log|show-last|show-fw-count|reset-fw-count}
 vboxhost {register|status|upload|download} [vm-name]
 vboxhost {pack|coldbackup|hotbackup} [vm-name] [compression-level [password]]
 vboxhost {unpack|restore} [vm-name] [password]
 vboxhost {start|stop|restart|poll|show-ip|unregister} [vm-name]
 vboxhost {start-headless} {vm-name} {#cpu} {#MB memory}
 vboxhost {start-vnc} {vm-name} {port} {secret} {#cpu} {#MB memory}
 vboxhost {start-remote-x11} {vm-name} {display} {#cpu} {#MB memory}
 vboxhost {poweroff} {vm-name}
Remote invocations of VBoxHost are either done through SSH or Apache ActiveMQ (http://activemq.apache.org/index.html) tunneled through SSH.

An editor is currently working on a cloud management GUI.

Best regards,

Hubert

PS: i can provide more information if needed. Volunteers ae welcome...