Jump to content

Recommended Posts

Posted

Run virtual box in headless mode for a couple of vms. No issues, except I have deleted the .iso file that one was using. Now it wont start as it cant find the .iso

 

I cant figure out how to de-register the .iso from the VM at all...

 

any tips ?

Posted

Hi, I just looked at one of mine which has an iso included and it has an entry like below in its machine xml file under ~/.Virtualbox/Machines/machinename/machinename.xml

 

Might be worth trying to remove it.

  • Thanks 1
Posted
Run virtual box in headless mode for a couple of vms. No issues, except I have deleted the .iso file that one was using. Now it wont start as it cant find the .iso

 

I cant figure out how to de-register the .iso from the VM at all...

 

any tips ?

 

Is there something under VBoxManage modifyvm ?

 

 

Will look at mine in a bit

  • Thanks 1
Posted

Ive royally messed this up now. I tried removing the enrty for the dvd in the virtualbox.xml before I saw kmounts post, which most probably is the correct solution.

 

Now I get invalid machine name when trying to start the VM.

 

I guess i should have taken a copy before I started messing with it ;p

 

Can I create a new VM but use an existing vdi file ?

Posted

Yup, with VBoxManage modifyvm

 

VBoxManage createvm -name "Ubuntu 8.04 Server" -register

VBoxManage modifyvm "Ubuntu 8.04 Server" -memory "256MB" -acpi on -boot1 dvd -nic1 nat

VBoxManage createvdi -filename "Ubuntu_8_04_Server.vdi" -size 10000 -register

VBoxManage modifyvm "Ubuntu 8.04 Server" -hda "Ubuntu_8_04_Server.vdi"

VBoxManage registerimage dvd /home/ubuntu-8.04.1-server-i386.iso

VBoxManage modifyvm "Ubuntu 8.04 Server" -dvd /home/ubuntu-8.04.1-server-i386.iso

 

VBoxHeadless - Running Virtual Machines With VirtualBox 2.0 On A Headless Ubuntu 8.04 Server | HowtoForge - Linux Howtos and Tutorials

 

Granted its for an older version and I don't have tools at hand to test atm but should point you in the right direction.

  • Thanks 1
Posted

seems theyve changed the syntax a bit for 3.1.0

 

what used to be

 

VBoxManage modifyvm "2008Server" -memory "2048MB" -acpi on -boot1 dvd -nic1 hostif -hostifdev1 eth0

 

is now

 

VBoxManage modifyvm "2008Server" --memory 2048 --acpi on --boot1 dvd --nic1 hostif --hostonlyadapter1 eth0

 

for my settings.

 

Also, you have to now spefically create a storage controller first:

 

VBoxManage storagectl "2008Server" --name 2008server --add sata --controller IntelAhci

 

and then assign the file

 

VBoxManage storageattach "2008Server" --storagectl 2008server --port 0 --device 0 --type hdd --medium /root/.VirtualBox/VDI/2008Server.vdi

 

Only now can I start the VM

 

oasis ~ # VBoxHeadless -startvm 2008Server
VirtualBox Headless Interface 3.1.0
(C) 2008-2009 Sun Microsystems, Inc.
All rights reserved.

Listening on port 3389.

 

Might be worth me posting up a warning somewhere here not to upgrade to 3.1.0 blindly like I did without reading the changelog as this has changed dramatically.. and Im sure is also the reason my other VMs keep dropping out.

Posted

OK well that was causing the VM to bluescreen at boot

 

So Im thinking that as it was a IDE drive before and now I made it a sata, Ill try setting it back to IDE

 

VBoxManage storagectl "2008Server" --name 2008server --remove

to remove the sata drive

 

to remove it and then

 

VBoxManage storagectl "2008Server" --name 2008server --add ide

 

to create an IDE controller..

 

and then the same previous command to attach the existing .vdi to the new controller:

 

VBoxManage storageattach "2008Server" --storagectl 2008server --port 0 --device 0 --type hdd --medium /root/.VirtualBox/VDI/2008Server.vdi

 

And now it boots fine...

 

Hope these ramblings might help someone else...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...