SlideShare a Scribd company logo
Running VirtualBox From The Linux Command Line
July 9th, 2012 | Author: jon
VirtualBox is a great piece of open source software that allows you to run a wide variety of operating systems as
virtual machines on the host operating system. I’ve only ever run VirtualBox under Windows but developed a
hankering to run it on my headless Fedora Linux home server. And apparently, this can be done! Here’s how.
First, you need to make sure you have the right package dependencies satisfied.
yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel
dkms
Okay.
This is geared towards Fedora Linux, but aside of the package manager specific stuff on installing VirtualBox, you
should be able to install and run VirtualBox on any flavour of Linux if you know it’s package manager syntax.
yum install VirtualBox
If you’re using CentOS or some other RedHat-based distribution and the VirtualBox package cannot be found, you
can install the repo file manually straight from VirtualBox itself.
cd /etc/yum.repos.d/
wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
yum update
yum install VirtualBox-4.2
Right – that was easy. You will probably find that you also need the VirtualBox kernel module installed for this
magic to happen. If you pre-loaded the module beforehand, no worries but like me, I’m guessing you haven’t :-)
/etc/sysconfig/modules/VirtualBox.modules
If this doesn’t work or you’re not using Fedora, you can try: –
/etc/init.d/vboxdrv setup
or..
service vboxdrv setup
The above will automatically create vboxusers group and user and also search and automatically rebuild required
kernel modules. If the below build process fails, you will get a warning messages. Please have a look at
“/var/log/vbox-install.log” to trace why the build process failed.
For this example, I’m going to install the 32-bit version of Ubuntu 10.10 Server with 1GB of RAM and a 10GB hard
disk. The first step will be to download the ISO image from Ubuntu.com. So make a directory for your VirtualBox
stuff and download the ISO file there.
mkdir ~/vbox
cd ~/vbox
wget http://old-releases.ubuntu.com/10.10/ubuntu-10.10-server-i386.iso
Now that you have the Ubuntu 10.10 Server installation CD file image, you can create your virtual machine and
register it with VirtualBox. I’m using the VM name of “Ubuntu-10-10-Server-32″ but you can use whatever you like
for the name.
VBoxManage createvm --name "Ubuntu-10-10-Server-32" --register
Next, we set up some basic parameters for the virtual machine. As stated previously, this VM is going to be
assigned 1GB of RAM. We’re also going to set the virtual DVD drive as the first boot device so that we can link it
to the ISO file and begin the installation when the virtual machine starts up. We also set the first network card to
bridged networking so that it gets it’s own IP address separate from the host OS and link it to the “eth0″ network
adapter. Bridged networking means that any virtual machine running will try to obtain an IP address from the
same source your currently active default network address got its IP address. Hence the term bridged, as the two
are connected. If you want to, you can assign it to “eth1″ or whatever is appropriate, but the default for Linux is
“eth0″ normally.
VBoxManage modifyvm "Ubuntu-10-10-Server-32" --memory 1024 --acpi on --boot1 dvd --nic1 bridged
--bridgeadapter1 eth0
The next step is to create a virtual hard disk and assign it a size. We want our VDI to be 10GB, so modify the
registered VM accordingly. I’ve named the VDI file as the same as the name of the virtual machine we’ve created:-
VBoxManage createhd --filename Ubuntu-10-10-Server-32.vdi --size 10000
You also need to create a virtual IDE controller. You can obviously create a SATA controller instead if you prefer
but for the purposes of this demonstration, we’ll use IDE.
VBoxManage storagectl "Ubuntu-10-10-Server-32" --name "IDE Controller" --add ide
he last step here is to attach the newly created IDE controller to the hard disk. We’ll use IDE port 0 for this.
VBoxManage storageattach "Ubuntu-10-10-Server-32" --storagectl "IDE Controller" --port 0 --device 0
--type hdd --medium Ubuntu-10-10-Server-32.vdi
We’ll also use the IDE controller to link the DVD drive to our ISO image file so that the operating system
installation can initialise.
VBoxManage storageattach "Ubuntu-10-10-Server-32" --storagectl "IDE Controller" --port 1 --device 0
--type dvddrive --medium ubuntu-10.10-desktop-i386.iso
We’re also going to set some miscellaneous virtual machine settings like the the amount of video RAM available to
the graphics card – in this case, 256MB – and setting 3D acceleration and audio controller drivers.
VBoxManage modifyvm "Ubuntu-10-10-Server-32" --vram 256 --accelerate3d on --audio alsa
--audiocontroller ac97
One final thing to do is to install the VirtualBox Extension pack – it’s on the download page. Make sure you
download the version appropriate for your version of VirtualBox. Oracle has modularised some functionality of
VirtualBox since version 4.0 and the extension pack is required for remote desktop connection support (VRDP)
which we’ll need in order to complete the installation of the virtual operating system.
You’ll need to be root for this, so:-
su - root
wget http://download.virtualbox.org/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12-
84980.vbox-extpack
Once you’ve downloaded the extension pack, install it with the following: –
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack
Now you can drop back down to a normal user by typing “exit”. Aside from installing the extension pack,
everything else can be achieved as a normal Linux user. Now that the extension pack is installed, you can set up
the virtual remote desktop connection. Here, I’m using a non-standard port of 45005, but if you’re happy to use
the default port (3389) you can omit the “vrdeport” parameter. Just make sure you have set your Fedora host
OS’s firewall to accept the connection.
VBoxManage modifyvm "Ubuntu-10-10-Server-32" --vrde on --vrdeport 45005
Now you can fire up your virtual machine to continue the OS installation. You can either use the Screen utility to
manage your terminal sessions or (as I have done below) load the VirtualBox process into background with
“nohup” and the “&” on the end.
nohup VBoxHeadless --startvm "Ubuntu-10-10-Server-32" &
Now you can either use rdesktop to connection via RDP or use Windows’ Remote Desktop Connection client.
Either way, if you’re on a non-standard port you’d use: –
rdesktop [YOUR_HOST_IP_ADDRESS]:[PORT]
This will connect you to your VM via the host IP address on which you’re running VirtualBox to continue the
installation. If, upon boot, you get the following error (as I did):-
piix4_smbus 0000.00.07.0: SMBus base address uninitialized - upgrade bios or use force_addr=0xaddr
Don’t worry about this for now. It’s an annoying warning but doesn’t affect anything at this point. Once the virtual
machine OS is installed, we can fix this easily. Go through your usual Ubuntu installation procedure and then once
the login prompt appears, switch windows back to your host Fedora bash prompt and power down the VM with: –
VBoxManage controlvm "Ubuntu-10-10-Server-32" powerof
We’re powering off the VM because we need to detach the ISO installation file for this Ubuntu VM, else every time
we fire up the virtual machine, it’ll load the ISO installation media again and now Ubuntu is installed we want to
boot straight into the VM. You can find out the information on which IDE (in this case – it could be SATA)
controllers are currently attached to the VM by running: –
VBoxManage showvminfo "Ubuntu-10-10-Server-32"
This will display a bunch of information about the current state of the VM. The line you’re looking for looks
something like: –
Storage Controller Name (0): IDE Controller
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
IDE Controller (0, 0): /home/vboxuser/vbox/Ubuntu-10-10-Server-32.vdi (UUID: 3e097b88-5feb-45c7-9e63-
2b7a6610dd4f)
IDE Controller (1, 0): /home/vboxuser/vbox/ubuntu-10.10-server-i386.iso (UUID: 51c9864e-0427-492e-871e-
a93109fd0d86)
You can now detach this device with: –
VBoxManage storageattach "Ubuntu-10-10-Server-32" --storagectl "IDE Controller" --port 1 --device 0
--medium emptydrive
If you run “vminfo” again, you’ll see the virtual DVD drive is now empty.
Storage Controller Name (0): IDE Controller
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
IDE Controller (0, 0): /home/vboxuser/vbox/Ubuntu-10-10-Server-32.vdi (UUID: 3e097b88-5feb-45c7-9e63-
2b7a6610dd4f)
IDE Controller (1, 0): Empty
Okay, now that’s taken care of, fire up the virtual machine again and use rdesktop or Microsoft’s RDP utility to log
back into your VM. If you want to make things easier for yourself at this point you could set up the SSH server and
log straight into your VM via your Fedora command line SSH client. Either way, you should now have shell access
to your Ubuntu 10.10 virtual server. Once you’ve logged in, you can find out your VM’s IP address in the usual
fashion with:-
ifconfig
This is far from ideal, but I’ve not found any way to get the bridged network IP address from the host OS
command line as of yet. A call to “vminfo” fails to show the IP address of the running guest VM. If anybody knows
how to do this, please leave a comment!
If you’ve not got that smbus base address error, you’re done – congratulations! Enjoy your Ubuntu virtual machine
running in Fedora :-)
Now to fix that annoying “piix4_smbus 0000.00.07.0: SMBus base address uninitialized – upgrade bios or use
force_addr=0xaddr” error (assuming this is a problem for you). It’s only a warning and doesn’t actually affect
anything, but it would be nice not to have it. This error is caused by the Ubuntu VM having no smbus but Ubuntu
always trying to load the kernel module anyway. So let’s disable that. First, check that the module is being loaded
with:-
lsmod | grep i2c_piix4
If so, you need to disable it. Open the following file in “vi” or whatever your favourite text editor is:-
vi /etc/modprobe.d/blacklist.conf
and add the line: –
blacklist i2c_piix4
Now reinitialise the RAMDisk with:-
update-initramfs -u -k all
Done. No more error.

More Related Content

DOCX
rgpv 7th sem for it & cs Cloud computing lab record
PDF
How to boot a VM form a Forensic Image
ODP
Virtual Box Presentation
ODP
Proxmox Talk - Linux Fest Northwest 2018
PDF
Domino9on centos6
PDF
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
PPT
Tech X Virtualization Tips
DOCX
Krenel Based Virtual Machine In Centos7
rgpv 7th sem for it & cs Cloud computing lab record
How to boot a VM form a Forensic Image
Virtual Box Presentation
Proxmox Talk - Linux Fest Northwest 2018
Domino9on centos6
Needle In An Encrypted Haystack: Forensics in a hardened environment (with Fu...
Tech X Virtualization Tips
Krenel Based Virtual Machine In Centos7

What's hot (20)

PDF
Installing and Configuring Domino 10 on CentOS 7
ODP
OpenSolaris 2009.06 Workshop
PDF
setting up v ms
PPTX
Proxmox for DevOps
PDF
Proxmox ve-datasheet
PDF
Oracle VM3: Virtuelle Maschinen per Script erstellen
ODP
FIWARE Lab Cloud Portal
PDF
Build a private cloud – prototype and test with open nebula
PPTX
Practical Introduction To Linux
PDF
Vcenter Server Appliance - Testing
PPTX
Mac osx snow leopard 10
PDF
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
PPT
An overview of OpenVZ virtualization technology
DOC
Creating a new virtual machine
PDF
Fedora Atomic Workshop handout for Fudcon Pune 2015
PDF
Cluster management (supercomputer)
DOCX
Installation of ESX Server
PDF
Run mac os x on pc
DOC
Creating a new virtual machine
Installing and Configuring Domino 10 on CentOS 7
OpenSolaris 2009.06 Workshop
setting up v ms
Proxmox for DevOps
Proxmox ve-datasheet
Oracle VM3: Virtuelle Maschinen per Script erstellen
FIWARE Lab Cloud Portal
Build a private cloud – prototype and test with open nebula
Practical Introduction To Linux
Vcenter Server Appliance - Testing
Mac osx snow leopard 10
OpenNebulaConf2015 2.02 Backing up your VM’s with Bacula - Alberto García
An overview of OpenVZ virtualization technology
Creating a new virtual machine
Fedora Atomic Workshop handout for Fudcon Pune 2015
Cluster management (supercomputer)
Installation of ESX Server
Run mac os x on pc
Creating a new virtual machine
Ad

Similar to Running virtual box from the linux command line (20)

ODP
VirtualBox Ubuntu Host Windows Guest
PDF
install CentOS 6.3 minimal on Hyper-V
PDF
Preparation study of_docker - (MOSG)
PDF
NetBSD on Google Compute Engine (en)
PDF
How to Install KVM (Kernel-based Virtual Machine) on Debian 12
PDF
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
PDF
12849144 how-to-install-a-cccam-server-on-windows
ODT
openQRM how-to: Setup UEC and openQRM cloud
PDF
Comando kvm terminal
PPTX
Virtualization and Socket Programing
DOCX
Dual boot with a vhd final
PDF
Howto Pxeboot
DOCX
Dockerfish-Tutorial
PDF
Startup guide for kvm on cent os 6
DOC
Virtual boxen
PDF
maXbox starter46 work with Wine
PPTX
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
PDF
How To Create The Ubuntu 20 VM Template For VMware Automation
PDF
Medooze MCU Video Multiconference Server Installation and configuration guide...
VirtualBox Ubuntu Host Windows Guest
install CentOS 6.3 minimal on Hyper-V
Preparation study of_docker - (MOSG)
NetBSD on Google Compute Engine (en)
How to Install KVM (Kernel-based Virtual Machine) on Debian 12
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
12849144 how-to-install-a-cccam-server-on-windows
openQRM how-to: Setup UEC and openQRM cloud
Comando kvm terminal
Virtualization and Socket Programing
Dual boot with a vhd final
Howto Pxeboot
Dockerfish-Tutorial
Startup guide for kvm on cent os 6
Virtual boxen
maXbox starter46 work with Wine
Virtualization technology "comparison vmware 9 vs virtualbox 4.2"
How To Create The Ubuntu 20 VM Template For VMware Automation
Medooze MCU Video Multiconference Server Installation and configuration guide...
Ad

More from Eric Javier Espino Man (14)

PDF
Cignex liferay-roadshow-singapore-27feb14-140304061735-phpapp02
PDF
Data warehouse omniture, rentabiliza tus datos analítica web
PDF
2014 02 florian-matthes-agile-enterprise-architecture-management
PDF
Ammar kamil thesis_final_workflow_modeling_tools_comparison
PDF
About freepower 012010
PDF
Elastix 2.4 vm ware appliance deployment guide
PDF
BER- AND COM-WAY OF CHANNEL- COMPLIANCE EVALUATION
PDF
Hp vertica 7.2.x_complete_documentation
PDF
ETSI TS 101 903
PDF
Separating pacs-servers-from-vna
PDF
White paper making an-operational_data_store_(ods)_the_center_of_your_data_...
PDF
Isa programme 2014 - guidelines for public administrations on e-document en...
PDF
Boe a-2011-13170
PDF
Dicom standards p02-conformance
Cignex liferay-roadshow-singapore-27feb14-140304061735-phpapp02
Data warehouse omniture, rentabiliza tus datos analítica web
2014 02 florian-matthes-agile-enterprise-architecture-management
Ammar kamil thesis_final_workflow_modeling_tools_comparison
About freepower 012010
Elastix 2.4 vm ware appliance deployment guide
BER- AND COM-WAY OF CHANNEL- COMPLIANCE EVALUATION
Hp vertica 7.2.x_complete_documentation
ETSI TS 101 903
Separating pacs-servers-from-vna
White paper making an-operational_data_store_(ods)_the_center_of_your_data_...
Isa programme 2014 - guidelines for public administrations on e-document en...
Boe a-2011-13170
Dicom standards p02-conformance

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
history of c programming in notes for students .pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
System and Network Administraation Chapter 3
PDF
medical staffing services at VALiNTRY
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
AI in Product Development-omnex systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Nekopoi APK 2025 free lastest update
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
System and Network Administration Chapter 2
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
CHAPTER 2 - PM Management and IT Context
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
VVF-Customer-Presentation2025-Ver1.9.pptx
Which alternative to Crystal Reports is best for small or large businesses.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
history of c programming in notes for students .pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
System and Network Administraation Chapter 3
medical staffing services at VALiNTRY
Internet Downloader Manager (IDM) Crack 6.42 Build 41
AI in Product Development-omnex systems
How to Migrate SBCGlobal Email to Yahoo Easily
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Nekopoi APK 2025 free lastest update
Odoo POS Development Services by CandidRoot Solutions
System and Network Administration Chapter 2
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...

Running virtual box from the linux command line

  • 1. Running VirtualBox From The Linux Command Line July 9th, 2012 | Author: jon VirtualBox is a great piece of open source software that allows you to run a wide variety of operating systems as virtual machines on the host operating system. I’ve only ever run VirtualBox under Windows but developed a hankering to run it on my headless Fedora Linux home server. And apparently, this can be done! Here’s how. First, you need to make sure you have the right package dependencies satisfied. yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms Okay. This is geared towards Fedora Linux, but aside of the package manager specific stuff on installing VirtualBox, you should be able to install and run VirtualBox on any flavour of Linux if you know it’s package manager syntax. yum install VirtualBox If you’re using CentOS or some other RedHat-based distribution and the VirtualBox package cannot be found, you can install the repo file manually straight from VirtualBox itself. cd /etc/yum.repos.d/ wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo yum update yum install VirtualBox-4.2 Right – that was easy. You will probably find that you also need the VirtualBox kernel module installed for this magic to happen. If you pre-loaded the module beforehand, no worries but like me, I’m guessing you haven’t :-) /etc/sysconfig/modules/VirtualBox.modules If this doesn’t work or you’re not using Fedora, you can try: – /etc/init.d/vboxdrv setup or.. service vboxdrv setup The above will automatically create vboxusers group and user and also search and automatically rebuild required kernel modules. If the below build process fails, you will get a warning messages. Please have a look at “/var/log/vbox-install.log” to trace why the build process failed. For this example, I’m going to install the 32-bit version of Ubuntu 10.10 Server with 1GB of RAM and a 10GB hard disk. The first step will be to download the ISO image from Ubuntu.com. So make a directory for your VirtualBox stuff and download the ISO file there. mkdir ~/vbox cd ~/vbox wget http://old-releases.ubuntu.com/10.10/ubuntu-10.10-server-i386.iso Now that you have the Ubuntu 10.10 Server installation CD file image, you can create your virtual machine and register it with VirtualBox. I’m using the VM name of “Ubuntu-10-10-Server-32″ but you can use whatever you like for the name. VBoxManage createvm --name "Ubuntu-10-10-Server-32" --register Next, we set up some basic parameters for the virtual machine. As stated previously, this VM is going to be assigned 1GB of RAM. We’re also going to set the virtual DVD drive as the first boot device so that we can link it to the ISO file and begin the installation when the virtual machine starts up. We also set the first network card to bridged networking so that it gets it’s own IP address separate from the host OS and link it to the “eth0″ network
  • 2. adapter. Bridged networking means that any virtual machine running will try to obtain an IP address from the same source your currently active default network address got its IP address. Hence the term bridged, as the two are connected. If you want to, you can assign it to “eth1″ or whatever is appropriate, but the default for Linux is “eth0″ normally. VBoxManage modifyvm "Ubuntu-10-10-Server-32" --memory 1024 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 The next step is to create a virtual hard disk and assign it a size. We want our VDI to be 10GB, so modify the registered VM accordingly. I’ve named the VDI file as the same as the name of the virtual machine we’ve created:- VBoxManage createhd --filename Ubuntu-10-10-Server-32.vdi --size 10000 You also need to create a virtual IDE controller. You can obviously create a SATA controller instead if you prefer but for the purposes of this demonstration, we’ll use IDE. VBoxManage storagectl "Ubuntu-10-10-Server-32" --name "IDE Controller" --add ide he last step here is to attach the newly created IDE controller to the hard disk. We’ll use IDE port 0 for this. VBoxManage storageattach "Ubuntu-10-10-Server-32" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium Ubuntu-10-10-Server-32.vdi We’ll also use the IDE controller to link the DVD drive to our ISO image file so that the operating system installation can initialise. VBoxManage storageattach "Ubuntu-10-10-Server-32" --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium ubuntu-10.10-desktop-i386.iso We’re also going to set some miscellaneous virtual machine settings like the the amount of video RAM available to the graphics card – in this case, 256MB – and setting 3D acceleration and audio controller drivers. VBoxManage modifyvm "Ubuntu-10-10-Server-32" --vram 256 --accelerate3d on --audio alsa --audiocontroller ac97 One final thing to do is to install the VirtualBox Extension pack – it’s on the download page. Make sure you download the version appropriate for your version of VirtualBox. Oracle has modularised some functionality of VirtualBox since version 4.0 and the extension pack is required for remote desktop connection support (VRDP) which we’ll need in order to complete the installation of the virtual operating system. You’ll need to be root for this, so:- su - root wget http://download.virtualbox.org/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12- 84980.vbox-extpack Once you’ve downloaded the extension pack, install it with the following: – VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack Now you can drop back down to a normal user by typing “exit”. Aside from installing the extension pack, everything else can be achieved as a normal Linux user. Now that the extension pack is installed, you can set up the virtual remote desktop connection. Here, I’m using a non-standard port of 45005, but if you’re happy to use the default port (3389) you can omit the “vrdeport” parameter. Just make sure you have set your Fedora host OS’s firewall to accept the connection. VBoxManage modifyvm "Ubuntu-10-10-Server-32" --vrde on --vrdeport 45005 Now you can fire up your virtual machine to continue the OS installation. You can either use the Screen utility to manage your terminal sessions or (as I have done below) load the VirtualBox process into background with “nohup” and the “&” on the end. nohup VBoxHeadless --startvm "Ubuntu-10-10-Server-32" & Now you can either use rdesktop to connection via RDP or use Windows’ Remote Desktop Connection client.
  • 3. Either way, if you’re on a non-standard port you’d use: – rdesktop [YOUR_HOST_IP_ADDRESS]:[PORT] This will connect you to your VM via the host IP address on which you’re running VirtualBox to continue the installation. If, upon boot, you get the following error (as I did):- piix4_smbus 0000.00.07.0: SMBus base address uninitialized - upgrade bios or use force_addr=0xaddr Don’t worry about this for now. It’s an annoying warning but doesn’t affect anything at this point. Once the virtual machine OS is installed, we can fix this easily. Go through your usual Ubuntu installation procedure and then once the login prompt appears, switch windows back to your host Fedora bash prompt and power down the VM with: – VBoxManage controlvm "Ubuntu-10-10-Server-32" powerof We’re powering off the VM because we need to detach the ISO installation file for this Ubuntu VM, else every time we fire up the virtual machine, it’ll load the ISO installation media again and now Ubuntu is installed we want to boot straight into the VM. You can find out the information on which IDE (in this case – it could be SATA) controllers are currently attached to the VM by running: – VBoxManage showvminfo "Ubuntu-10-10-Server-32" This will display a bunch of information about the current state of the VM. The line you’re looking for looks something like: – Storage Controller Name (0): IDE Controller Storage Controller Type (0): PIIX4 Storage Controller Instance Number (0): 0 Storage Controller Max Port Count (0): 2 Storage Controller Port Count (0): 2 Storage Controller Bootable (0): on IDE Controller (0, 0): /home/vboxuser/vbox/Ubuntu-10-10-Server-32.vdi (UUID: 3e097b88-5feb-45c7-9e63- 2b7a6610dd4f) IDE Controller (1, 0): /home/vboxuser/vbox/ubuntu-10.10-server-i386.iso (UUID: 51c9864e-0427-492e-871e- a93109fd0d86) You can now detach this device with: – VBoxManage storageattach "Ubuntu-10-10-Server-32" --storagectl "IDE Controller" --port 1 --device 0 --medium emptydrive If you run “vminfo” again, you’ll see the virtual DVD drive is now empty. Storage Controller Name (0): IDE Controller Storage Controller Type (0): PIIX4 Storage Controller Instance Number (0): 0 Storage Controller Max Port Count (0): 2 Storage Controller Port Count (0): 2 Storage Controller Bootable (0): on IDE Controller (0, 0): /home/vboxuser/vbox/Ubuntu-10-10-Server-32.vdi (UUID: 3e097b88-5feb-45c7-9e63- 2b7a6610dd4f) IDE Controller (1, 0): Empty Okay, now that’s taken care of, fire up the virtual machine again and use rdesktop or Microsoft’s RDP utility to log back into your VM. If you want to make things easier for yourself at this point you could set up the SSH server and log straight into your VM via your Fedora command line SSH client. Either way, you should now have shell access to your Ubuntu 10.10 virtual server. Once you’ve logged in, you can find out your VM’s IP address in the usual fashion with:- ifconfig This is far from ideal, but I’ve not found any way to get the bridged network IP address from the host OS command line as of yet. A call to “vminfo” fails to show the IP address of the running guest VM. If anybody knows
  • 4. how to do this, please leave a comment! If you’ve not got that smbus base address error, you’re done – congratulations! Enjoy your Ubuntu virtual machine running in Fedora :-) Now to fix that annoying “piix4_smbus 0000.00.07.0: SMBus base address uninitialized – upgrade bios or use force_addr=0xaddr” error (assuming this is a problem for you). It’s only a warning and doesn’t actually affect anything, but it would be nice not to have it. This error is caused by the Ubuntu VM having no smbus but Ubuntu always trying to load the kernel module anyway. So let’s disable that. First, check that the module is being loaded with:- lsmod | grep i2c_piix4 If so, you need to disable it. Open the following file in “vi” or whatever your favourite text editor is:- vi /etc/modprobe.d/blacklist.conf and add the line: – blacklist i2c_piix4 Now reinitialise the RAMDisk with:- update-initramfs -u -k all Done. No more error.