flagflag  
10: 2022-02-17 (Thu) 12:28:32 iseki source Cur: 2022-02-18 (Fri) 15:49:43 iseki source
Line 15: Line 15:
     NBOOT=no      NBOOT=no
 +*** Install [#p7c59867]
 + # export VM_NAME=rocky-8.5
 + # virt-install \
 + --name ${VM_NAME} \
 + --hvm \
 + --arch x86_64 \
 + --os-type linux \
 + --os-variant centos7.0 \
 + --vcpus 2 \
 + --ram 2048 \
 + --disk path=/opt/vm/images/${VM_NAME}.img,forma​t=qcow2,size=50 \
 + --network bridge=br0 \
 + --graphics vnc,keymap=ja \
 + --noautoconsole \
 + --location /opt/iso/Rocky-8.5-x86_64-boot.iso
#br #br
 +
** OLD [#u00f7f08] ** OLD [#u00f7f08]
*** Create [#lff9c573] *** Create [#lff9c573]
Line 62: Line 78:
 #!/bin/sh  #!/bin/sh
 #  #
 + 
 function get_interface_num()  function get_interface_num()
 {  {
Line 83: Line 99:
   return 0    return 0
 }  }
- +  
 + 
 if [ ! -f "$1" ]; then  if [ ! -f "$1" ]; then
   echo "Not found image file $1 !!"    echo "Not found image file $1 !!"
   exit 1    exit 1
 fi  fi
 + 
 IFNUM=`get_interface_num`  IFNUM=`get_interface_num`
 if [ "$IFNUM" = "" ]; then  if [ "$IFNUM" = "" ]; then
Line 95: Line 111:
   exit 1    exit 1
 fi  fi
 + 
 HWADDR=`/usr/local/bin/macgen.py`  HWADDR=`/usr/local/bin/macgen.py`
 if [ "$HWADDR" = "" ]; then  if [ "$HWADDR" = "" ]; then
Line 101: Line 117:
   HWADDR="00:16:3e:00:00:$MACNUM"    HWADDR="00:16:3e:00:00:$MACNUM"
 fi  fi
 + 
 MEM=$2  MEM=$2
 if [ "$MEM" = "" ]; then  if [ "$MEM" = "" ]; then
   MEM=1024    MEM=1024
 fi  fi
 + 
 echo "macaddr  = $HWADDR"  echo "macaddr  = $HWADDR"
 echo "interface = tap$IFNUM"  echo "interface = tap$IFNUM"
Line 112: Line 128:
 echo "memory    = ${MEM}M"  echo "memory    = ${MEM}M"
 echo "start qemu-kvm"  echo "start qemu-kvm"
 + 
 /usr/libexec/qemu-kvm -hda $1 -m $MEM -k ja -vnc :${IFNUM} -net nic,macaddr=$HWADDR -net tap,ifname=tap${IFNUM},script=/etc/qemu-​ifup  /usr/libexec/qemu-kvm -hda $1 -m $MEM -k ja -vnc :${IFNUM} -net nic,macaddr=$HWADDR -net tap,ifname=tap${IFNUM},script=/etc/qemu-​ifup
**** MACアドレスの自動生成 by [[RedHat カスタマーポータル>https://access.redhat.com/site/document​ation/ja-JP/Red_Hat_Enterprise_Linux/5/h​tml/Virtualization/sect-Virtualization-T​ips_and_tricks-Generating_a_new_unique_M​AC_address.html]] [#wa7bbc0e] **** MACアドレスの自動生成 by [[RedHat カスタマーポータル>https://access.redhat.com/site/document​ation/ja-JP/Red_Hat_Enterprise_Linux/5/h​tml/Virtualization/sect-Virtualization-T​ips_and_tricks-Generating_a_new_unique_M​AC_address.html]] [#wa7bbc0e]


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthAug 2025Next Month
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
Today

Access Counter

Today : 2738273827382738
Yesterday : 7039703970397039
Total : 2826972828269728282697282826972828269728282697282826972828269728
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com