Can I run same vm on different host machines

This is for discussing general topics about how to use VirtualBox.
iamageneralist
Posts: 9
Joined: 11. Sep 2009, 20:51
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, Linux

Can I run same vm on different host machines

Post by iamageneralist »

Can I use Virtual Box to run a VM installed on an esata drive from different computers.

Something along the line of:
- Load Virtual Box onto a Linux desktop, a XP desktop and a Vista laptop (hosts?)
- Create an XP VM on the esata drive with all of my software
- Run that same VM from any of the computers (hosts?) with Virtual Box
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can I run same vm on different host machines

Post by Sasquatch »

This can be done, I'm doing the same thing with my PC and laptop. There are a few things you have to consider:
  • No snapshots or saved states can be used, unless you keep changing the XML files manually. Not advised.
  • VM settings must be exactly the same. This isn't a problem for XP and Vista, as they can share the settings file, but it's a problem for the Linux host. Take very good care of it, so duplicate the MAC address of your virtual NICs too.
  • You can save the settings on the external drive too, but the VMs may not have the same name on the Windows and Linux Hosts if the Machine settings folder is the same. So having a VM called "Windows 7" on Windows Hosts forces you to use a different name for the Linux Host. XP and Vista can share the same name, it's all because of the settings file differences.
A solution for the latter can be that you use two different folders for the Machine settings. E.g. for Windows Hosts you use "Machines Windows" as settings folder, and for Linux you use "Machines Linux". That way, the VMs can have the same name, because they are separated in the file system hierarchy.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
iamageneralist
Posts: 9
Joined: 11. Sep 2009, 20:51
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: XP, Linux

Re: Can I run same vm on different host machines

Post by iamageneralist »

Sasquatch, thank you for your response.

I have over a hundred fairly 'heavy' programs that I use regularly (GIS mapping, database, graphics, CAD, etc) and trying to keep them updated and same version on multiple machines is a struggle.

This sounds like a good solution.

Some of what you mention I will need to become familiar with (snapshots, saved states, virtual NICs) but I am confident that I can work my way through it with the manuals, FAQ and forums.

Again, thanks.
AntiMatter
Volunteer
Posts: 176
Joined: 2. Nov 2008, 06:48
Primary OS: Ubuntu 12.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: All Windows (x32 & x64), Linux
Location: Canada

Re: Can I run same vm on different host machines

Post by AntiMatter »

One thing I would like to add: If the guest OS is Windows 7, when you change host, and the hardware (probably the CPU) is changed, the activation status of WIndows 7 could be reset. I have 4 different Win7 VM (two x32 and two x64), on all of them as soon as I change the host, the activation is reset. However, the same VM, when executed on the host when it was originally activated then the activation status becomes OK again.

This should be specific to Win7. I don't have such problem with Windows 2008 Server. I also confirm that the same VDI can be executed by different hosts. Ex: VM created on WinXP host, can run without any problem on Ubuntu 9.04 x64 host (and vice versa).
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can I run same vm on different host machines

Post by Sasquatch »

AntiMatter, that's something interesting. Are you 100% sure that every setting is the same? I know that a combination of MAC address and CPU ID can trigger a reactivation for XP and higher, but I never expected a simple CPU ID to cause the same issue. That would suck big time when your CPU dies and you have to replace it, or you just want to upgrade it. That should go without an activation penalty, unless you change more things at the same time.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
AntiMatter
Volunteer
Posts: 176
Joined: 2. Nov 2008, 06:48
Primary OS: Ubuntu 12.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: All Windows (x32 & x64), Linux
Location: Canada

Re: Can I run same vm on different host machines

Post by AntiMatter »

The 4 VMs with Win7 I have tested all have identical VM settings between the two hosts. I even went to the troubles of editing the network adapter MAC address manually to make them identical. The re-activation is systematically reproducible. I don't believe it is MAC related because network card is a simple accessory. In the tests I made, from the point of view of WIn7 inside the VM, the only thing it sees as difference is the CPU. (Laptop CPU = T7200, Desktop CPU = E8400). Everything else HD, Network, Video, etc. is the same because it's the same VDI file.

I think that is an intentional design of Win7 to avoid the multiplication of activated VM. And probably to sell more WIn7 licenses. In anyway, at least for me, that is the opposite which had happened, no more Win7 for me. I could just bring my desktop at work to have the network admin activate the Win7 VM. However, I found this re-activation very annoying. Added to this, the Win7 VM is too bloated. The same DEV VM using Windows 2003 is half of the size and boots twice faster.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can I run same vm on different host machines

Post by Sasquatch »

I saw PerryG having the same kind of behaviour with a VDI he cloned and attached to the original VM. Just the change of the hard disk UUID is enough to trigger an activation. MS is really going down a bad road with this 'feature'. I don't know if it's only for the root drive (the OS drive), or other hard drives in your system too, but if the latter is the case, expanding your system with a new hard drive so you have more storage would trigger another activation. That would really, majorly suck. I'll stick with Linux, much safer and no nasty activation junk.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
AntiMatter
Volunteer
Posts: 176
Joined: 2. Nov 2008, 06:48
Primary OS: Ubuntu 12.04
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: All Windows (x32 & x64), Linux
Location: Canada

Re: Can I run same vm on different host machines

Post by AntiMatter »

In the test I made, the VDI is the same physical files for both hosts.Therefore they have same UUID. These VMs has one single partition of 40 GB. The physical disks / partition layout of the two hosts are very different in my case. But it is irrelevent. Win7 inside the VM has no way to know the HD layout of the host.

The VDI files are stored in an external USB drive. When plugged into the laptop (host WInXP, where the Win7 VMs were activated at the office): all VMs appear as activated. When plugged into the desktop at home, they appear non-activated. Replugged to the laptop and rerun these VMs again, they become activated. Same behaviour on FOUR different Win7 (RTM, Enterprise version) VMs. I have tried to run the VM alternating the host machine several times. Each time the re-activation issue is reproducible.
psuescun
Posts: 1
Joined: 23. Sep 2009, 22:52
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows Server 2003, XP

Re: Can I run same vm on different host machines

Post by psuescun »

Hello, I created a Windows Server 2003 VM on VirtualBox running on a Mac OSX Host. Now I will like to move that VM to a Windows Host now... is there an easy way to do it? Can I copy the VDI file to the new host and create a new VM based on that file?

Thanks!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can I run same vm on different host machines

Post by Sasquatch »

psuescun wrote:Hello, I created a Windows Server 2003 VM on VirtualBox running on a Mac OSX Host. Now I will like to move that VM to a Windows Host now... is there an easy way to do it? Can I copy the VDI file to the new host and create a new VM based on that file?

Thanks!
Did you read this topic? Did you search as we ask in the Forum Posting Guide? This answer has been answered lots of times already. Answer will be in the VirtualBox FAQ.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can I run same vm on different host machines

Post by mpack »

AntiMatter wrote:In the tests I made, from the point of view of WIn7 inside the VM, the only thing it sees as difference is the CPU. (Laptop CPU = T7200, Desktop CPU = E8400).
It's possible that Win7 is making a specific test of desktop CPUID vs laptop CPUID. I mean if it detects that then you have clearly moved the VM onto a different host, right? You haven't just upgraded the CPU in your desktop host (I assume it must be a different form factor hence impossible to have a T7200 on the same m/b that originally had an E8400).
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can I run same vm on different host machines

Post by Sasquatch »

mpack wrote:
AntiMatter wrote:In the tests I made, from the point of view of WIn7 inside the VM, the only thing it sees as difference is the CPU. (Laptop CPU = T7200, Desktop CPU = E8400).
It's possible that Win7 is making a specific test of desktop CPUID vs laptop CPUID. I mean if it detects that then you have clearly moved the VM onto a different host, right? You haven't just upgraded the CPU in your desktop host (I assume it must be a different form factor hence impossible to have a T7200 on the same m/b that originally had an E8400).
You know that the CPU ID is no longer a valid reason for the reactivation of W7 he got, right?

@AntiMatter:
See the sticky that AntiMatter made in Windows Guests. We are discussing the reasons of activation triggers for different Windows versions.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can I run same vm on different host machines

Post by mpack »

Sasquatch wrote:You that the CPU ID is no longer a valid reason for the reactivation he got, right?
Hi Sasquatch - I think there's a typo in your sentence which makes your meaning hard to get. Are you asking if I agree that Antimatter's CPUID suggestion is now proved false? Or he has withdrawn it? If the latter, I may be missing where he withdrew it? Or maybe you're saying a conversation in another thread proved it false? I so, I don't remember other conversations dealing specifically with moving a Win7 guest from a desktop to a mobile CPU, so the question is still open IMHO.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Can I run same vm on different host machines

Post by Sasquatch »

I meant "you know that...". I edited my post to fix it. W7 doesn't take the CPU ID for activation calculations, at least not as a major difference. I know you can change the HD UUID, CPU ID and MAC at the same time without a reactivation.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
vic_123
Posts: 4
Joined: 24. Oct 2009, 05:06
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows Server 2008 R2

Re: Can I run same vm on different host machines

Post by vic_123 »

I'd like to add my experience - it is unclear how he moved VMs between hosts.
I have Win 7 hosts and Win 2008 R2 guests. 3.0.8 Virtual Box. Guest was created on one laptop and activated. To run it on different(second) laptop I create new VM, copy and attach VDI - just one. As soon As I start guest - it is not activated. I've looked through VirtualBox.xml and VM xml files - first thing is that creating new VM assigns it new ID. Then I just copied VM ID to second laptop's VM definition and voila - guest becomes activated.

Laptops have different CPUs, both dual core. Compared MAC starting guest with different VM ID - MAC stays the same. As soon as i change VM ID to be different from original - guest becomes not activated. I have no clue what is going on - just guessing that maybe guest is looking at something like "motherboard Id" or "BIOS System ID" and Virtual box assigns VM ID to one of these "virtual hardware" Ids, so guest sees it somehow.

It is indeed inconvenient and would be nice to know workaround or simply get it to be fixed.
Post Reply