Timo Lindfors
2019-Nov-07 14:44 UTC
Re: [libvirt-users] Understanding the use of virt-install from the CLI (Linux)
On Thu, 7 Nov 2019, jonetsu wrote:> And it reports: > > 'Size must be specified for non existent volume 'arch01.qcow2'' > > But the size is already specified as one of the options.At least the following works on Debian 10: virt-install \ --connect "qemu:///session" \ --name "debian10virt-install" \ --ram "1024" \ --vcpus "1" \ --disk "size=20,path=$HOME/.local/share/libvirt/images/debian10virt-install.qcow2,bus=scsi,cache=none,discard=unmap" \ --controller "type=scsi,model=virtio-scsi" \ --initrd-inject "preseed.cfg" \ --initrd-inject "late_command.sh" \ --location "http://deb.debian.org/debian/dists/buster/main/installer-amd64/" \ --os-type "linux" \ --os-variant "debian9" \ --virt-type "kvm" \ --controller "usb,model=none" \ --graphics "none" \ --network "user,model=virtio" \ --noreboot \ --extra-args "auto=true hostname=debian domain= console=ttyS0,115200n8 serial" Source: https://lindi.iki.fi/lindi/debian10/virt-install/install.bash -Timo
jonetsu
2019-Nov-07 16:02 UTC
[libvirt-users] Understanding the use of virt-install from the CLI (Linux)
Hello, I've created several VMs using virt-manager and am using them. This time around though, I'd like to use the CLI approach. The problem resides in defining a storage space. This is using virt-install 1.5.1 on Xubuntu 18.04. For the occasion I created a new directory to store images. So I specify this new directory: virt-install \ --name=arch01 \ --disk path=/Share2/KVMImages/arch01.qcow2 \ --disk size=10 \ [ ... ] The above will not work as it reports: 'must be a file or a device, not a directory' So I specify a file: [ ... ] --disk path=/Share2/KVMImages/arch01.qcow2 \ --disk size=10 \ [ ... ] And it reports: 'Size must be specified for non existent volume 'arch01.qcow2'' But the size is already specified as one of the options. This is where I'm puzzled about the process. What is going on ?
Pavel Hrdina
2019-Nov-07 16:52 UTC
Re: [libvirt-users] Understanding the use of virt-install from the CLI (Linux)
On Thu, Nov 07, 2019 at 11:02:49AM -0500, jonetsu wrote:> Hello, > > I've created several VMs using virt-manager and am using them. This > time around though, I'd like to use the CLI approach. The problem > resides in defining a storage space. This is using virt-install 1.5.1 > on Xubuntu 18.04. > > For the occasion I created a new directory to store images. So I > specify this new directory: > > virt-install \ > --name=arch01 \ > --disk path=/Share2/KVMImages/arch01.qcow2 \ > --disk size=10 \ > [ ... ] > > The above will not work as it reports: > > 'must be a file or a device, not a directory' > > So I specify a file: > > [ ... ] > --disk path=/Share2/KVMImages/arch01.qcow2 \ > --disk size=10 \ > [ ... ] > > And it reports: > > 'Size must be specified for non existent volume 'arch01.qcow2'' > > But the size is already specified as one of the options. > > This is where I'm puzzled about the process. What is going on ?Hi, The issue is that you are using the virt-install --disk option incorrectly. If you look into man page of virt-install you can see some examples. The options for each parameter needs to be separated by comma. The command line that you are using is telling virt-install to use 2 disks, one with the path and second one with only size provided. If you want to have only a single disk for your VM you need to use it like this: virt-install \ [ ... ] \ --disk path=/Share2/KVMImages/arch01.qcow2,size=10 \ [ ... ] Pavel
jonetsu
2019-Nov-07 19:49 UTC
Re: [libvirt-users] Understanding the use of virt-install from the CLI (Linux)
On Thu, 7 Nov 2019 17:52:32 +0100 Pavel Hrdina <phrdina@redhat.com> wrote:> The issue is that you are using the virt-install --disk option > incorrectly. If you look into man page of virt-install you can see > some examples. The options for each parameter needs to be separated > by comma. The command line that you are using is telling > virt-install to use 2 disks, one with the path and second one with > only size provided.Thanks. That was it. I completely forgot that it's possible to specify a x number of disks.
jonetsu
2019-Nov-07 19:52 UTC
Re: [libvirt-users] Understanding the use of virt-install from the CLI (Linux)
On Thu, 7 Nov 2019 16:44:45 +0200 (EET) Timo Lindfors <timo.lindfors@iki.fi> wrote:> At least the following works on Debian 10:Thanks. That's quite a few options to read about. One question: what is the pressed.cfg about ? Is it to seed the rng early in the install process ?
Reasonably Related Threads
- Understanding the use of virt-install from the CLI (Linux)
- Re: Understanding the use of virt-install from the CLI (Linux)
- Re: Fedora 19/20 new install :Unable to create vcpu cgroup
- Re: Fedora 19/20 new install :Unable to create vcpu cgroup
- Re: Fedora 19/20 new install :Unable to create vcpu cgroup