Is it possible to create a new guest in existing folder?

This is for discussing general topics about how to use VirtualBox.
Post Reply
ohaya
Posts: 59
Joined: 31. Dec 2012, 08:08

Is it possible to create a new guest in existing folder?

Post by ohaya »

Hi,

I'm new to VBox, but I was wondering if it's possible to create a new guest in an existing folder?

The reason for the question is that I'm migrating some VMware guests to VBox, so I have the VMDKs. What I'd like to do is:

- Create a folder
- Put the VMDKs in that folder
- Create the VBox guest files in that folder, pointing to the VMDK(s)

It seems like VBox won't let you do that. When I create a new guest, and give it the name, it says that the folder already exists. So what I've been having to do is create the guest, and then move the VMDKs into the folder. Some are quite large, so it's a bit time-consuming.

Thanks,
Jim
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Is it possible to create a new guest in existing folde

Post by Perryg »

If you have a lot of guests that you need to add you could set the default location to the folder that has them in the preference section. But be aware the unless you remove the VMware additions you are going to have problems.
ohaya
Posts: 59
Joined: 31. Dec 2012, 08:08

Re: Is it possible to create a new guest in existing folde

Post by ohaya »

Hi Perry,

I've already set the default location. I have a drive just for my guests, /mnt/vmguests, and that's what I have in the default location.

However, I like to keep the files for each guest under a directory just for the guest, named identically to the guest name, so I'd have:

/mnt/vmguests/guest1
/mnt/vmguests/guest2
etc.

As I tried to explain, I'd like to be able to copy the VMDKs to the correct directory, and then create the guest using the VirtualBox GUI, but the problem is that if the directory exists already, as above, it won't create the new guest.

Maybe it's just the way that I'm use to doing things with VMware. I guess that I could create a guest without any disk, and then copy the VMDK over, but as I said it's cumbersome.

Thanks,
Jim
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: Is it possible to create a new guest in existing folde

Post by mpack »

It's possible to do it, but you must let VirtualBox create the folder. What you do is you start the VM creation wizard (this creates the folder) and when you get to the hdd creation step you select "Use existing", and at that point you switch away to the host and move the VMDK into the new VM folder, then switch back to select the file and continue the wizard.
ohaya
Posts: 59
Joined: 31. Dec 2012, 08:08

Re: Is it possible to create a new guest in existing folde

Post by ohaya »

Hi,

I guess that the answer to my original question is "no". If I do end up migrating completely to VB, I guess that I'll just have to change the way that I do this (FYI, VMware pops up a warning, but let's you go ahead and create the new guest in the selected directory).

Jim
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: Is it possible to create a new guest in existing folde

Post by mpack »

Actually, I seem to recall that one regular user does this regularly, and what happens is that VM files get located in the folder - without a warning. Because of that you have to be very careful not to have two active VMs located in the same folder, the log file names for example would clash. However this behaviour is not documented and since it can be regarded as a bug I wouldn't count on it always working like that - a warning would be nice.
Post Reply