How to use BoxManage make a virtual machine link copy?

Discussions related to using VirtualBox on Windows hosts.
Post Reply
zfr
Posts: 2
Joined: 20. Nov 2021, 11:19

How to use BoxManage make a virtual machine link copy?

Post by zfr »

My virtual box version is 6.1.28.
I have a machine name "machine1". Now, i want to make a link copy in filefolder "E:\link_copy1",name "link_copy_machine". Following is my code:
VBoxManage clonevm machine1 --basefolder E:\link_copy1 --name link_copy_machine--register --options Link

But, i get an error.Following is the error output:
VBoxManage.exe: error: Linked clone can only be created from a snapshot
VBoxManage.exe: error: Details: code E_INVALIDARG (0x80070057), component MachineWrap, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "CloneTo(trgMachine, mode, ComSafeArrayAsInParam(options), progress.asOutParam())" at line 608 of file VBoxManageMisc.cpp

How can i make a snapshot for my machin "machine1" ,where it stored and what is the suffix of snapshot.

Thanks.
zfr
Posts: 2
Joined: 20. Nov 2021, 11:19

Re: How to use BoxManage make a virtual machine link copy?

Post by zfr »

I solved my problem.

How to get snapshot? Click the right of machine then click snapshot,there is a list of snapshot.


VBoxManage clonevm machine1 --basefolder E:\link_copy1 --name="link_copy_machine" --register --options Link --snapshot="sn"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Machine has been successfully cloned as "link_copy_machine"
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to use BoxManage make a virtual machine link copy?

Post by scottgus1 »

Glad you found a solution!

Please be aware that snapshots and linked clones make the VMs a lot more delicate. Restorable host disk images containing the entire set of VMs, and restorable in-the-VM 3rd-party-backup-app backups of the data inside the VMs are a must if you'd cry fit to water the Sahara if something goes wrong.
Post Reply