Feeds:
Posts
Comments

Posts Tagged ‘Qemu’

Install virtinst package which provides virt-install
sudo apt-get virtinst

Install libvirt-bin which provides virsh tool
sudo apt-get libvirt-bin

Create 8GB(8192MB) raw image
sudo dd if=/dev/zero of=/var/lib/libvirt/images/ta.img bs=1M count=8192

For newer versions of Linux, use the faster fallocate(1) program:
sudo fallocate -l 8192M /var/lib/libvirt/images/ta.img

Create libvirt volume in the default storage pool
sudo virsh vol-create-as default ta 8192M

Deploy Virtual Machine(vm)
sudo virt-install –connect=qemu:///system -r 512 –accelerate -n Tamil -f /var/lib/libvirt/images/ta.img –cdrom ~/iso/tamil.iso

Now if you have installed virt-viewer, virt-viewer will launch. Otherwise run
sudo virt-manager

Advertisements

Read Full Post »

I am documenting. What I had experimented using vagrant.

1. Install vagrant
$sudo apt-get install vagrant
$mkdir vagrant
$cd vagrant

Add vm box for vagrant

$vagrant box add precise32 http://files.vagrantup.com/precise32.box
[vagrant] Downloading with Vagrant::Downloaders::HTTP…
[vagrant] Downloading box: http://files.vagrantup.com/precise32.box
[vagrant] Extracting box…
[vagrant] Verifying box…
[vagrant] Cleaning up downloaded box…

Initializing vm instance
$vagrant init precise32
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.

Running vm instance

$ vagrant up

[default] Importing base box ‘precise32’…
[default] The guest additions on this VM do not match the install version of
VirtualBox! This may cause things such as forwarded ports, shared
folders, and more to not work properly. If any of those things fail on
this machine, please update the guest additions and repackage the
box.

Guest Additions Version: 4.2.0
VirtualBox Version: 4.1.12
[default] Matching MAC address for NAT networking…
[default] Clearing any previously set forwarded ports…
[default] Forwarding ports…
[default] — 22 => 2222 (adapter 1)
[default] Creating shared folders metadata…
[default] Clearing any previously set network interfaces…
[default] Booting VM…
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Mounting shared folders…
[default] — v-root: /vagrant

$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)

* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:22:31 2012 from 10.0.2.2
vagrant@precise32:~$

ref: http://awaseroot.wordpress.com/2012/05/06/script-for-adding-multiple-vagrant-boxes/

Read Full Post »