Page 1 of 1

Question regards to a command line command for virtual box

Posted: 8. Apr 2013, 14:26
by Raghavsood999
Hi people, I need help with the following:

I want to use virtual pc on windows 8 but I cant. so somebody suggested that I can use hyper v which is another great utility on windows 8 to run virtual pc.

I want to use the .VDI file on hyper V but I have to use .VHD because hyper v only supports the .VDH (virtual hard disks ) format, so I would like to convert that harddisk for windows server 2012 essentials.VDI which is in the format for oracle virtual box ( .VDI) .
I use the following command:


::::::::::::::::::::::::::::::::::::::::::::


VBoxManage clonehd source.vdi target.vhd --format vhd -- I use the following command.






i did:
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

From this location, to convert the vdi to vdh for hyper v in windows 8 i ran:

c:\Program Files\Oracle>

Now i am in the oracle Vm directory.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

So next i perform the follwing command:




VBOXMANAGE clonehd "C:\Downloads\Software\Intranet 2013 I
T Course TAFE\Harddisks Files\Windows Server 2012 Essentials.VDI" "C:\Users\Hp Pav
ilion Dv6\Desktop\WS2012.VHD" --format vdh

Now, I am having trouble running the command.
See I insert quotation marks as well as no quatations marks. I have heard that the command line does not like spaces so I inserted quotes. However, nothing seems to work.
Just remember the command is called: VBOXMANAGE and that's to manage the rest of the arguments of the command like the conversion of the .vdi to A .vdh FORMAT.

I HAVE TO DO THAT OR ELESE IT WOULD BE IMPOSSABLE TO EXECUTE THE .VDI ON HYPER V. Please don't tell me anything about installing that hyper v feature as I have already done so. As far as I know it is a virtualisation utility that can be found in windows 8 professional. my computer and hardware drivers are updated.
I still having trouble so please help me .
Thanks in advance.
Raghav.

Re: Question regards to a command line command for virtual b

Posted: 8. Apr 2013, 16:38
by mpack
(Moved to "Windows Hosts" since your question has nothing to do with programming using the VirtualBox API).

If you don't tell us the error message then there isn't a lot we can say. "Nothing seems to work" is not useful information.

One of your most obvious errors is repeatedly interchanging VDH with VHD. VHD is correct, the other is not. The correct command sequence would be :-

Code: Select all

cd "\Program Files\Oracle\VirtualBox"
VBoxManage clonehd "path to source file in quotes" "path to destination file in quotes" --format VHD
The VBoxManage command line may be case sensitive, meaning that "--format VHD" is not the same as "--Format vhd". In fact I'm not sure about this because I've never tested it - all I know is that the user manual says "--format VHD", hence that is what I use.

One final note: "Program Files\Oracle\VirtualBox" is the program folder, not the VM folder. The VM folder is <userdoc>\VirtualBox VMs\<VM name>. You can either type the full path to the VBoxManage executable, or you can "cd" to the program path as shown, but then you must provide a complete path to the data file.