lost and found ( for me ? )

Ubuntu 13.10 KVM: build VMs without VNC by using virt-install

Here are logs when building VMs via virt-install without VNC.

# virt-install --version
0.600.4

error..
# virt-install --name ubuntu1204-varm -r 1024 --vcpus=2 --os-type=linux --os-variant=ubuntuprecise --disk path=/var/lib/KVM_images/ubuntu1204-varm.qcow2,size=10,format=qcow2 --cdrom  /home/hattori/ISO_files/ubuntu-12.04.1-server-amd64.iso --accelerate  --nographics --network network=default,model=virtio --hvm --extra-args='console=tty0 console=ttyS0,115200n8 serial'
ERROR    --extra-args は --location とともに指定する場合のみ機能します。

when using --extra-args option, I need to use --location instead of --cdrom option.

I need to specify nfs or http or ftp path when using --location.
nfs:host:/path or nfs://host/path
            An NFS server location containing an installable distribution image

        http://host/path
            An HTTP server location containing an installable distribution image

        ftp://host/path
            An FTP server location containing an installable distribution image

To specify http path, create a directory to mount ISO
# mkdir /var/www/mnt

mount the ISO
# mount -t iso9660 -o loop /home/hattori/ISO_files/ubuntu-12.04.1-server-amd64.iso /var/www/mnt
mount: block device /home/hattori/ISO_files/ubuntu-12.04.1-server-amd64.iso is write-protected, mounting read-only

# ls /var/www/mnt/
boot          dists  efi      isolinux    pics  preseed             ubuntu
cdromupgrade  doc    install  md5sum.txt  pool  README.diskdefines

start apache2
# apache2ctl start

Now, you can specify installable image over http.

try again.
Okay, I can install ubuntu via console without VNC.
virt-install --name ubuntu1204-varm -r 1024 --vcpus=2 --os-type=linux --os-variant=ubuntuprecise --disk path=/var/lib/KVM_images/ubuntu1204-varm.qcow2,size=10,format=qcow2 --location http://127.0.0.1/mnt --accelerate  --nographics --network network=default,model=virtio --hvm --extra-args='console=tty0 console=ttyS0,115200n8 serial'

Starting install...
Retrieving file version.info...                          |  116 B     00:00 ...
Retrieving file linux...                                 | 9.5 MB     00:00 ...
Retrieving file initrd.gz...                             |  33 MB     00:00 ...
Creating domain...                                       |    0 B     00:00     
Connected to domain ubuntu1204-varm
Escape character is ^]
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.0-29-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 (Ubuntu 3.2.0-29.46-generic 3.2.24)
[    0.000000] Command line: method=http://127.0.0.1/mnt console=tty0 console=ttyS0,115200n8
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 000000003fffe000 (usable)
[    0.000000]  BIOS-e820: 000000003fffe000 - 0000000040000000 (reserved)
[    0.000000]  BIOS-e820: 00000000feffc000 - 00000000ff000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI 2.4 present.
[    0.000000] No AGP bridge found





No comments:

Post a Comment

Note: Only a member of this blog may post a comment.