JeOS shorts for Just enough Operating System. JeOS is a specialized OS to run in virtualization environment.You can install JeOS with vmbuilder.
my pool called “disk1” direcotry is /media/disk1/images.
I build a VM under this directory.
[ procedures ]
make a template file for partition settings.
make a template file which is a base settings file for all VMs.
build a VM
In my case , it took approximately 10 minutes to build a VM.
start a VM
connect to a VM via SSH
# tail -2 /etc/lsb-release DISTRIB_CODENAME=natty DISTRIB_DESCRIPTION="Ubuntu 11.04" root@hat1:~# root@hat1:~# uname -r 2.6.38-10-server |
my pool called “disk1” direcotry is /media/disk1/images.
I build a VM under this directory.
root@hat1:~# virsh pool-dumpxml disk1 | grep path <path>/media/disk1/images</path> |
[ procedures ]
make a template file for partition settings.
root@hat1:~# cat /root/vmbuilder_tmp/partition.txt root 5000 swap 512 --- var 2000 |
make a template file which is a base settings file for all VMs.
root@hat1:~/vmbuilder_tmp# cat vm_template.txt [DEFAULT] arch = amd64 mask = 255.255.255.0 dns = 192.168.11.1 gw = 192.168.11.1 bridge = br0 part = /root/vmbilder_tmp/partition.txt user = user name = user pass = default rootpass = default tmpfs = - mem = 256 cpus = 1 [ubuntu] mirror = http://jp.archive.ubuntu.com/ubuntu/ suite = natty flavour = virtual addpkg = openssh-server, acpid [kvm] libvirt = qemu:///system |
build a VM
In my case , it took approximately 10 minutes to build a VM.
# vmbuilder kvm ubuntu -c vm_template.txt -d /media/disk1/images/ubuntu-vm1 --hostname=ubuntu-vm1 --ip=192.168.11.20 |
start a VM
root@hat1:~/vmbuilder_tmp# LANG=C virsh Welcome to virsh, the virtualization interactive terminal. Type: 'help' for help with commands 'quit' to quit virsh # list --all Id Name State ---------------------------------- - ubuntu-vm1 shut off virsh # start ubuntu-vm1 Domain ubuntu-vm1 started |
connect to a VM via SSH
# ssh 192.168.11.20 -l root root@192.168.11.20's password: Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-10-virtual x86_64) |
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.