Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Juro Bystricky <juro.bystricky@intel.com>
To: openembedded-core@lists.openembedded.org, jurobystricky@hotmail.com
Cc: richard.purdie@intel.com
Subject: [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions
Date: Mon,  3 Aug 2015 13:35:28 -0700	[thread overview]
Message-ID: <1438634128-4347-3-git-send-email-juro.bystricky@intel.com> (raw)
In-Reply-To: <1438634128-4347-1-git-send-email-juro.bystricky@intel.com>

It is possible to run Build Appliance VM using VirtualBox.
User experience can be improved by installing VirtulaBox guest
additions. This patch installs kernel headers into the Build Appliance
VM, in order to make possible to rebuild the guest additons against the
running kernel.

The instructions on installing the guest additions are described in
the attached file README_vbox_guest_additions.txt.

[YOCTO #8074]

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
---
 .../README_vbox_guest_additions.txt                | 78 ++++++++++++++++++++++
 .../images/build-appliance-image_12.0.1.bb         |  4 +-
 2 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt

diff --git a/meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt b/meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt
new file mode 100644
index 0000000..7121804
--- /dev/null
+++ b/meta/recipes-core/images/build-appliance-image/README_vbox_guest_additions.txt
@@ -0,0 +1,78 @@
+
+Installing VirtualBox Guest Additions
+======================================
+
+In order to use VirtualBox guest additions, they have to be build
+first. They may have to be rebuilt again each time the VM kernel changes,
+or each time there is a new version of VirtualBox.
+The following describes steps needed to perform on the Host and the
+Guest VM (Build Appliance).
+
+Host:
+
+    1. If you don't already have them, download the guest additions matching
+       your VirtualBox version.
+
+       http://download.virtualbox.org/virtualbox/
+
+    2. Make sure VM has a CDROM drive, usually an IDE. Place the additions
+       file into the CDROM (VirtualBox Manager: VM Settings -> Storage)
+
+Guest VM:
+
+    1. Boot VM
+
+       Find your CDROM device (most likely /dev/hda for IDE) and mount it:
+
+          # cat /proc/sys/dev/cdrom/info | grep name
+          # mount -t iso9660  /dev/<name> /media/cdrom
+
+       i.e.:
+
+          # mount -t iso9660 /dev/hda /media/cdrom
+
+    2. Build the additions.
+       This is a two step process. Step 1 needs to be done only once.
+       Step 2 must be done each time a new version of guest additions is being
+       installed.
+
+       Step 1:  Build some necessary utilities, needed for step2.
+
+          # cd /lib/modules/<xx.xx.x>-yocto-standard/build
+          # make scripts
+
+        Step 2: Build the guest additions:
+
+          # /media/cdrom/VBoxLinuxAdditions.run --nox11
+
+        This will display some warning messages about unknown system, it is safe to ignore them.
+        Note: You can check the build log log if there are any errors:
+
+          # cat /var/volatile/log/vboxadd-install.log
+
+
+    3. Check if VirtualBox additions are running:
+
+          # /etc/init.d/vboxadd status
+
+        If the additions are not running, try to manually start them:
+
+          # /etc/init.d/vboxadd start
+
+    4. Check if the guest additions actually work, in particular folder sharing:
+
+          Host: Devices->Shared Folder Settings...
+                Choose any host folder and name it to your liking ("my_shared_folder")
+
+          Guest VM:
+              Create mount point for the shared folder, i.e.:
+
+                # mkdir ~/shared_folder
+
+              Mount the shared folder: (Watch out for spelling: it's vboxsf NOT vboxfs)
+
+                # mount -t vboxsf my_shared_folder ~/shared_folder
+
+              Verify mount, should see the contents of "my_shared_folder":
+
+                # ls shared_folder
diff --git a/meta/recipes-core/images/build-appliance-image_12.0.1.bb b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
index 8e71b36..a96e8a0 100644
--- a/meta/recipes-core/images/build-appliance-image_12.0.1.bb
+++ b/meta/recipes-core/images/build-appliance-image_12.0.1.bb
@@ -6,7 +6,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
                     file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted"
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted kernel-headers"
 
 IMAGE_FEATURES += "x11-base package-management splash"
 
@@ -25,6 +25,7 @@ SRCREV ?= "d01cd53429b1c20f01dac97f1b9b659cb9dc9812"
 SRC_URI = "git://git.yoctoproject.org/poky \
            file://Yocto_Build_Appliance.vmx \
            file://Yocto_Build_Appliance.vmxf \
+           file://README_vbox_guest_additions.txt \
           "
 
 IMAGE_CMD_ext3_append () {
@@ -80,6 +81,7 @@ create_bundle_files () {
 	cd ${WORKDIR}
 	mkdir -p Yocto_Build_Appliance
 	cp *.vmx* Yocto_Build_Appliance
+	cp README* Yocto_Build_Appliance
 	ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
 	zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
 	ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip 
-- 
1.9.1



  parent reply	other threads:[~2015-08-03 20:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03 20:35 [PATCH 0/2] Support for VirtualBox guest additions Juro Bystricky
2015-08-03 20:35 ` [PATCH 1/2] kernel-headers: linux kernel headers Juro Bystricky
2015-08-04  4:37   ` Christopher Larson
2015-08-04 16:06     ` Bystricky, Juro
2015-08-05  2:20   ` Bruce Ashfield
2015-08-26 17:55     ` Josh Cartwright
2015-08-26 17:57       ` Bruce Ashfield
2015-08-26 18:11         ` Josh Cartwright
2015-08-03 20:35 ` Juro Bystricky [this message]
2015-08-04  4:37   ` [PATCH 2/2] build-appliance-image: support for VirtualBox guest addtions Christopher Larson
2015-08-04 16:08     ` Bystricky, Juro
2015-08-04 16:20 ` [PATCH 0/2] Support for VirtualBox guest additions Mark Hatle
2015-08-04 17:25   ` Bystricky, Juro
2015-08-04 17:32     ` Mark Hatle
2015-08-04 19:10       ` Bystricky, Juro
2015-08-04 19:22         ` Mark Hatle
2015-08-04 21:27           ` Bystricky, Juro
2015-08-04 21:31             ` Otavio Salvador
2015-08-05  2:24               ` Bruce Ashfield
2015-08-05  2:24         ` Bruce Ashfield
2015-08-05  2:43       ` Bruce Ashfield
2015-08-05  2:48         ` Bruce Ashfield
2015-08-05 22:02           ` Bystricky, Juro
2015-08-06  2:09             ` Bruce Ashfield
2015-08-06  2:20             ` Khem Raj
2015-08-07 22:13               ` Bystricky, Juro
2015-08-08  1:09                 ` Bruce Ashfield
2015-08-08 17:36                   ` Bystricky, Juro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438634128-4347-3-git-send-email-juro.bystricky@intel.com \
    --to=juro.bystricky@intel.com \
    --cc=jurobystricky@hotmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox