Use your local vnc viewer or type the following at server itself: # vncviewer OR over ssh session, enter: # ssh -X -C root@kvmserver42.nixcraft.in # virt-viewer freebsd Sample outputs:Fig.01: Creating guest with virt-install and installing guests with vncOnce again, just follow on screen installation instructions and install FreeBSD as per your requirements. The above procedure can be repeated for MS-Windows, OpenBSD, FreeBSD and all other supported guest operating systems.Install CentOS As Guest OSType the following command to install CentOS using http mirror method with 512MB RAM, 4GB disk space stored on nas server mounted at /nas, br0 and br1 network interface: # virt-install \ -n centos \ -r 512 \ --vcpus=1 \ --os-variant=rhel5.4 \ --accelerate \ -v \ -l http://mirrors.kernel.org/centos/5.5/os/x86_64/ \ -w bridge:br0 \ -w bridge:br1 \ --vnc \ --disk path=/nas/kvm/centos.img,size=4 You can grab installer screen using vnc as follows (or use your local vnc viewer): # ssh -X -C user@server.example.com # virt-viewer centosUnderstanding virt-install Command Line Options-n centos - Name of the new guest virtual machine instance. This must be unique amongst all guests known to the hypervisor on this machine, including those not currently active.-r 512 - VM memory allocation.--vcpus=1 - VM cpu allocation.--os-variant=rhel5.4 - Optimize the guest configuration for a type of operating system called rhel5.4.--accelerate - When installing a QEMU guest, make use of the KVM or KQEMU kernel acceleration capabilities if available. Use of this option is recommended unless a guest OS is known to be incompatible with the accelerators. The KVM accelerator is preferred over KQEMU if both are available.-v - This guest should be a fully virtualized guest-l http://mirrors.kernel.org/centos/5.5/os/x86_64/ - Install using http mirror.-w bridge:br0 - Connect the guest to the host network. In this example connect to a bridge device in the host called "br0". Use this option if the host has static networking config & the guest requires full outbound and inbound connectivity to/from the LAN. Also use this if live migration will be used with this guest.-w bridge:br1 - Same as above but using br1 so that guest can have full outbound and inbound connectivity to/from the Internet.--vnc - Setup a virtual console in the guest and export it as a VNC server in the host.--disk path=/nas/kvm/centos.img,size=4 - Path to the file, disk partition, or logical volume to use as the backing store for the guest's virtual disk.Tweet You should follow me on twitter here or grab rss feed to keep track of new changes. This FAQ entry is 4 of 14 in the "CentOS / Redhat (RHEL) KVM Virtulization" series. Keep reading the rest of the series:Table of Contents:CentOS / Redhat: Install KVM Virtualization SoftwareCentOS / Redhat: KVM Bridged Network Configuration KVM virt-manager: Install CentOS As Guest Operating SystemKVM virt-install: Install FreeBSD / CentOS As Guest Operating SystemKVM: Install CentOS / RHEL Using Kickstart File (Automated Installation)Troubleshooting KVM Virtualization Problem With Log FilesKVM Virsh: Redirect FreeBSD Console To A Serial PortKVM: Starting / Stopping Guest Operating Systems With virsh CommandLinux KVM: Disable virbr0 NAT InterfaceFreeBSD / OpeBSD Running
Domain installation still in progress. You can reconnect to
Creating domain... | 0 B 00:01
Creating storage file... | 4.0 GB 00:00
Main menuBASH ShellLinuxCentOSDebian / UbuntuUbuntu LinuxSuseRedHat and FriendsSlackware LinuxUNIXAIXMac os xFreeBSDFreeBSD Jails (VPS)OpenbsdSolarisTroubleshootingNginxNetworkingMySQLSee all tutorial topicsBlogAboutContact usForumRSS/FEED Linux FAQ / HowtosKVM virt-install: Install FreeBSD / CentOS As Guest Operating Systemby nixCraft on January 12, 2010 · 0 comments· last updated at February 1, 2011virt-manager requires GUI locally and it is slow. On other hand virt-install is a command line tool for provisioning new virtual machines using the "libvirt" hypervisor management library. The tool supports both text based & graphical installations, using serial console, SDL graphics or a VNC client/server pair. The guest can be configured to use one or more virtual disks, network interfaces, audio devices, and physical host devices (USB, PCI). You can use the virt-install to create virtualized guests as follows to install FreeBSD or CentOS. Install FreeBSD As Guest OSAgain, use the wget command to grab FreeBSD ISO image: # cd /tmp # wget ftp://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-amd64/7.3/FreeBSD-7.3-RELEASE-amd64-disc1.iso Type the following command to install FreeBSD 7.3 64 bit with 512 MB RAM, 1 vcore cpu, 4GB disk space, br0 and br1 network interface: # virt-install \ -n freebsd \ -r 512 \ --vcpus=1 \ --os-variant=freebsd7 \ --accelerate \ -v \ -c /nfsclient/iso/FreeBSD-7.3-RELEASE-amd64-disc1.iso \ -w bridge:br0 \ -w bridge:br1 \ --vnc \ --disk path=/raid10/kvm/freebsd73.img,size=4 Sample outputs:
KVM virt-install: Install FreeBSD / CentOS As Guest Operating System
Комментариев нет:
Отправить комментарий