VMLite VBoot 1.0 Instructions

updated on Dec-17-10

Copyright © 2010, VMLite Inc.

1 Download and Extract

After download, unzip the package to \vboot folder on your boot partition. It must be inside \vboot folder. Usually c:\vboot, or d:\vboot folder.

The tools directory contains tools that are not needed to boot the virtual disks, so you can move this tools directory to somewhere else.

2 Install VBoot Loader on Windows

If your current host is Windows, you need to install VBoot loader, and add a boot entry to Windows boot manager.

2.1 Automatic Setup by running VBootEdit.exe

It's highly recommend that you use this method to setup VBoot on Windows, since it's extremely simple and automates everything. You simply run the following command:

    vbootedit.exe install        on 32-bit Windows

or

    vbootedit64.exe install  on 64-bit Windows.

This utility will install VBoot Loader, and configure the Windows boot loader to contain an entry to boot the Linux VHD.

After the above command is successfully run, you reboot the computer, and you should see a "VBoot" entry as the last one.

2.2 Manual Setup

If somehow the automatic setup doesn't work, then you can perform the following manual steps:

2.2.1 Copy VBoot Loader Files

The VBoot loader is based on GNU GRUB2, and its files are located in vboot sub directory.

For example, if you want to copy the files to C:\, you need to copy the vboot directory to c:\, so you will have c:\vboot directory. Then you must copy vbootldr.mbr and vbootldr to c:\.

The following commands can be used to copy the files. Make sure to run from the extracted dir.

md c:\vboot
xcopy /s vboot c:\vboot
copy vboot\vbootldr c:\
copy vboot\vbootldr.mbr c:\

2.2.2 Configure Windows Boot Loader

Once VBoot Loader and the vhd file are ready, you need to configure Windows boot manager, so you can boot to the VHD.


2.2.2.1 Windows XP

You need to append the vbootldr.mbr entry to the [operating systems] section. The following is sample boot.ini file with VBoot entry added at the very last. Shown in red is what you need to add to boot.ini. Change C: to whatever drive you have copied VBoot Loader files.

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
C:\vbootldr.mbr="VBoot"

2.2.2.2 Windows Vista/2008/7

Windows Vista and above use a different mechanism other than boot.init to boot, and you need to run bcdedit.exe to make changes to the boot manager. The following are the commands to run if you have copied VBoot Loader to drive C:.  You must rum these commands as Administrator. Go to Windows Start menu > All Programs > Accessories, then right click on "Command Prompt", then select "Run As Administrator". Once command prompt window is open, you can enter these commands.

bcdedit /create {D3DCE997-7447-41FC-9740-A8D20EE3BF55} /d "VBoot" /application BOOTSECTOR
bcdedit /set {D3DCE997-7447-41FC-9740-A8D20EE3BF55} device partition=C:
bcdedit /set {D3DCE997-7447-41FC-9740-A8D20EE3BF55} path \vbootldr.mbr
bcdedit /displayorder {D3DCE997-7447-41FC-9740-A8D20EE3BF55} /addlast
bcdedit /timeout 30

2 Install Windows XP to a virtual disk file

Once you have VBoot Loader installed, you can now proceed to install a fresh operating system to a virtual disk file.

(1) On your host disk, create a virtual disk file. VBoot support VHD/VMDK/VDI formats.

For example, you can use this command to create 40 G dynamic VHD:

c:\vboot\tools\x86\vbootctl.exe createhd c:\winxp.vhd /size 40

You can use /format option to specify other virtual disk formats.

(2) Edit and configure grub.cfg file, a sample grub.cfg should exist in \vboot\grub folder. You need to follow these 3 steps to install Windows XP/2003 to the virtual disk, then boot from it. Note that you must adjust all of the paths according to your own files.

First step:
menuentry "XP Install Step 1" {
   vboot harddisk=(hd0,1)/winxp.vhd floppy=(hd0,1)/vboot/vboot.img cdrom=(hd0,1)/winxp-sp2.iso boot=cdrom
}

After you boot to this entry, you will see the normal Windows XP setup screens. At one step, you need to select a disk to install XP, make sure you select the virtual disk, usually the last disk labeled as VBOOTDSK. After first reboot, you select this boot entry:

menuentry "XP Install Step 2" {
vboot harddisk=(hd0,1)/winxp.vhd cdrom=(hd0,1)/winxp-sp2.iso boot=harddisk
}

After another reboot, your virtual disk is ready to go, and finally, you can boot to XP virtual disk using this entry:

menuentry "XP VHD" {
vboot harddisk=(hd0,1)/winxp.vhd
}

For Windows 2003, you do the following:

menuentry "Windows 2003" {
vboot harddisk=(hd0,1)/win2k3.vhd
}

menuentry "Windows 2003 Install Step 2" {
vboot harddisk=(hd0,1)/win2k3.vhd cdrom=(hd0,1)/win2k3.iso boot=harddisk
}

menuentry "Windows 2003 Install Step 1" {
vboot harddisk=(hd0,1)/win2k3.vhd floppy=(hd0,1)/vboot/vboot-2k3.img cdrom=(hd0,1)/win2k3.iso boot=cdrom
}

For Windows XP/2003 64-bit, you do the following:

menuentry "Windows 2003" {
vboot harddisk=(hd0,1)/win2k3.vhd
}

menuentry "Windows 2003 Install Step 2" {
vboot harddisk=(hd0,1)/win2k3.vhd cdrom=(hd0,1)/win2k3-64.iso boot=harddisk
}

menuentry "Windows 2003 Install Step 1" {
vboot harddisk=(hd0,1)/win2k3.vhd floppy=(hd0,1)/vboot/vboot-x64.img cdrom=(hd0,1)/win2k3-64.iso boot=cdrom
}

3 Install Windows 7/2008 R2 32- and 64-bit to a virtual disk file

Once you have VBoot Loader installed, you can now proceed to install a fresh operating system to a virtual disk file.

1) On your host disk, create a virtual disk file. VBoot support VHD/VMDK/VDI formats.

For example, you can use this command to create 40 G dynamic VHD:

c:\vboot\tools\x86\vbootctl.exe createhd c:\win7.vhd /size 40

You can use /format option to specify other virtual disk formats.

(2) Edit and configure grub.cfg file, a sample grub.cfg should exist in \vboot\grub folder. You need to follow these two steps to install Windows 7 to the virtual disk, then boot from it. Note that you must adjust all of the paths according to your own files.

First step:
menuentry "Windows 7 Install" {
   vboot harddisk=(hd0,1)/win7.vhd cdrom=(hd0,1)/win7.iso boot=cdrom
}

After you boot to this entry, you will see the normal Windows 7 setup screens as booted from a physical cdrom.

Once you see the Install button, make sure to press Shift F10 key to launch the command window.  You need to run the following command to load the VBoot virtual disk drivers:

c:\vboot\tools\x86\vbootctl setup    (for 32-bit)
c:\vboot\tools\amd64\vbootctl setup  (for 64-bit)

After this, you proceed the installation as usual. At one step, you need to select a disk to install Windows 7, make sure you select the virtual disk, usually the last disk.

After  reboot, your virtual disk is ready to go, and finally, you can boot to Windows 7 virtual disk using this entry:

menuentry "Windows 7 VHD" {
vboot harddisk=(hd0,1)/win7.vhd
}

4 Install Vista/2008 32- and 64-bit to a virtual disk file

Once you have VBoot Loader installed, you can now proceed to install a fresh operating system to a virtual disk file.

1) On your host disk, create a virtual disk file. VBoot support VHD/VMDK/VDI formats.

For example, you can use this command to create 40 G dynamic VHD:

c:\vboot\tools\x86\vbootctl.exe createhd c:\win7.vhd /size 40

You can use /format option to specify other virtual disk formats.

(2) Edit and configure grub.cfg file, a sample grub.cfg should exist in \vboot\grub folder. You need to follow these 2 steps to install Vista to the virtual disk, then boot from it. Note that you must adjust all of the paths according to your own files.

First step:
menuentry "Vista Install" {
   vboot harddisk=(hd0,1)/vista.vhd cdrom=(hd0,1)/vista.iso boot=cdrom
}

After you boot to this entry, you will see the normal Vista setup screens as booted from a physical cdrom.

Once you see the Install button, you need to click it first, then you will be able to press Shift F10 key to launch the command window. 

You need to run the following command to load the VBoot virtual disk drivers:

c:\vboot\tools\x86\vbootctl setup    (for 32-bit)
c:\vboot\tools\amd64\vbootctl setup  (for 64-bit)

After this, you proceed the installation as usual. At one step, you need to select a disk to install Vista, make sure you select the virtual disk, usually the last disk.

After  reboot, your virtual disk is ready to go, and finally, you can boot to Vista virtual disk using this entry:

menuentry "Vista VHD" {
vboot harddisk=(hd0,1)/vista.vhd
}

5 Install Vista, 2008, Windows 7, 2008 32- and 64-bit to a virtual disk file from a physical cdrom

First, boot your computer using the physical cdrom.

Once you see the Install button, on Vista/2008, you need to click it first, then you can press Shift F10 key to launch the command window.  On Windows 7/2008R2, you can press Shift-F10 without clicking the Install button.

Once the command window appears, you need to run the following commands to create a virtual disk and the mount it:

32-bit:
c:\vboot\tools\x86\vbootctl.exe createhd c:\win7.vhd /size 40 
c:\vboot\tools\x86\vbootctl mount c:\win7.vhd /setup

64-bit:
c:\vboot\tools\amd64\vbootctl.exe createhd c:\win7.vhd /size 40 
c:\vboot\tools\amd64\vbootctl mount c:\win7.vhd /setup  (for 64-bit)

After this, you proceed the installation as usual. At one step, you need to select a disk to install Windows, make sure you select the virtual disk, usually the last disk.

After  reboot, your virtual disk is ready to go, and finally, you can boot to the virtual disk using this entry:

menuentry "Vista VHD" {
vboot harddisk=(hd0,1)/vista.vhd
}

6 Install Vista, Windows 7 and Windows 2008 to a virtual disk file using a simple command line

To make the installation experience really simple, we have created a command line to help you. You can simply run this command line using your Windows CD/DVD or .ISO file as input, by the end, you will have a bootable virtual disk file that you can add to VBoot Loader, and boot to it.

For example, you can run the following commands to create a 80G Windows 7 VMDK file, then add a boot entry to VBoot Loader.

(1) vbootctl make c:\win7.vhd c:\en_windows_7_x86.iso /size 80
(2) vbootedit.exe create title="Windows 7 VMDK Boot" harddisk=c:\win7.vhd

After reboot, you should see an enty named as "Windows 7 VMDK Boot", and you select it to boot to Windows 7 VMDK.

Note that this command does not work for Windows 2000, Windows XP and Windows 2003.

It's recommended to run this command on Windows Vista and above hosts. If you run this command on Windows XP, you will have trouble booting to the virtual disk file, and you need to run "bootsect.exe" utility to correct the NTFS boot sectors.

The full syntax is described as follows:

D:\vboot\tools\x86>vbootctl.exe make

SYNTAX:
  vbootctl make diskfile source [/imageIndex index] [/size size_in_G] [/format VDI|VHD|VMDK] [/fixed]

OPTIONS:
  diskfile  Specify the path to the new virtual disk file to create.
            It can be a .vmdk, .vhd or .vdi file.

  source    Specify the source of Windows OS.
            It can be an .iso file, or cdrom drive, or a .wim file.

  /imageIndex index
            Specify the 1-based index that identifies the image within the WIM file.

  /size size_in_G
            Specify the virtual disk size in giga bytes, e.g., 1.5.
            Default size is 16G if you don't specify any size.

  /format   Specify virtual disk format: VDI, VHD or VMDK. Default is VHD format.

  /fixed    The virtual disk is fixed, all space will be allocated.

EXAMPLES:
  vbootctl make c:\win7.vhd en_windows_7_x86.iso /size 80
  vbootctl make c:\win7.vhd E:\ /size 80
  vbootctl make c:\win7.vhd E:\sources\install.wim /size 80

7 Converting virtual disk files to become bootable via VBoot

If you already have a virtual disk file, such as Windows 7 Native boot VHD file, you can run the following command to make it to become bootable using VBoot. This command will install the correct components to your existing virtual disk file.

For example, you can run the following command to prepare the vhd file so it can boot with VBoot.

vbootctl prepare c:\my-windows7.vhd

8 Differencing disk files and snapshots

VBoot fully supports differencing files and snapshots. You can use ';' separated file names to specify a child disk and its parent, for example:

menuentry "Vista VHD" {
vboot harddisk="(hd0,1)/vista-s1.vhd;(hd0,1)/vista.vhd"
}

To create a differencing file, you can use the following command:

vbootctl creatediff c:\vista-s1.vhd c:\vista.vhd

The easiest way to create a snapshot is from the boot loader, you can simply press 's' key to take a snapshot, and press 'r' key to perform a recovery.

More information is available on our website, http://www.vmlite.com