Install ubuntu on kvm in console

1

I use the following command to install Ubuntu server on KVM in a remote server using SSH console. But it seems that it does not recognize the iso image I provided as (a) it does not install without network configuration (b) with internet access, it downloads everything from internet.

What is the right command for this purpose?

virt-install --name ubuntu1 --ram 4096 --disk \
path=/home/abc/images/MyLinuxServer.img,size=10,format=qcow2,size=10,bus=virtio \
--network network:kvmbr1,model=virtio --os-type=linux --os-variant=ubuntutrusty \
--nographics --location /home/abc/ubuntu-14.04.1-server-amd64.iso \ 
--extra-args='console=tty0 console=ttyS0,115200n8 serial'

Masood_mj

Posted 2014-10-09T12:50:18.193

Reputation: 123

Answers

1

The command you've shown in your answer only creates the virtual machine which isn't really relevant to the actual question - installing without a network.

If you've got the correct ISO image then you can cancel the network configuration option and the option to download updates and the installer should continue.

garethTheRed

Posted 2014-10-09T12:50:18.193

Reputation: 2 520

How to cancel the option to download updates? – Masood_mj – 2014-10-09T15:12:37.947

Have you downloaded the correct ISO? I've just downloaded an ISO and installed it using a very similar (but not identical) command to the one you gave above. During the network config, I cancelled the auto-detection and then chose Do not configure network at this time. With no network configured, it didn't ask me about updates. – garethTheRed – 2014-10-09T20:55:04.023

It seems that I'm doing something wrong because I've downloaded the iso again form here http://www.ubuntu.com/download/server and tried to install ubuntu on bare metal using USB. I still could not skip the networking step. It keeps asking me about the finding archive mirrors for downloading release information!

– Masood_mj – 2014-10-15T16:48:49.037

I've edited my answer to include a link to the ISO that worked for me. – garethTheRed – 2014-10-15T17:02:31.327

1

You can try and mount he .iso on a directory and use it. Just remember to use the option loop to do so.

mount -o loop /home/abc/ubuntu-14.04.1-server-amd64.iso /destination/path

Isaac

Posted 2014-10-09T12:50:18.193

Reputation: 241

This didn't work: mount -o loop /home/abc/ubuntu-14.04.1-server-amd64.iso /mnt/cdrom and then replace --location with /mnt/cdrom . Still does not let met to install without network configuration – Masood_mj – 2014-10-09T15:11:37.630