Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation method of Xen Virtual Machine under Ubuntu system

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "the installation method of the Xen virtual machine under the Ubuntu system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the installation method of the Xen virtual machine under the Ubuntu system".

Install a virtual machine on Xen on Ubuntu

Method one

Dd an empty disk

The code is as follows:

Sudo dd if=/dev/zero of=/home/vm1.img bs=1G count=8

Download the Xen VM generic configuration file

The code is as follows:

Sudo wget http://mirrors.aliyun.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/xen/xm-debian.cfg\

-O / etc/xen/vm1.conf

Modify the downloaded configuration file accordingly

The code is as follows:

Memory = 256

Name = "vm1"

Disk = ['tap2:tapdisk:aio:/home/vm1/vm1.img,xvda1,w']

Execute installation command

The code is as follows:

Sudo xm create-f / etc/xen/vm1.conf-c install=true\

Install-kernel= "http://mirrors.aliyun.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/xen/vmlinuz"\"

Install-ramdisk= "http://mirrors.aliyun.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/xen/initrd.gz"\"

Install-mirror= "http://mirrors.aliyun.com/ubuntu"

Method two

Dd an empty disk

The code is as follows:

Sudo dd if=/dev/zero of=/home/vm1.img bs=1G count=8

Format disk

The code is as follows:

Sudo dd if=/dev/zero of=/home/vm1.img bs=1G count=8

Mount disk

The code is as follows:

Sudo mkdir / mnt/vm1

Sudo mount-o loop / home/vm1.img / mnt/vm1

Using Domain0's file system to create DomainU's file system

The code is as follows:

#! / bin/bash

Cat > / tmp/exclude.list

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report