Hello
I would like to put my VMs onto an NFS share so that they can be run by one of several hosts (obviously not simultaneously!).
To make each host share the files I have made symbolic links on each machine
from ~/.VirtualBox to /shared/VirtualBox
from "~/VirtualBox VMs" to /shared/VMs
Now I can start a VM on host1, stop it, then start it on host2. Perfect.
But I can't stop a VM and save the state to a snapshot on host1, then resume that state on host2.
It gives the error "saved state file is invalid (VERR_FILE_NOT_FOUND)" and gives the wrong filename.
Since the two hosts are sharing configuration I can't see where it's getting the wrong filename from.
Is there some other local configuration that I've missed?
Share VM between multiple hosts
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Share VM between multiple hosts
You can also use the variable VBOX_USER_HOME to define the config folder. Then in the global preferences, you change the machine folder to that same location and you're done.
Now for the error, it's probably another cause. You can't put a VM in saved state on one machine and resume it on another. Same with live snapshots (a snapshot of a running machine). The CPU ID is what is the problem. If you change the CPU ID during OS operations, it can crash. So to avoid that, VB won't allow you to start or resume a VM on a Host that has a different CPU ID than is stored in the state file.
Now for the error, it's probably another cause. You can't put a VM in saved state on one machine and resume it on another. Same with live snapshots (a snapshot of a running machine). The CPU ID is what is the problem. If you change the CPU ID during OS operations, it can crash. So to avoid that, VB won't allow you to start or resume a VM on a Host that has a different CPU ID than is stored in the state file.
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.
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.
-
- Posts: 22
- Joined: 29. Mar 2011, 12:29
- Primary OS: Solaris
- VBox Version: OSE other
- Guest OSses: Solaris, Ubuntu
Re: Share VM between multiple hosts
Thanks for the reply, although it raises more questions!Sasquatch wrote:The CPU ID is what is the problem. VB won't allow you to start or resume a VM on a Host that has a different CPU ID than is stored in the state file.
1. It still doesn't explain how the two hosts have different names for the last saved-state 'snapshot,' unless there is some non-shared file?
2. Where is this 'state file' you talk about? What is it called and why is it not shared? Is that where the saved state info is recorded?
3. The CPUID of the two hosts is identical apart from one bit in the APIC ID. I guess I could make them identical with the VBoxManage modifyvm --cpuidset command?
Leaf no. EAX EBX ECX EDX
00000001 00010676 03040800 000ce3bd bfebfbff
vs
00000001 00010676 00040800 000ce3bd bfebfbff
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Share VM between multiple hosts
Saved States are in the Snapshots folder of the VM. I have shared my VMs between two hosts, but not it's saved state file (I could resume the VM, but it would error on the CPU ID). I did that by pointing the settings to the exact same location, had the same set up on both systems, symlinked .VirtualBox to the VM location and all was fine. Now, both systems had the same user and VM location, so unless you made things exactly the same, it will start to differ some time. Take a look at the location for snapshots in the VM settings.
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.
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.
-
- Posts: 22
- Joined: 29. Mar 2011, 12:29
- Primary OS: Solaris
- VBox Version: OSE other
- Guest OSses: Solaris, Ubuntu
Re: Share VM between multiple hosts
Yes I can see the saved state files, but virtualbox is looking for the wrong filename. There's a config file somewhere which contains out of date info.
1. start vm on host1, then stop and save state. creates file T18-47-27
2. start vm on host2, it reads the correct file T18-47-27 and continues (yes!)
3. stop vm on host2 and save state, it replaces the file with a new one T18-50-12
4. start vm on host1, it's looking for T18-47-27, won't start
Also:
5. resume vm on host2, power it off, state is 'powered off'
6. host1 still thinks it's in the 'saved' state (still looking for T18-47-27)
1. start vm on host1, then stop and save state. creates file T18-47-27
2. start vm on host2, it reads the correct file T18-47-27 and continues (yes!)
3. stop vm on host2 and save state, it replaces the file with a new one T18-50-12
4. start vm on host1, it's looking for T18-47-27, won't start
Also:
5. resume vm on host2, power it off, state is 'powered off'
6. host1 still thinks it's in the 'saved' state (still looking for T18-47-27)
-
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: PUEL
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
Re: Share VM between multiple hosts
Well, that's obvious then. Something isn't set up right on one of the two Hosts. Since I can't look in your systems, you have to debug it yourself. Remember that this situation isn't completely supported the way we do it.
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.
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.