Create a Ubuntu KVM client OS

Source: Internet
Author: User

The previous article solved the network problem before continuing:

Http://blog.csdn.net/sheismylife/article/details/8070072

See the wizard for this article: http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-12.04-lts

Enter the directory of the Virtual Machine file to be created:

CD/var/lib/libvirt/Images

Now I plan to create three virtual machines in the VM1, VM2, and vm3 directories. Let's take a look at how to create the first virtual machine.

Create the VM1 directory and Its subdirectories first

Mkdir-P/var/lib/libvirt/images/VM1/mytemplates/libvirt

Copy some vmbuilder files (lib1_xml_fsimage.tmpl lib1_xml. tmpl)

CP/etc/vmbuilder/libvirt/*/var/lib/libvirt/images/VM1/mytemplates/libvirt/

Create a file in the VM1 directory.Vmbuilder. Partition

The content is as follows:

root 24000swap 2000---/var 8000

--- Indicates that two partitions exist.

Root has 24 GB space, 2 GB space for swap, and 8 GB space for/var. 30 GB in total.


When starting a virtual machine system, you need to install the OpenSSH service so that external users can log on to it through SSH.

Run the following command to create the VM and the Ubuntu 12.04 amd64 server.

vmbuilder kvm ubuntu --suite=precise --flavour=virtual --arch=amd64 --mirror=http://de.archive.ubuntu.com/ubuntu -o --libvirt=qemu:///system --ip=10.112.18.191 --gw=10.112.18.1 --part=vmbuilder.partition --templates=mytemplates --user=chenshu --name=chenshu --pass=123456 --addpkg=openssh-server --addpkg=vim-nox --addpkg=unattended-upgrades --addpkg=acpid --mem=2048 --hostname=vm1 --bridge=br0

The memory size is 2 GB, the username is chenshu, and the initial password is 123456. For other parameters, see.

I tried the boot. Sh solution and failed. Use the -- addpkg parameter to specify the OpenSSH-Server installation.

Start to wait, and then succeed. :)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.